Skip to content

feat(design): align docs design system with mergify.com + dashboard#11335

Open
jd wants to merge 1 commit intomainfrom
devs/jd/worktree-design/align-docs-design-system-mergify-com-dashboard--6c7e207e
Open

feat(design): align docs design system with mergify.com + dashboard#11335
jd wants to merge 1 commit intomainfrom
devs/jd/worktree-design/align-docs-design-system-mergify-com-dashboard--6c7e207e

Conversation

@jd
Copy link
Copy Markdown
Member

@jd jd commented Apr 30, 2026

Establishes a three-layer CSS token system, drops three legacy
primitive systems, and adds typography utility classes documented in
a new DESIGN.md at the repo root.

The docs site had drifted away from the rest of Mergify's design
system: hex literals for section accents that happened to match the
canonical product palette by coincidence rather than by token, three
parallel color systems in theme.css (HSLA --color-base-, hex
--color-mergify-
, --chakra-colors-*), no typography utilities, and
no DESIGN.md. New customers arriving from mergify.com saw a different
visual language. This change makes the docs site read as part of the
same product family.

Token system

  • src/styles/tokens.css (new) defines the primitive layer: a clean
    gray ramp (gray-50..900, no duplicates) and the product palette
    verbatim from mergify.com (teal/purple/orange/blue/coral/rose at
    400 and 700, plus blue-800 for link hover).
  • src/styles/theme.css now has only the semantic layer
    (--theme-text, --theme-bg, --theme-link, etc.), with light and
    dark blocks each remapping the same set of names. Components
    consume only the semantic layer.
  • The Chakra block, the --color-mergify-blue* family, and the HSLA
    --color-base-* / lightness-suffix --color-{gray,blue,green,...}
    ramps are gone. Legacy --theme-text-light / --theme-text-lighter
    aliases are gone too.

Typography

  • src/styles/typography.css (new) defines utility classes
    heading-hero / heading-page / heading-section / heading-subsection
    / heading-detail / heading-minor / text-subtitle / text-eyebrow.
  • MDX content auto-applies the same property set via the
    #main-content h1..h6 rules in index.css.
  • The homepage migrates to utility classes (heading-hero,
    text-subtitle, heading-section).

Section accents

  • The per-section ToC and sidebar styling block (~150 lines of
    per-product duplication in index.css) collapses to a single
    tokenized rule consuming var(--section-accent) and
    var(--section-accent-bg). Each body.section-* class sets the two
    custom properties from the product palette.
  • AcademyCallout, the merge-queue stat cards, and the changelog page
    now reference product palette tokens directly since they are
    intrinsically about a specific product.

Consumer migrations (Chakra → semantic, mergify-blue → semantic)

  • 30+ files migrated across components/, pages/, styles/, and
    astro.config.ts. Notable refactors:
    • Button.astro: SCSS Chakra-ramp interpolation replaced with an
      explicit blue scheme. The other product/Chakra schemes were
      dead code (only colorScheme="blue" had callers) so they were
      dropped. Remaining hex literals in primary/secondary blocks are
      out of scope for this pass.
    • Aside.astro: dynamic HSLA color computation replaced with
      explicit product palette tokens per callout type (note=blue,
      tip=teal, caution=orange, danger=coral).
    • api-reference.css: response-code badges (2xx/3xx/4xx/5xx)
      migrated to color-mix() with product palette. Method badges
      keep their pre-existing hex literals (no clean palette mapping).
    • Search.scss: hex search-highlight mark color replaced with
      var(--theme-link), already mode-aware.
  • Inline code drops the magenta accent — neutral text on a tinted
    background distinguishes inline code via mono font + tint alone.

