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

Marker does not render correctly for full-block FieldColour fields #8739

Open
1 task
cpcallen opened this issue Jan 13, 2025 · 1 comment
Open
1 task

Marker does not render correctly for full-block FieldColour fields #8739

cpcallen opened this issue Jan 13, 2025 · 1 comment
Assignees
Labels
issue: bug Describes why the code or behaviour is wrong

Comments

@cpcallen
Copy link
Contributor

cpcallen commented Jan 13, 2025

Check for duplicates

  • I have searched for similar issues before opening a new one.

Component

@blockly/field-colour

Description

When using the Zelos renderer, certain fields (notably: FieldColour) are rendered as full-block fields. When the marker is moved to such a field, it disappears.

Initial investigation suggests the issue is that the field has zero width (and dubious height), as reported by getSize() call in MarkerSvg.prototype.showWithField_

Reproduction steps

  1. Go to https://google.github.io/blockly-samples/plugins/field-colour/test/index.html#renderer=zelos
  2. Drag a colour picker block (the solid red oval) onto the workspace.
  3. Open the JavaScript console and enter the following lines, one at a time:
    var marker = new Blockly.Marker();
    Blockly.getMainWorkspace().getMarkerManager().registerMarker('test', marker);
    marker.setCurNode(new Blockly.ASTNode(Blockly.ASTNode.types.FIELD, Blockly.getMainWorkspace().getAllBlocks()[0].getField('COLOUR')));
    

Observe that nothing happens. Compare to situation when renderer is set to geras or thrasos, when a blue oval is drawn around the colour field.

Stack trace

Screenshots

No response

@cpcallen cpcallen transferred this issue from google/blockly-samples Jan 17, 2025
@cpcallen cpcallen added the issue: bug Describes why the code or behaviour is wrong label Jan 17, 2025
@cpcallen
Copy link
Contributor Author

@gonfunko: Would you add some screenshots of how things currently look for different full-block fields, and different possible renderings, so that accessibility partners can offer their views on what rendering is most preferable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Describes why the code or behaviour is wrong
Projects
Status: Todo
Development

No branches or pull requests

2 participants