[Google Blockly] use thrasos as default renderer - #51179
Merged
Merged
Conversation
mikeharv
marked this pull request as ready for review
April 6, 2023 20:58
bencodeorg
approved these changes
Apr 6, 2023
breville
approved these changes
Apr 6, 2023
fisher-alice
approved these changes
Apr 6, 2023
fisher-alice
left a comment
Contributor
There was a problem hiding this comment.
This is exciting! And it'll be nice to have consistency across Google Blockly labs.
Just a small renaming suggestion.
| } else if (experiments.isEnabled('thrasos')) { | ||
| options.renderer = 'cdo_renderer_thrasos'; | ||
| } else if (experiments.isEnabled('geras')) { | ||
| options.renderer = 'cdo_renderer'; |
Contributor
There was a problem hiding this comment.
What do you think of renaming cdo_renderer to cdo_renderer_geras and also renaming the class CdoRenderer to CdoRendererGeras?
Contributor
Author
There was a problem hiding this comment.
That sounds good to me. It looks like you’ve already prepped that change in your branch so I’ll merge this one as is.
Contributor
There was a problem hiding this comment.
Sounds good - thanks! For documentation: prepped branch
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates our Google Blockly labs to use the thrasos renderer by default, unless overridden with an experiment.
Unblocks:
About the Thrasos renderer
Thrasos (Greek: "bold") is the name of Blockly's modern replacement for the Geras (Greek: "old") renderer that we use today in most labs. It has a flatter, more modern look, and improved vertical alignment of text on taller blocks. Geras blocks have a 3d look that is accomplished through an extra SVG "highlight". C-shaped blocks also have a more symmetrical shape.
Geras:


Thrasos:


Thrasos is the current default renderer for Music Lab and we would like to start using it other labs as well. In addition to the desired modernization and consistency this would bring, it would also simplify some complexity that is currently blocking Sprite Lab migration work (#51066).
Today, the Blockly team explicitly recommends this renderer for new projects although they still support Geras for projects that already use it as well as the Zelos renderer, which was explicitly designed to mimic Scratch.
This change updates the default renderer for all Google Blockly labs to consistently use Thrasos, including main workspaces created through the standard inject and readOnlyBlockSpaces, which are used in places like instructions. To test our confidence with this change, I made sure all blocks rendered as expected in the Dance and Poetry block pools, and compared various Google Blockly lab projects.
Side-by-side comparisons
Testing story
No functional changes. It's possible that this could contribute to eyes diffs, so we will communicate with the DOTD when this is merged.
PR Checklist: