Skip to content

Nickakhmetov/CAT-1509 CAT-1508 New Hero Section + Navigation Pillbar#3944

Draft
NickAkhmetov wants to merge 6 commits intonickakhmetov/cat-1504-download-datasetsfrom
nickakhmetov/cat-1509-hero-section
Draft

Nickakhmetov/CAT-1509 CAT-1508 New Hero Section + Navigation Pillbar#3944
NickAkhmetov wants to merge 6 commits intonickakhmetov/cat-1504-download-datasetsfrom
nickakhmetov/cat-1509-hero-section

Conversation

@NickAkhmetov
Copy link
Copy Markdown
Collaborator

@NickAkhmetov NickAkhmetov commented Mar 2, 2026

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
image

Checklist

  • Code follows the project's coding standards
    • Lint checks pass locally
    • New CHANGELOG-your-feature-name-here.md is present in the root directory, describing the change(s) in full sentences.
  • Unit tests covering the new feature have been added
  • All existing tests pass
  • Any relevant documentation in JIRA/Confluence has been updated to reflect the new feature
  • Any new functionalities have appropriate analytics functionalities added

Additional Notes

Please specify any additional information or context relevant to this PR.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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,
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
top: 112,
top: headerHeight + 8,

Copilot uses AI. Check for mistakes.
Comment on lines +33 to +37
// Auto-cycle — paused while any card is hovered
useEffect(() => {
if (prefersReducedMotion) return undefined;

const interval = setInterval(() => {
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
sizes="100vw"
src={`${CDN_URL}/v3/${imageName}-100.png`}
alt=""
loading="eager"
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
loading="eager"
loading={index === 0 ? 'eager' : 'lazy'}
fetchPriority={index === 0 ? 'high' : 'auto'}

Copilot uses AI. Check for mistakes.
Comment on lines +119 to +123
margin: 0,

[`& ${BottomBarLink}`]: {
padding: theme.spacing(3, 2),
},
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
duration: theme.transitions.duration.shorter,
}),
borderBottom: `1px solid ${theme.palette.grey[200]}`,
py: 1,
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
py: 1,
paddingTop: theme.spacing(1),
paddingBottom: theme.spacing(1),

Copilot uses AI. Check for mistakes.
Comment on lines +129 to +133
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
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.

export const PillBarOuter = styled('div')(({ theme }) => ({
position: 'sticky',
top: 112, // headerHeight (appBarHeight 64 + bannerHeight 40)
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
top: 112, // headerHeight (appBarHeight 64 + bannerHeight 40)
top: 112, // headerHeight (appBarHeight 64 + bannerHeight 40 = 104) + 8px extra offset

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants