-
Notifications
You must be signed in to change notification settings - Fork 625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update colour readme to include more information about field customization #2319
Conversation
plugins/field-colour/README.md
Outdated
|
||
#### Colour field on collapsed block | ||
|
||
![](https://github.com/google/blockly-samples/raw/master/plugins/field-colour/readme-media/collapsed.png) | ||
|
||
If you want to use only the field, you must register it with Blockly. You can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraph is now under the "Colour field on collapsed block" heading, which is awkward. I would move it directly under the ## Usage
headline.
Also, I have suggestions for the paragraph itself:
- the word "only" is confusing here because we haven't introduced any context that would explain what the alternative is (i.e. if not "only" then what else?).
- say the name of the field in that part of the explanation.
- add a link to the install blocks section
So I would change this paragraph to say:
If you want to use this field in a block definition, you must install it by calling `registerFieldColour` before instantiating your blocks. If another field is registered under the same name (`field_colour`), this field will overwrite it.
If you [install the blocks](#blocks) in this package, the field will automatically be installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
plugins/field-colour/README.md
Outdated
The colour constructor takes in the following: | ||
|
||
- an optional `value` | ||
- an optional [validator](#creating_a_colour_validator) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this (and other links) should use -
instead of _
if you click "view file" in the ...
menu in this PR you can preview the rendered file and see thin links
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks.
plugins/field-colour/README.md
Outdated
|
||
### Editor options | ||
|
||
The setColours |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add backticks around setColours
…ustomization (google#2319) * chore: update field-colour readme to include information from devsite * chore: line length * chore: show colourOptions in colour field sample code * chore: format * chore: respond to review feedback
The basics
The details
Resolves
Fixes #2216
Fixes google/blockly#7878
Proposed Changes
Combines documentation from deviste and existing README.
Reason for Changes
This field will no longer be documented on devsite.
Test Coverage
Documentation
This is documentation! But also, devsite should probably have a pointer to the fields on gh-pages in addition to the individual pages for built-in fields.
Additional Information
I can't tell if the section links with
#section_name
will work in GitHub markdown.