Skip to content

[Google Blockly] use thrasos as default renderer - #51179

Merged
mikeharv merged 2 commits into
stagingfrom
mike/use-thrasos-as-default-renderer
Apr 7, 2023
Merged

[Google Blockly] use thrasos as default renderer#51179
mikeharv merged 2 commits into
stagingfrom
mike/use-thrasos-as-default-renderer

Conversation

@mikeharv

@mikeharv mikeharv commented Apr 6, 2023

Copy link
Copy Markdown
Contributor

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:
imageimage

Thrasos:
imageimage

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

Geras Thrasos
flappy geras flappy thrasos
poemart geras poemart thrasos
highcontrast geras highcontrast thrasos

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:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@mikeharv
mikeharv requested review from a team and fisher-alice April 6, 2023 20:58
@mikeharv
mikeharv marked this pull request as ready for review April 6, 2023 20:58

@fisher-alice fisher-alice left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exciting! And it'll be nice to have consistency across Google Blockly labs.
Just a small renaming suggestion.

Comment thread apps/src/StudioApp.js
} else if (experiments.isEnabled('thrasos')) {
options.renderer = 'cdo_renderer_thrasos';
} else if (experiments.isEnabled('geras')) {
options.renderer = 'cdo_renderer';

@fisher-alice fisher-alice Apr 6, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of renaming cdo_renderer to cdo_renderer_geras and also renaming the class CdoRenderer to CdoRendererGeras?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good - thanks! For documentation: prepped branch

@mikeharv
mikeharv merged commit af02ab8 into staging Apr 7, 2023
@mikeharv
mikeharv deleted the mike/use-thrasos-as-default-renderer branch April 7, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants