Skip to content

chore: merge main into epic/v2 (environment banner fix) - #1011

Merged
jacobvjk merged 4 commits into
epic/v2from
chore/merge-main-into-v2
Oct 26, 2026
Merged

jacobvjk merged 4 commits into
epic/v2from
chore/merge-main-into-v2

Conversation

@jacobvjk

Copy link
Copy Markdown
Collaborator

Unblocks #937 (epic/v2 → main), which shows as conflicting. Please merge with a merge commit, not squash. Squashing drops the link to main, and #937 would conflict again.

Why #937 conflicts

main is 2 commits ahead of epic/v2, both from #1009 (keep sticky content below the environment banner on staging and PR previews). They touch one line that epic/v2 also changed.

Commits

  1. Merge main into epic/v2. One conflict, in src/pages/ComparisonPage.tsx, resolved to epic/v2: the pathway summary cards stay static. fix(layout): keep sticky content below the environment banner #1009 kept them sticky (offset below the banner), but on epic/v2 they stopped being sticky when ComparisonScopeHeader took over that job. The rest of fix(layout): keep sticky content below the environment banner #1009 merges cleanly: index.css, EnvironmentBanner, OnPageIndex, PathwaySearch.
  2. fix(layout): extend fix(layout): keep sticky content below the environment banner #1009 to v2's own sticky bars. epic/v2 has two sticky bars that fix(layout): keep sticky content below the environment banner #1009 never saw, and they still slid under the banner:
    • ComparisonScopeHeader (compare page) and PathwayContextRibbon (pathway detail page) now stick at top-(--env-banner-height).
    • useCondensedOnScroll measures the banner and shifts its IntersectionObserver band by that height, so the condensed bar appears as the sticky bar pins, not 28px of scrolling later. With no banner (production) the height is 0 and nothing changes.

Checks

  • npx vitest run: 1349 passing, including a new test for the condensed bar under a banner.
  • npm run lint, npm run format:check, npm run schema:check (129 valid): clean.
  • This branch merges into main with no conflicts (git merge-tree).
  • Not yet checked in a browser. On this PR's preview, scroll /compare and a pathway's page: the scope header and the context ribbon should pin directly under the banner, with their condensed bar appearing as they pin.

🤖 Generated with Claude Code

jacobvjk and others added 4 commits October 26, 2026 10:33
On non-production builds the environment banner sticks to the top of
the screen, and so did the pathway search bar, the comparison page's
summary cards and the "On this page" index. Once scrolled, they slid
under the banner and lost their top 28px.

* A CSS variable, --env-banner-height, is the banner's height while it
  is on the page and 0 otherwise. The banner takes its height from it
  and the three sticky elements offset by it.
* scroll-padding-top uses it too, so headings reached from the index or
  a #link land below the banner.

Production shows no banner, so its layout is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(layout): keep sticky content below the environment banner
Brings in #1009 (keep sticky content below the environment banner).

Conflict in src/pages/ComparisonPage.tsx, resolved to epic/v2: the
pathway summary cards stay static. On main #1009 offset them below the
banner, but on epic/v2 they stopped being sticky when
ComparisonScopeHeader took over that job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1009 offset main's sticky elements by --env-banner-height. epic/v2 has
two more that it never saw, the comparison scope header and the pathway
context ribbon, and they still slid under the banner.

* Both now stick at top-(--env-banner-height).
* useCondensedOnScroll measures the banner and shifts its observed band
  by that height, so the condensed bar appears as the sticky bar pins
  rather than 28px of scrolling later. With no banner the height is 0
  and nothing changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Expected version change and release notes

🚨 WARNING: This PR is not expected to trigger a new version

To trigger a version bump, use at least one conventional commit message in this branch. See: https://www.conventionalcommits.org/en/v1.0.0/

@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-1011.westus2.2.azurestaticapps.net

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.

🟢 Approval recommended

The focused layout changes and regression test are consistent, with no blocking issues identified; browser validation remains outstanding.

No open issues 🎉

What changed in this PR

Brings the environment-banner layout fix from main into epic/v2 and extends it to v2’s sticky headers, helping unblock #937. Merge with a merge commit, not squash, to preserve the branch history.

Changes:

  • Defines a shared banner-height variable and offsets sticky content below it.
  • Aligns condensed-header activation with the banner’s bottom edge.
  • Adds a regression test for condensed-header behavior when a banner is present.
File Description
src/​pages/​PathwaySearch.tsx Offsets the sticky search bar below the banner.
src/​index.css Defines banner height and anchor-scroll padding.
src/​components/​PathwayContextRibbon.tsx Offsets the ribbon and adjusts the shared scroll observer.
src/​components/​PathwayContextRibbon.test.tsx Tests condensed-header activation under a banner.
src/​components/​OnPageIndex.tsx Adds banner height to the sticky index offset.
src/​components/​EnvironmentBanner.tsx Marks the banner and uses the shared height variable.
src/​components/​ComparisonScopeHeader.tsx Offsets the comparison header below the banner.

Review effort: Balanced

@jacobvjk
jacobvjk merged commit 8537814 into epic/v2 Oct 26, 2026
12 checks passed
@jacobvjk
jacobvjk deleted the chore/merge-main-into-v2 branch October 26, 2026 10:14
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.

2 participants