Documentation and tooling

  • DESIGN.md at the repo root documents the full system: token
    vocabulary, product accents, dark mode mechanism, typography
    utilities, voice (informational + on-voice for docs prose,
    contrasted with marketing's "fun + arrogant"), and a STRICT code
    rules section that future agents must follow.
  • AGENTS.md and CLAUDE.md gained a Design System section pointing
    at DESIGN.md as the source of truth.
  • HeadCommon.astro loads the new CSS files in the correct cascade
    order (tokens → theme → typography → index).
  • eslint.config.js scopes the MDX remark plugin to **/*.mdx only,
    preventing remark-lint from running on root-level *.md files like
    DESIGN.md and AGENTS.md.

Visual diff is small in light mode (1-2 hex points on neutrals) and
near-zero in dark mode. The docs reading experience is unchanged.

Copilot AI review requested due to automatic review settings April 30, 2026 09:34
@jd
Copy link
Copy Markdown
Member Author

jd commented Apr 30, 2026

This pull request is part of a Mergify stack:

# Pull Request Link
1 feat(design): align docs design system with mergify.com + dashboard #11335 👈
2 fix(layout): redesign navbar for light-mode readability #11336

@mergify mergify Bot had a problem deploying to Mergify Merge Protections April 30, 2026 09:34 Failure
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Apr 30, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 🤖 Continuous Integration

Waiting for:

  • check-success = build
  • check-success = lint
  • check-success = test
  • any of:
    • check-success = test-broken-links
    • label = ignore-broken-links
This rule is failing.
  • all of:
    • check-success = build
    • check-success = lint
    • check-success = test
    • any of:
      • check-success = test-broken-links
      • label = ignore-broken-links
    • any of:
      • check-success=Cloudflare Pages
      • -head-repo-full-name~=^Mergifyio/

🔴 👀 Review Requirements

Waiting for:

  • #approved-reviews-by >= 2
This rule is failing.
  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • author = mergify-ci-bot

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

@mergify mergify Bot requested a review from a team April 30, 2026 09:36
sileht
sileht previously approved these changes Apr 30, 2026
@mergify mergify Bot requested a review from a team April 30, 2026 09:40
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

Aligns the docs site styling with Mergify’s broader design system by introducing a layered token model (primitive → semantic → section accents), standardizing typography utilities, and migrating consumers off legacy Chakra/HSLA/mergify-blue variables.

Changes:

  • Added new primitive token and typography utility CSS, and updated global CSS load order to establish a predictable cascade.
  • Refactored theme.css to a semantic-only token layer (with dark-mode remaps) and migrated many components/pages to semantic tokens.
  • Introduced DESIGN.md (+ agent docs pointers) and adjusted ESLint MDX scoping to avoid linting root *.md.

Reviewed changes

Copilot reviewed 45 out of 45 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/styles/typography.css Adds heading/typography utility classes for custom pages.
src/styles/tokens.css Introduces primitive color tokens (neutral ramp + product palette).
src/styles/theme.css Rebuilds theme into semantic tokens with a dedicated dark-mode remap block.
src/styles/index.css Migrates globals to semantic tokens; adds tokenized section-accent system; syncs MDX heading styles.
src/styles/api-reference.css Migrates API reference styling to semantic tokens + product palette via color-mix().
src/pages/changelog/index.astro Migrates changelog page styling off Chakra variables; tokenizes pills/tags.
src/pages/changelog/[slug].astro Migrates changelog entry page styling to semantic tokens.
src/pages/404.astro Migrates 404 page colors to semantic tokens.
src/content/docs/merge-queue.mdx Updates inline styles to new palette/semantic tokens.
src/content/docs/index.mdx Updates homepage MDX to typography utilities (heading-*, text-*).
src/components/Search/SearchBar.tsx Migrates search UI text colors to semantic tokens.
src/components/Search/Search.scss Tokenizes highlight and active-row styling; removes redundant dark override.
src/components/Search/Search.astro Migrates search button styling to divider/muted semantic tokens.
src/components/Search/Results.tsx Migrates results text colors to semantic tokens.
src/components/ScrollToTop.astro Migrates scroll-to-top button colors/focus styles to semantic tokens.
src/components/RightSidebar/TableOfContents.css Migrates ToC toggle icon colors to semantic tokens.
src/components/PageMeta.astro Migrates PageMeta colors/hover link to semantic tokens.
src/components/PageFeedback.astro Migrates PageFeedback colors/focus/selected state to semantic tokens.
src/components/PageContent/PageContent.astro Migrates divider/scope colors to semantic tokens.
src/components/Modal/Modal.css Migrates modal close color to semantic token.
src/components/MergeQueueCalculator/Stat.tsx Migrates calculator text/indicator defaults to semantic tokens.
src/components/MergeQueueCalculator/SliderInput.tsx Migrates slider label value color to semantic token.
src/components/MergeQueueCalculator/MergeQueueCalculator.tsx Updates calculator container border token usage.
src/components/MergeQueueCalculator/MergeQueueCalculator.scss Migrates calculator input/stepper styling tokens.
src/components/MergeQueueCalculator/LogSliderInput.tsx Migrates log slider value color to semantic token.
src/components/LeftSidebar/NavLink.astro Migrates sidebar icon/link colors to semantic tokens.
src/components/LeftSidebar/NavGroup.astro Migrates sidebar icon color and dark active-link color to tokens.
src/components/Header/ThemeToggleButton.css Migrates toggle checked state color to semantic tokens.
src/components/Header/SidebarToggle.css Migrates mobile toggle base color to semantic divider token.
src/components/Header/HeaderLink.astro Migrates header link/button text color to semantic token.
src/components/Header/HeaderButton.css Migrates header button CSS vars to semantic tokens.
src/components/HeadCommon.astro Ensures CSS is imported in the intended cascade order (tokens → theme → typography → index).
src/components/Footer/Footer.astro Migrates footer link color to semantic token.
src/components/DocsetGrid/Docset.astro Migrates docset card border to semantic border token.
src/components/CopyForLLMButton.astro Migrates toolbar button styling to semantic tokens.
src/components/CommunityButton.astro Migrates hover background to semantic offset surface token.
src/components/Button.astro Drops unused Chakra colorScheme support; adds explicit blue scheme styling.
src/components/Breadcrumbs.astro Migrates breadcrumb colors to semantic tokens.
src/components/Badge/Badge.css Migrates badge background/text to product palette tokens via color-mix().
src/components/Aside.astro Replaces HSLA-derived callout colors with explicit palette token mapping per type.
src/components/AcademyCallout.astro Migrates AcademyCallout accent styling to product palette tokens.
eslint.config.js Restricts MDX linting to **/*.mdx and adds .claude/** to ignores.
astro.config.ts Updates style overrides to semantic tokens (border/link/focus/etc.).
DESIGN.md Adds design-system documentation for tokens, typography, dark mode, and rules.
AGENTS.md Adds a design-system pointer and summarizes key styling rules.

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

Comment thread src/styles/tokens.css
Comment thread AGENTS.md Outdated
Comment thread src/components/Button.astro
Comment thread src/components/MergeQueueCalculator/MergeQueueCalculator.tsx Outdated
Comment thread src/components/MergeQueueCalculator/MergeQueueCalculator.scss
Comment thread DESIGN.md Outdated
Comment thread src/pages/changelog/index.astro Outdated
Comment thread src/components/MergeQueueCalculator/MergeQueueCalculator.scss
Comment thread src/components/MergeQueueCalculator/MergeQueueCalculator.scss
@jd jd marked this pull request as ready for review April 30, 2026 11:52
Establishes a three-layer CSS token system, drops three legacy
primitive systems, and adds typography utility classes documented in
a new DESIGN.md at the repo root.

The docs site had drifted away from the rest of Mergify's design
system: hex literals for section accents that happened to match the
canonical product palette by coincidence rather than by token, three
parallel color systems in theme.css (HSLA --color-base-*, hex
--color-mergify-*, --chakra-colors-*), no typography utilities, and
no DESIGN.md. New customers arriving from mergify.com saw a different
visual language. This change makes the docs site read as part of the
same product family.

Token system

- src/styles/tokens.css (new) defines the primitive layer: a clean
  gray ramp (gray-50..900, no duplicates) and the product palette
  verbatim from mergify.com (teal/purple/orange/blue/coral/rose at
  400 and 700, plus blue-800 for link hover).
- src/styles/theme.css now has only the semantic layer
  (--theme-text, --theme-bg, --theme-link, etc.), with light and
  dark blocks each remapping the same set of names. Components
  consume only the semantic layer.
- The Chakra block, the --color-mergify-blue* family, and the HSLA
  --color-base-* / lightness-suffix --color-{gray,blue,green,...}
  ramps are gone. Legacy --theme-text-light / --theme-text-lighter
  aliases are gone too.

Typography

- src/styles/typography.css (new) defines utility classes
  heading-hero / heading-page / heading-section / heading-subsection
  / heading-detail / heading-minor / text-subtitle / text-eyebrow.
- MDX content auto-applies the same property set via the
  #main-content h1..h6 rules in index.css.
- The homepage migrates to utility classes (heading-hero,
  text-subtitle, heading-section).

Section accents

- The per-section ToC and sidebar styling block (~150 lines of
  per-product duplication in index.css) collapses to a single
  tokenized rule consuming var(--section-accent) and
  var(--section-accent-bg). Each body.section-* class sets the two
  custom properties from the product palette.
- AcademyCallout, the merge-queue stat cards, and the changelog page
  now reference product palette tokens directly since they are
  intrinsically about a specific product.

Consumer migrations (Chakra → semantic, mergify-blue → semantic)

- 30+ files migrated across components/, pages/, styles/, and
  astro.config.ts. Notable refactors:
  - Button.astro: SCSS Chakra-ramp interpolation replaced with an
    explicit blue scheme. The other product/Chakra schemes were
    dead code (only colorScheme="blue" had callers) so they were
    dropped. Remaining hex literals in primary/secondary blocks are
    out of scope for this pass.
  - Aside.astro: dynamic HSLA color computation replaced with
    explicit product palette tokens per callout type (note=blue,
    tip=teal, caution=orange, danger=coral).
  - api-reference.css: response-code badges (2xx/3xx/4xx/5xx)
    migrated to color-mix() with product palette. Method badges
    keep their pre-existing hex literals (no clean palette mapping).
  - Search.scss: hex search-highlight mark color replaced with
    var(--theme-link), already mode-aware.
- Inline code drops the magenta accent — neutral text on a tinted
  background distinguishes inline code via mono font + tint alone.

Documentation and tooling

- DESIGN.md at the repo root documents the full system: token
  vocabulary, product accents, dark mode mechanism, typography
  utilities, voice (informational + on-voice for docs prose,
  contrasted with marketing's "fun + arrogant"), and a STRICT code
  rules section that future agents must follow.
- AGENTS.md and CLAUDE.md gained a Design System section pointing
  at DESIGN.md as the source of truth.
- HeadCommon.astro loads the new CSS files in the correct cascade
  order (tokens → theme → typography → index).
- eslint.config.js scopes the MDX remark plugin to **/*.mdx only,
  preventing remark-lint from running on root-level *.md files like
  DESIGN.md and AGENTS.md.

Visual diff is small in light mode (1-2 hex points on neutrals) and
near-zero in dark mode. The docs reading experience is unchanged.

Change-Id: I6c7e207efdaca8e63f2254d7aaeb9e656c50e138
@jd jd force-pushed the devs/jd/worktree-design/align-docs-design-system-mergify-com-dashboard--6c7e207e branch from 92a02fa to 322d043 Compare April 30, 2026 12:07
@jd
Copy link
Copy Markdown
Member Author

jd commented Apr 30, 2026

Revision history

# Type Changes Reason Date
1 initial 92a02fa 2026-04-30 12:07 UTC
2 content 92a02fa → 322d043 2026-04-30 12:07 UTC

@mergify mergify Bot dismissed sileht’s stale review April 30, 2026 12:07

Pull request has been modified.

@mergify mergify Bot had a problem deploying to Mergify Merge Protections April 30, 2026 12:07 Failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants