Skip to content

Responsive design | Breakpoints + TopBar#72

Merged
coldlink merged 6 commits intomainfrom
mm/responsive-top-bar
Apr 23, 2026
Merged

Responsive design | Breakpoints + TopBar#72
coldlink merged 6 commits intomainfrom
mm/responsive-top-bar

Conversation

@coldlink
Copy link
Copy Markdown
Member

@coldlink coldlink commented Apr 20, 2026

What does this change?

Adds breakpoints to semantic tokens based on those from Figma

  • sm -> 0 - 671px
  • md -> 672px - 1055px
  • lg -> 1056px - 1311px
  • xl -> 1312px - 1583px
  • max -> 1584px - 1783px
  • maxplus-> 1784px+

These breakpoints will serve as the basis for responsive design, layout and the grid system within stand and it's consuming applications.

We've added in utilities in mq.ts to help work with the breakpoint system. Specifically a from, until, between methods used to create css media queries based on a given breakpoint. A useResize callback hook is also created to determine at runtime when a resize event happens.

This PR also applies these to the TopBar component, thereby creating a responsive TopBar.
We now collapse the items in the left hand side of the top bar at a given breakpoint. See Figma for designs.

The TopBarToolName has now been configured to only show the Favicon when below the given collapseBelow prop, and added collapsedHoverText for scenarios where we need a shorter hover text.

The TopBarContainerLeft items now collapse into a hamburger menu automatically, with the items retaining similar syling as previous, achieved by updating TopBarItem and TopBarNavigation to account for menu open styles. The TopBarContainerRight never collapses, so a developer should be careful about what goes there.

We also update topBarContainerStyles to account for which breakpoint we should show/hide a given element/componet at.

The hamburger menu is implemented directly within the TopBar component based on the Popover component and API.

Screen.Recording.2026-04-22.at.17.05.36.mov

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 20, 2026

Dependency Compatibility Matrix

React Emotion TypeScript RAC Typecheck Unit E2E Build Overall
17 11.11.4 ~5.0 1.13.0 ok ok ok ok
17 11.11.4 ~5.0 1.17.0 ok ok ok ok
17 11.11.4 ~5.1 1.13.0 ok ok ok ok
17 11.11.4 ~5.1 1.17.0 ok ok ok ok
17 11.11.4 ~5.9 1.13.0 ok ok ok ok
17 11.11.4 ~5.9 1.17.0 ok ok ok ok
17 11.14.0 ~5.0 1.13.0 ok ok ok ok
17 11.14.0 ~5.1 1.13.0 ok ok ok ok
17 11.14.0 ~5.1 1.17.0 ok ok ok ok
17 11.14.0 ~5.9 1.13.0 ok ok ok ok
17 11.14.0 ~5.9 1.17.0 ok ok ok ok
18 11.11.4 ~5.0 1.13.0 ok ok ok ok
18 11.11.4 ~5.0 1.17.0 ok ok ok ok
18 11.11.4 ~5.1 1.13.0 ok ok ok ok
18 11.11.4 ~5.1 1.17.0 ok ok ok ok
18 11.11.4 ~5.9 1.13.0 ok ok ok ok
18 11.11.4 ~5.9 1.17.0 ok ok ok ok
18 11.14.0 ~5.0 1.13.0 ok ok ok ok
18 11.14.0 ~5.0 1.17.0 ok ok ok ok
18 11.14.0 ~5.1 1.13.0 ok ok ok ok
18 11.14.0 ~5.1 1.17.0 ok ok ok ok
18 11.14.0 ~5.9 1.13.0 ok ok ok ok
18 11.14.0 ~5.9 1.17.0 ok ok ok ok
19 11.14.0 ~5.0 1.13.0 ok ok ok ok
19 11.14.0 ~5.0 1.17.0 ok ok ok ok
19 11.14.0 ~5.1 1.13.0 ok ok ok ok
19 11.14.0 ~5.1 1.17.0 ok ok ok ok
19 11.14.0 ~5.9 1.13.0 ok ok ok ok
19 11.14.0 ~5.9 1.17.0 ok ok ok ok

Columns show granular outcomes for each dependency set: ok = passed, fail = failed, skip = upstream failure prevented running later stages. Overall: ✅ all passed, ⚠️ only skips (no hard fails), ❌ at least one fail.
Last updated: 2026-04-22T21:48:00.172Z (commit 9b0b984)

@coldlink coldlink added the feature Departmental tracking: work on a new feature label Apr 21, 2026
@coldlink coldlink force-pushed the mm/responsive-top-bar branch 4 times, most recently from a129c79 to 5fa8ec9 Compare April 22, 2026 15:17
@coldlink coldlink requested a review from Copilot April 22, 2026 15:40
@coldlink coldlink force-pushed the mm/responsive-top-bar branch from 5fa8ec9 to ec94a3d Compare April 22, 2026 15:42
@coldlink coldlink marked this pull request as ready for review April 22, 2026 15:44
@coldlink coldlink requested a review from a team as a code owner April 22, 2026 15:44
@coldlink coldlink added the run_chromatic Run the chromatic/storybook action. label Apr 22, 2026
Copy link
Copy Markdown

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

