Skip to content

fix(#3397): use existing design tokens in Astro docs#3515

Merged
chrisolsen merged 1 commit intodevfrom
bdfranck/3397
Mar 10, 2026
Merged

fix(#3397): use existing design tokens in Astro docs#3515
chrisolsen merged 1 commit intodevfrom
bdfranck/3397

Conversation

@bdfranck
Copy link
Collaborator

@bdfranck bdfranck commented Mar 3, 2026

Before (the change)

The Astro layouts and components for our v2 Docs used custom design tokens that overwrote some existing ones.

After (the change)

The Astro layouts and components for our v2 Docs uses existing design tokens.

Make sure that you've checked the boxes below before you submit the PR

  • I have read and followed the setup steps
  • I have created necessary unit tests
  • I have tested the functionality in both React and Angular.

Steps needed to test

@netlify
Copy link

netlify bot commented Mar 3, 2026

Deploy Preview for goa-design-2 ready!

Name Link
🔨 Latest commit 9ffaf97
🔍 Latest deploy log https://app.netlify.com/projects/goa-design-2/deploys/69af46efb7b99d0008f11c9a
😎 Deploy Preview https://deploy-preview-3515--goa-design-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@bdfranck bdfranck marked this pull request as ready for review March 3, 2026 22:25
@bdfranck bdfranck requested a review from Copilot March 3, 2026 22:25
Copy link
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

Updates the v2 docs’ Astro base layout to stop redefining GoA design-token CSS variables inline and instead rely on the shared design token styles already imported into the layout.

Changes:

  • Removed the custom :root design token overrides from BaseLayout.astro.
  • Switched global base styles (body/headings/links/focus) to reference existing GoA design tokens.

@bdfranck bdfranck marked this pull request as draft March 4, 2026 15:18
@bdfranck bdfranck marked this pull request as ready for review March 4, 2026 15:34
twjeffery

This comment was marked as off-topic.

@twjeffery twjeffery self-requested a review March 4, 2026 15:56
Copy link
Collaborator

@twjeffery twjeffery left a comment

Choose a reason for hiding this comment

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

Looks good @bdfranck . A few things I noticed that we should address:

  1. Other files still use the removed custom properties

Most of the removed :root properties were duplicates of real V2 tokens (--goa-color-text-secondary, --goa-space-*, etc.) so those will keep working fine. But a few were not real V2 tokens, and other files still reference them:

  • ExampleCard.astro uses --goa-color-border, --goa-color-background-light, --goa-color-brand, --goa-radius-s/m
  • ComponentSandbox.tsx uses --goa-color-border, --goa-color-brand, --goa-radius-m (these have inline fallbacks so they won't break visually, but still worth migrating)
  • GuidanceGrid.astro uses --goa-color-background-light, --goa-radius-m

We should either keep those properties in :root for now, or update those files too. We can create a separate issue for migrating them if we want to keep this PR focused.

  1. Inline code loses its background

code background went from --goa-color-background-light (#f5f5f5, light grey) to --goa-color-greyscale-white (#fff). Since the page background is also white, inline code blocks won't have any visual distinction. Maybe something like --goa-color-greyscale-100 to keep the contrast?

  1. Mobile header hardcoded values

font-size: 18px, margin-left: -8px, background: white. Since we're already in this file, these should move to tokens too.

@bdfranck bdfranck marked this pull request as draft March 4, 2026 18:54
@bdfranck bdfranck changed the title fix(#3397): use existing design tokens in Astro base layout fix(#3397): use existing design tokens in Astro Mar 4, 2026
@bdfranck bdfranck changed the title fix(#3397): use existing design tokens in Astro fix(#3397): use existing design tokens in Astro docs Mar 4, 2026
@bdfranck bdfranck force-pushed the bdfranck/3397 branch 3 times, most recently from 1a76c0c to a3b32d1 Compare March 5, 2026 16:24
@bdfranck bdfranck marked this pull request as ready for review March 5, 2026 16:26
@bdfranck bdfranck requested a review from twjeffery March 5, 2026 16:26
@bdfranck
Copy link
Collaborator Author

bdfranck commented Mar 5, 2026

@twjeffery I've amended my commit with changes that address you above three comments.

Copy link
Collaborator

@vanessatran-ddi vanessatran-ddi left a comment

Choose a reason for hiding this comment

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

I have some comments about using a token instead of hard-code values

Copy link
Collaborator

@twjeffery twjeffery left a comment

Choose a reason for hiding this comment

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

@bdfranck Looks good, thanks for migrating the other files too. All the token names check out.

@bdfranck bdfranck force-pushed the bdfranck/3397 branch 2 times, most recently from 09641d2 to 47b2cb3 Compare March 9, 2026 21:56
Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>
@bdfranck
Copy link
Collaborator Author

bdfranck commented Mar 9, 2026

@vanessatran-ddi I've replaced the instances you mentioned and did a find and replace of similar ones.

@bdfranck bdfranck requested a review from vanessatran-ddi March 9, 2026 22:20
@chrisolsen chrisolsen merged commit 480661b into dev Mar 10, 2026
8 checks passed
@chrisolsen chrisolsen deleted the bdfranck/3397 branch March 10, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

V2 container body text styles not showing V2 text styling in Astro doc site

5 participants