Nickakhmetov/CAT-1509 CAT-1508 New Hero Section + Navigation Pillbar#3944
Nickakhmetov/CAT-1509 CAT-1508 New Hero Section + Navigation Pillbar#3944NickAkhmetov wants to merge 6 commits intonickakhmetov/cat-1504-download-datasetsfrom
Conversation
…mBar, HeroCard, and HeroV3
…tov/cat-1509-hero-section
…tov/cat-1509-hero-section
There was a problem hiding this comment.
Pull request overview
Implements the new homepage hero section design (background + feature cards) and adds a sticky “navigation pill bar” to jump between homepage sections, updating the homepage grid layout accordingly.
Changes:
- Replaces the previous tabbed hero/carousel with a new hero layout (left intro + right-side cards) and cycling background imagery.
- Adds a sticky bottom navigation pill bar (desktop buttons + mobile “Jump to section…” select) wired to section anchors and analytics events.
- Updates the homepage lower grid areas/sections (adds “Analysis and Visualizations” + “Testimonials”, adjusts publications/testimonials IDs).
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| context/app/static/js/theme/theme.tsx | Adjusts global button border radius styling. |
| context/app/static/js/shared-styles/Timeline/Timeline.stories.tsx | Removes the Timeline Storybook story (related to removed hero timeline content). |
| context/app/static/js/pages/Home/style.tsx | Updates homepage grid template areas and removes unused upper-grid helpers. |
| context/app/static/js/pages/Home/Home.tsx | Integrates new Hero + sections/anchors that the pill bar scrolls to. |
| context/app/static/js/components/home/Hero/styles.ts | Introduces new hero/pill bar styling (including sticky behavior styles). |
| context/app/static/js/components/home/Hero/index.ts | Simplifies Hero export to default-only. |
| context/app/static/js/components/home/Hero/const.ts | Adds new config for hero cards + bottom bar items + timing constants. |
| context/app/static/js/components/home/Hero/HeroCard.tsx | New hero card component (link + optional thumbnail/video + analytics). |
| context/app/static/js/components/home/Hero/HeroBottomBar.tsx | New sticky navigation pill bar (desktop + mobile variants). |
| context/app/static/js/components/home/Hero/HeroBackground.tsx | New cycling background implementation for hero. |
| context/app/static/js/components/home/Hero/Hero.tsx | New hero composition (background + columns + bottom bar). |
| context/app/static/js/components/home/Hero/*.spec.tsx | Adds unit tests for new hero components. |
| context/app/static/js/components/home/EntityCounts/style.ts | Adjusts container padding for updated homepage layout. |
| context/app/static/js/components/Routes/Route/style.ts | Removes container top margin (layout alignment with new hero). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| maxWidth="lg" | ||
| sx={(theme) => ({ | ||
| position: 'sticky', | ||
| top: 112, |
There was a problem hiding this comment.
Mobile sticky offset uses the same hard-coded top: 112 as the desktop pill bar, but headerHeight is already imported and equals 104. Consider deriving top from headerHeight (and any additional intended spacing) so the sticky position stays correct if the header/banner heights change.
| top: 112, | |
| top: headerHeight + 8, |
| // Auto-cycle — paused while any card is hovered | ||
| useEffect(() => { | ||
| if (prefersReducedMotion) return undefined; | ||
|
|
||
| const interval = setInterval(() => { |
There was a problem hiding this comment.
The comment says the background auto-cycle is “paused while any card is hovered”, but the effect currently always runs (unless prefersReducedMotion), and HeroRightColumn is rendered without passing hover handlers. Either implement the hover-pause behavior (e.g., via a shared hovered state) or update/remove this comment to match the current behavior.
| sizes="100vw" | ||
| src={`${CDN_URL}/v3/${imageName}-100.png`} | ||
| alt="" | ||
| loading="eager" |
There was a problem hiding this comment.
All hero background images are rendered up-front with loading="eager", which can force downloading multiple large images immediately even though only one is visible. Consider making only the initially visible image eager (or using fetchpriority="high" for the first) and lazy-loading the rest to reduce initial page weight.
| loading="eager" | |
| loading={index === 0 ? 'eager' : 'lazy'} | |
| fetchPriority={index === 0 ? 'high' : 'auto'} |
| margin: 0, | ||
|
|
||
| [`& ${BottomBarLink}`]: { | ||
| padding: theme.spacing(3, 2), | ||
| }, |
There was a problem hiding this comment.
PillBarOuter references BottomBarLink in the nested selectors, but BottomBarLink is declared later in this module. Because BottomBarLink is a const, this will hit the temporal dead zone and can throw at module evaluation time. Move the BottomBarLink export above PillBarOuter, or replace the component selector with a stable class/attribute selector.
| duration: theme.transitions.duration.shorter, | ||
| }), | ||
| borderBottom: `1px solid ${theme.palette.grey[200]}`, | ||
| py: 1, |
There was a problem hiding this comment.
py is an sx shorthand, not a valid CSS property in an Emotion/MUI styled() style object. These py entries will be ignored, so the pill bar padding likely isn't being applied. Use paddingTop/paddingBottom (or padding: theme.spacing(...)) instead.
| py: 1, | |
| paddingTop: theme.spacing(1), | |
| paddingBottom: theme.spacing(1), |
| maxWidth: 700, | ||
| boxShadow: theme.shadows[3], | ||
| borderRadius: theme.spacing(0.5), | ||
| py: 0, | ||
| // Add margin to bar to compensate for reduced padding on the links |
There was a problem hiding this comment.
Same issue as above: py: 0 is not a valid CSS property in a styled() object and will be ignored. Use explicit padding properties so the stuck-state height calculations match the actual rendered styles.
|
|
||
| export const PillBarOuter = styled('div')(({ theme }) => ({ | ||
| position: 'sticky', | ||
| top: 112, // headerHeight (appBarHeight 64 + bannerHeight 40) |
There was a problem hiding this comment.
top: 112 is documented as “headerHeight (appBarHeight 64 + bannerHeight 40)”, but headerHeight is 104 (64+40). Either update the comment or (preferably) compute this value from headerHeight (+ any intentional extra offset) to avoid drift if header sizing changes.
| top: 112, // headerHeight (appBarHeight 64 + bannerHeight 40) | |
| top: 112, // headerHeight (appBarHeight 64 + bannerHeight 40 = 104) + 8px extra offset |
Summary
This PR implements the homepage hero section and the navigation pill bar.
The hero cards are implemented with support for eventually adding videos on hover.
Design Documentation/Original Tickets
https://hms-dbmi.atlassian.net/browse/CAT-1508
https://hms-dbmi.atlassian.net/browse/CAT-1509
Testing
Added unit tests for all new components.
Screenshots/Video
Desktop
https://github.com/user-attachments/assets/2e2539f1-4e83-465f-865d-6cae4be9b792
Mobile

Checklist
CHANGELOG-your-feature-name-here.mdis present in the root directory, describing the change(s) in full sentences.Additional Notes
Please specify any additional information or context relevant to this PR.