Adds semantic breakpoint tokens + a media-query helper API, and updates the TopBar component to support responsive “collapsed” behavior with a hamburger menu + updated token-driven styling.

Changes:

  • Introduces semanticBreakpoints tokens (TS + CSS vars) and from/until/between media query helpers (with tests and Storybook docs).
  • Updates TopBar tokens + component implementation to support collapsing tool name + left container into a popover menu below a breakpoint.
  • Expands Storybook/MDX documentation and examples for breakpoints and the responsive TopBar behavior.

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/utils.ts Re-exports the new media-query helpers from the public utils entrypoint.
src/util/useRezise.ts Adds a debounced resize hook used to close the collapsed TopBar menu on viewport changes.
src/styleD/utils/semantic/mq.ts Implements from/until/between breakpoint-to-media-query helpers.
src/styleD/utils/semantic/mq.test.ts Adds unit tests validating generated query strings.
src/styleD/tokens/foundations/local.json Adds semantic breakpoint tokens to Style Dictionary source.
src/styleD/tokens/component/topBarToolName.json Adds “collapsed” styling tokens for the tool name hover link.
src/styleD/tokens/component/topBarNavigation.json Adds _menuOpen styling tokens for navigation items when rendered in the collapsed menu.
src/styleD/tokens/component/topBar.json Adjusts TopBar layout tokens and adds collapsed menu/spacer tokens.
src/styleD/stories/semantic/Breakpoints.tsx Adds a Storybook demo page for breakpoint tokens and the mq helper API.
src/styleD/stories/semantic/Breakpoints.stories.tsx Registers Breakpoints stories (tokens + demos).
src/styleD/stories/semantic/Breakpoints.mdx Documents how to use from/until/between and raw breakpoint tokens.
src/styleD/config.js Adds the breakpoints semantic token group to the build config.
src/styleD/build/typescript/semantic/breakpoints.ts Generated TS artifact exporting semanticBreakpoints.
src/styleD/build/typescript/component/TopBar.ts Generated TS artifact reflecting new TopBar token structure.
src/styleD/build/css/semantic/breakpoints.css Generated CSS vars for semantic breakpoints.
src/styleD/build/css/component/TopBar.css Generated CSS vars for updated TopBar tokens.
src/index.ts Exports semanticBreakpoints from the package root.
src/components/topbar/types.ts Adds collapseBelow prop to configure TopBar responsive collapse behavior.
src/components/topbar/topBarToolName/types.ts Adds collapseBelow + collapsedHoverText props for tool-name collapsing behavior.
src/components/topbar/topBarToolName/styles.ts Applies breakpoint-driven styles for collapsed tool-name layout/label behavior.
src/components/topbar/topBarToolName/TopBarToolName.tsx Implements collapsed rendering of hover text and hides expanded content below breakpoint.
src/components/topbar/topBarToolName/TopBarToolName.stories.tsx Updates story to demonstrate collapsedHoverText.
src/components/topbar/topBarNavigation/types.ts Adds internal _menuOpen prop to drive collapsed-menu styling.
src/components/topbar/topBarNavigation/styles.ts Adds alternate styling for _menuOpen navigation rendering.
src/components/topbar/topBarNavigation/TopBarNavigation.tsx Plumbs _menuOpen through and tweaks Menu popover placement/size for collapsed menu.
src/components/topbar/topBarNavigation/TopBarNavigation.stories.tsx Adds story rows for _menuOpen styling states.
src/components/topbar/topBarItem/types.ts Allows passing HTML div attributes through and adds internal _menuOpen prop.
src/components/topbar/topBarItem/styles.ts Adds alternate _menuOpen styling for collapsed-menu rendering.
src/components/topbar/topBarItem/TopBarItem.tsx Plumbs _menuOpen through to styling.
src/components/topbar/styles.ts Adds breakpoint-driven container styles and collapsed menu button/popover styles.
src/components/topbar/TopBar.tsx Implements responsive collapse for left container into a popover menu; supports more avatar types.
src/components/topbar/TopBar.stories.tsx Adds a more complex responsive TopBar example including menu navigation.
src/components/topbar/TopBar.mdx Documents new collapseBelow prop and responsive collapsed-menu behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/styleD/build/css/semantic/breakpoints.css Outdated
Comment thread src/styleD/stories/semantic/Breakpoints.tsx
Comment thread src/components/topbar/TopBar.tsx
Comment thread src/components/topbar/TopBar.tsx
Comment thread src/util/useResize.ts
Comment thread src/util/useResize.ts
Comment thread src/styleD/utils/semantic/mq.ts
Comment thread src/styleD/tokens/foundations/local.json Outdated
@coldlink coldlink force-pushed the mm/responsive-top-bar branch from 53a6344 to a38cd01 Compare April 22, 2026 16:16
* Making this value much smaller than `1px` prevents
* media queries falling between entire pixel values.
*/
const smidgen = 0.1;
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.

Love this choice of name

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

@andrewHEguardian andrewHEguardian left a comment

Choose a reason for hiding this comment

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

This is brilliant 👏 the top bar looks great

@coldlink coldlink merged commit 4e7bc4d into main Apr 23, 2026
49 checks passed
@coldlink coldlink deleted the mm/responsive-top-bar branch April 23, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature run_chromatic Run the chromatic/storybook action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants