Skip to content

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

Merged
gonfunko merged 1 commit into
RaspberryPiFoundation:rc/v12.0.0from
gonfunko:zero-width-fields
Jan 16, 2025
Merged

fix!: Don't add padding around zero-width fields.#8738
gonfunko merged 1 commit into
RaspberryPiFoundation:rc/v12.0.0from
gonfunko:zero-width-fields

Conversation

@gonfunko

Copy link
Copy Markdown
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 ownerJanuary 16, 2025 21:53
@github-actionsgithub-actionsBot added breaking change Used to mark a PR or issue that changes our public APIs. PR: fix Fixes a bug labels Jan 16, 2025
@gonfunkogonfunko added PR: fix Fixes a bug and removed PR: fix Fixes a bug labels Jan 16, 2025
@gonfunko
gonfunko merged commit c88ebf1 into RaspberryPiFoundation:rc/v12.0.0Jan 16, 2025
@gonfunko
gonfunko deleted the zero-width-fields branch January 16, 2025 23:23
@cpcallen

Copy link
Copy Markdown
Collaborator
  • 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.)

@cpcallencpcallen 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 RaspberryPiFoundation/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 RaspberryPiFoundation/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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking changeUsed to mark a PR or issue that changes our public APIs.PR: fixFixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@gonfunko@cpcallen@rachel-fenichel