question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document the process of creating a custom field.

See original GitHub issue

As of #1594, custom fields are now possible without modifying the core blockly code.

Audit field APIs

Improve the Field class APIs to a level we are willing to support long term.

  • Use setText instead of setValue in fieldTextInput (#860).
  • Extract common Field support methods into new field_util.js (#1624).
  • Consistently call Field.init() from subclass .init() (or refactor to put ensure it is called in other ways).
  • Split Field.init() into Field.initView() and Field.initModel() (#1010).
  • Consider splitting Field view and model more completely. For instance, updateWidth() is another view specific method.
  • Validation: Do we validate the text of the field, the value, or both (need separate APIs)?

Document custom field development process and concerns

Write the documentation for the following aspects of the improved API.

  • Field class hierarchy, denoting where good extension points are.
  • Document required Field methods and life cycle of a Field object.
  • Difference between setText() vs setValue().
  • Timeline and expectations between showEditor() and registering event listeners and hideChaff().
  • How to attach popup editors to a field.
  • Document the registration functions.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:28 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
BeksOmegacommented, Jun 16, 2019

Ok I have completed a field documentation prototype.

I tried my best to follow the Write the Docs Documentation Principles, as well as the Google Documentation Style Guide as I was writing.

I have given edit access to Abby, Andrew, Erik, Neil, and Rachel (or tried to anyway). Please tell me if anyone needs to be added or removed.

I have also shared a link with comment access on the forums, because I thought it would be a good way to get outside developers’ opinions on the changes.

1reaction
RoboErikGcommented, Jun 17, 2019

This is awesome, Beka. Just an FYI, we’re all going to be at a larger team offsite this week so reviews may be a bit slow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a custom field - Atlassian Support
Create a new custom field​​ Click Create custom field. Make sure to select All to view the available field options. Select the type...
Read more >
Create Custom Fields - Salesforce Help
From the management settings for the object you want to add a field to, go to Fields. Custom task and event fields are...
Read more >
Creating Custom Fields - Conga Product Documentation
To create custom fields ​​ From Setup, go to Create > Objects > Agreement. From Custom Fields & Relationships, click New. Dynamic Document...
Read more >
Create New Custom Field - Contentstack
The first step is creating the visual part of the field. It involves entering the code of your custom field in an HTML...
Read more >
Create and Edit Custom Fields | YouTrack Cloud Documentation
From the Administration menu, select Custom Fields. · Select the Fields List tab. · Click the New custom field button. The New Custom...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found