Skip to content

Force box-sizing on underline wrapper in wrap mode - #8339

Open
ShiyunXu wants to merge 1 commit into
mainfrom
fix/underline-wrapper-force-box-sizing3
Open

Force box-sizing on underline wrapper in wrap mode#8339
ShiyunXu wants to merge 1 commit into
mainfrom
fix/underline-wrapper-force-box-sizing3

Conversation

@ShiyunXu

Copy link
Copy Markdown

Closes #

Adds box-sizing: border-box !important to the underline tabbed interface wrapper's wrap-mode rule, matching the !important already applied to border-block and padding-block in the same rule.

While investigating the border override issue fixed for the [github-ui] more-menu overflow bug, we noticed box-sizing in this same rule wasn't pinned with !important. An external box-sizing: content-box override could still change the wrapper's effective height budget used for overflow detection (via IntersectionObserver), incorrectly triggering the overflow "more" menu the same way the unpinned border did previously.

Changelog

Changed

  • UnderlineNav / UnderlinePanels wrap-mode wrapper CSS now also forces box-sizing: border-box !important.

Rollout strategy

  • Patch release

Testing & Reviewing

No visible/functional change under normal usage. This only guards against an external box-sizing override corrupting the overflow-detection height budget, the same class of bug previously fixed for border/padding-block.

Pin box-sizing with !important (alongside the existing border-block
and padding-block overrides) on the underline tabbed interface
wrapper's wrap-mode rule so an external box-sizing override can't
change the height budget used for overflow detection and incorrectly
trigger the overflow 'more' menu.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ShiyunXu
ShiyunXu requested a review from a team as a code owner August 25, 2026 05:55
@ShiyunXu
ShiyunXu requested review from TylerJDev and a lite review from Copilot August 25, 2026 05:55
@changeset-bot

changeset-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4aed0d0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Aug 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens the wrap-mode wrapper styling for the internal underline tabbed interface by pinning box-sizing with !important, aligning it with existing !important pinning for border-block and padding-block. The goal is to prevent external CSS overrides from altering the wrapper’s effective height and incorrectly triggering the overflow “more” menu logic.

Changes:

  • Update the wrap-mode rule in UnderlineTabbedInterface.module.css to use box-sizing: border-box !important.
  • Update the associated inline comment to reflect that box-sizing is also being pinned.
  • Add a patch changeset documenting the behavior hardening.
Show a summary per file
File Description
packages/react/src/internal/components/UnderlineTabbedInterface.module.css Pins box-sizing with !important in wrap mode to prevent external overrides from affecting overflow detection height budgeting.
.changeset/underline-wrapper-force-box-sizing.md Adds a patch changeset describing the wrap-mode wrapper box-sizing pinning.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

@TylerJDev TylerJDev added the Canary Release Apply this label when you want CI to create a canary release of the current PR label Aug 25, 2026
@primer-integration

Copy link
Copy Markdown

Integration test results from github/github-ui PR:

Passed  CI   Passed
Passed  VRT   Passed
Passed  Projects   Passed

All checks passed!

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

Labels

Canary Release Apply this label when you want CI to create a canary release of the current PR integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants