WordPress / WordPress/gutenberg

Spacer block: Fixed width not 1:1 to control value

Open
#49,941 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Block] Spacer [Type] Bug
Dominant language
JavaScript
Stars
11.8k
Forks
4.9k
PR merge metrics
PR metrics pending

Description

I've been testing out the newest Spacer block enhancements in https://github.com/WordPress/gutenberg/pull/49362 and am running into an oddity with the fixed width. The control value, as a fixed px value, is not exactly depicted as the width applied to the Spacer block.

The same occurs when dragging to resize:

https://user-images.githubusercontent.com/1813435/233217117-f6de72d5-5031-4bcf-985a-9561a89921f1.mp4

cc @tellthemachines

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Spacer block enhancements in pull request #49362 and reproduce the fixed-width and drag-resize behavior described in the issue. Trace where the control value is applied to the block, then verify that the displayed width matches the fixed px value and that resizing preserves the same correspondence.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.