Skip to content
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

Add documentation for newlines in messages and "input_end_row" JSON type. #7360

Closed
2 of 3 tasks
johnnesky opened this issue Aug 4, 2023 · 3 comments
Closed
2 of 3 tasks
Assignees
Labels
issue: docs Describes missing or incorrect documentation

Comments

@johnnesky
Copy link
Member

Location

https://developers.google.com/blockly/guides/create-custom-blocks/define-blocks

Type

  • Text
  • Image or Gif
  • Other

Suggested content

The new feature is the ability to easily split a block into multiple rows even if the block has inline inputs. This also works for non-inline blocks, so this can probably replace dummies as the primary way to organize rows. (Dummies might still be useful for controlling groups of fields within a row, e.g. with mixed alignment or mutators.)

There are technically 3 ways to invoke the new feature: adding a newline "\n" character to a JSON block definition's message property, adding an input of type "input_end_row", or using the new JavaScript API method appendEndRowInput().

I also added "implicitAlign" as an alias for "lastDummyAlign". Both properties apply to both the implicit EndRowInputs created via newline characters, and the implicit DummyInput at the end of a block.

Many sections will need to be updated but at the very least:
https://developers.google.com/blockly/guides/create-custom-blocks/define-blocks#block_inputs
https://developers.google.com/blockly/guides/create-custom-blocks/define-blocks#args
https://developers.google.com/blockly/guides/create-custom-blocks/define-blocks#lastdummyalign0
https://developers.google.com/blockly/guides/create-custom-blocks/define-blocks#inputs_and_fields_in_javascript

Additional context

See: #6944

@johnnesky johnnesky added issue: docs Describes missing or incorrect documentation issue: triage Issues awaiting triage by a Blockly team member labels Aug 4, 2023
@maribethb maribethb removed the issue: triage Issues awaiting triage by a Blockly team member label Aug 16, 2023
@johnnesky
Copy link
Member Author

I've submitted the changes to the documentation.

@BeksOmega BeksOmega self-assigned this Aug 21, 2023
@BeksOmega
Copy link
Collaborator

I've submitted the changes to the documentation.

Documentation is good! I'm going to leave this open until the EOQ release to make sure we remember to release the changes.

@BeksOmega
Copy link
Collaborator

Released with v10.2!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: docs Describes missing or incorrect documentation
Projects
None yet
Development

No branches or pull requests

3 participants