From 807e04e80b850e68e2503802b90a07cdd0577f7f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 16:24:33 +0000 Subject: [PATCH 1/2] Initial plan From 984b15d30ddf0d9a34239c72b5fa5c8024b8da15 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 16:29:07 +0000 Subject: [PATCH 2/2] Add changeset for UnderlineNav CSS overflow refactor Co-authored-by: iansan5653 <2294248+iansan5653@users.noreply.github.com> --- .changeset/underline-nav-css-overflow.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/underline-nav-css-overflow.md diff --git a/.changeset/underline-nav-css-overflow.md b/.changeset/underline-nav-css-overflow.md new file mode 100644 index 00000000000..e504c01bcc1 --- /dev/null +++ b/.changeset/underline-nav-css-overflow.md @@ -0,0 +1,5 @@ +--- +"@primer/react": minor +--- + +Refactors `UnderlineNav` overflow handling to use CSS-based overflow detection instead of JavaScript width measurements, eliminating layout shift (CLS) issues and improving performance. The overflow menu is now implemented with `ActionMenu`, and item registration uses a descendant registry instead of the `React.Children` API. Consumer-facing changes: items can now be wrapped in fragments or wrapper components; the current item may appear in the overflow menu when the viewport is narrow; and the overflow menu button is right-aligned.