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

Hidden fields shouldn't have in-row spacing #8790

Open
1 task done
alexcui03 opened this issue Mar 1, 2025 · 0 comments
Open
1 task done

Hidden fields shouldn't have in-row spacing #8790

alexcui03 opened this issue Mar 1, 2025 · 0 comments
Labels
issue: bug Describes why the code or behaviour is wrong issue: triage Issues awaiting triage by a Blockly team member

Comments

@alexcui03
Copy link

alexcui03 commented Mar 1, 2025

Check for duplicates

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

Description

Example:
The above block has a hidden field '+', and that field in the below block is visible.
Image

The above block has an extra in-row spacing after the hidden field. According to RenderInfo.getInRowSpacing_ and RenderInfo.addElemSpacing_, the renderer will always create a spacer whether the field is visible or not. The expected behavior should be that there's only one spacing between two visible fields.

A possible solution is to add/remove fields instead of setting the visibility of fields. Since hidden fields also have some other rendering bugs (like #3223), maybe the visibility of fields should be deprecated?

Reproduction steps

  1. Create a block with a hidden field.

Stack trace

Screenshots

No response

Browsers

No response

@alexcui03 alexcui03 added issue: bug Describes why the code or behaviour is wrong issue: triage Issues awaiting triage by a Blockly team member labels Mar 1, 2025
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 issue: triage Issues awaiting triage by a Blockly team member
Projects
None yet
Development

No branches or pull requests

1 participant