Skip to content

fix!: Don't add padding around zero-width fields. #8738

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

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

gonfunko
Copy link
Contributor

The basics

The details

Resolves

Fixes #8699

Proposed Changes

This PR makes several changes around zero-width fields:

  • Fields no longer prevent themselves from having zero-width by swapping their (empty) display text with a non-breaking space character
  • [BREAKING] The long-deprecated support for re-rendering a field by setting its width to 0 has been removed
  • [BREAKING] The Field.NBSP static constant has been removed
  • The built-in renderers have been updated to not insert padding after zero-width fields to avoid doubled-up padding around invisible fields

@gonfunko gonfunko requested a review from a team as a code owner January 16, 2025 21:53
@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: fix Fixes a bug labels Jan 16, 2025
@gonfunko gonfunko added PR: fix Fixes a bug and removed PR: fix Fixes a bug labels Jan 16, 2025
@gonfunko gonfunko merged commit c88ebf1 into google:rc/v12.0.0 Jan 16, 2025
11 checks passed
@gonfunko gonfunko deleted the zero-width-fields branch January 16, 2025 23:23
@cpcallen
Copy link
Contributor

cpcallen commented May 7, 2025

  • Fields no longer prevent themselves from having zero-width by swapping their (empty) display text with a non-breaking space character

@gonfunko: How should fields prevent themselves from having zero width? (Relevant because some of the plugins are still using .NBSP.)

@cpcallen cpcallen mentioned this pull request May 7, 2025
1 task
cpcallen added a commit to cpcallen/blockly-samples that referenced this pull request May 7, 2025
cpcallen added a commit to cpcallen/blockly-samples that referenced this pull request May 7, 2025
cpcallen added a commit to cpcallen/blockly-samples that referenced this pull request May 8, 2025
cpcallen added a commit to cpcallen/blockly-samples that referenced this pull request May 8, 2025
maribethb pushed a commit to google/blockly-samples that referenced this pull request May 9, 2025
…4` (#2504)

* fix: Fix clean:node script

This was inadvertently broken by a mistranscription in PR #2453.

* chore(deps): Update blockly to v12.0.0-beta.4

* fix(FieldColour): Fix type of FieldColour.prototype.isFullBlockField

Method on superclass became public in v12.0.0.

* fix(FieldMultilineInput): Use string literal instead of Field.NBSP

Workaround for removal of that constant in google/blockly#8738.

* fix(FieldGridDropdown): Fix type error caused by separators
gonfunko pushed a commit to gonfunko/blockly-samples that referenced this pull request May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Used to mark a PR or issue that changes our public APIs. PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants