Repository navigation
chore: merge main into epic/v2 (environment banner fix) - #1011
Merged
Merged
Conversation
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>
Expected version change and release notes🚨 WARNING: This PR is not expected to trigger a new versionTo trigger a version bump, use at least one conventional commit message in this branch. See: https://www.conventionalcommits.org/en/v1.0.0/ |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-1011.westus2.2.azurestaticapps.net |
Contributor
There was a problem hiding this comment.
🟢 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks #937 (
epic/v2→main), which shows as conflicting. Please merge with a merge commit, not squash. Squashing drops the link tomain, and #937 would conflict again.Why #937 conflicts
mainis 2 commits ahead ofepic/v2, both from #1009 (keep sticky content below the environment banner on staging and PR previews). They touch one line thatepic/v2also changed.Commits
mainintoepic/v2. One conflict, insrc/pages/ComparisonPage.tsx, resolved toepic/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 onepic/v2they stopped being sticky whenComparisonScopeHeadertook over that job. The rest of fix(layout): keep sticky content below the environment banner #1009 merges cleanly:index.css,EnvironmentBanner,OnPageIndex,PathwaySearch.fix(layout): extend fix(layout): keep sticky content below the environment banner #1009 to v2's own sticky bars.epic/v2has 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) andPathwayContextRibbon(pathway detail page) now stick attop-(--env-banner-height).useCondensedOnScrollmeasures 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.mainwith no conflicts (git merge-tree)./compareand 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