Skip to content

Conversation

@rpbourret
Copy link
Collaborator

The basics

The details

Resolves

Fixes issue 2628.

Proposed Changes

Makes the following fixes to address the problems in the bug:

  • Sets the cursor using CSS.

    • In FieldTurtle, removes the CURSOR field, removes updateEditable() (which only set the cursor), and adds a turtleField class for greater specificity.
    • In the CSS, sets the cursor type.
  • Updates CSS names for v12: Changes blocklyEditableText to blocklyEditableField and blocklyNonEditableText to blocklyNonEditableField.

  • In the CSS file, deletes .blocklyNonSelectable (removed in v12) and moves its rules to customFieldsTurtleWidget.

Makes the following changes, which address other problems:

  • Replaces call to Block.setEnabled (removed in v12) with call to Block.setDisabledReason.

  • Fixes the final set of CSS selectors, which weren't being applied because the text selector was less specific than the .blocklyText selector in .geras-renderer.classic-theme .blocklyText, which comes from renderers/common/constants.ts. As a result, the fill was set to #fff instead of #000, which the final set of selectors attempted to apply.

Reason for Changes

Test Coverage

Tested manually

Documentation

N/A

Additional Information

@rpbourret rpbourret requested a review from a team as a code owner November 5, 2025 22:22
@rpbourret rpbourret requested review from BenHenning and removed request for a team November 5, 2025 22:22
Copy link
Collaborator

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @rpbourret! All the changes make sense and it's nice that this is a net simplification.

@rpbourret rpbourret merged commit b089be0 into RaspberryPiFoundation:master Nov 6, 2025
10 checks passed
@rpbourret rpbourret deleted the v12turtle branch November 6, 2025 19:40
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.

Update turtle demo for v12

2 participants