Skip to content

fix(target-size): ignore widgets that are inline with other inline elements#5000

Open
straker wants to merge 10 commits intodevelopfrom
target-size-inline
Open

fix(target-size): ignore widgets that are inline with other inline elements#5000
straker wants to merge 10 commits intodevelopfrom
target-size-inline

Conversation

@straker
Copy link
Contributor

@straker straker commented Jan 29, 2026

Closes: #4392

@straker straker requested a review from a team as a code owner January 29, 2026 22:23
@straker straker marked this pull request as draft January 29, 2026 23:52
@straker straker marked this pull request as ready for review February 2, 2026 23:19
WilcoFiers added a commit that referenced this pull request Feb 4, 2026
Copy link
Contributor

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you went off track with this fix. The real issue I think is much simpler, that we just need to be allow inline-block elements to be considered inline for the purpose of target-size (as that's the permissive approach for it) and for them to be blocks for link-in-text-block (as that's the permissive approach there).

#5009

WilcoFiers and others added 4 commits February 5, 2026 13:55
While reviewing #5000 I found the approach wasn't working as I was
expecting. Playing around with examples I found a simpler way to do
this. IDK if this is everything we should do, but I think this gets us
close. I decided to put this in its own PR since this was too much code
to put into comments.
@straker straker force-pushed the target-size-inline branch from b204032 to 6e35ae1 Compare March 24, 2026 19:47
Copy link
Contributor

@chutchins25 chutchins25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

1. Test describe block uses stale option name (Important)

test/commons/dom/is-in-text-block.js:335

The describe block is labeled 'with options.permissive: true' but the option was renamed to includeInlineBlock (by #5009). Should be updated to match the actual API.

2. Test description contradicts assertion (Important)

test/commons/dom/is-in-text-block.js:387

The test 'returns true if inline-block element has a sibling on the same line' asserts isFalse. The test passes because "world" is shorter than "button 2" so the length comparison fails — but the description claims the opposite result. Please update the description to match the actual expected behavior.

3. PR title typo (Suggestion)

Minor: "wigets" → "widgets" in the PR title.

@straker straker changed the title fix(target-size): ignore wigets that are inline with other inline elements fix(target-size): ignore widgets that are inline with other inline elements Mar 25, 2026
Copy link
Contributor

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I contributed too much to this. I don't think I can approve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

target-size doesn't respect inline exception for display: inline-block elements

3 participants