Skip to content

docs: new CSS variable/token preview tables#4395

Merged
mimarz merged 48 commits intomainfrom
move-tokens-preview-components
Feb 4, 2026
Merged

docs: new CSS variable/token preview tables#4395
mimarz merged 48 commits intomainfrom
move-tokens-preview-components

Conversation

@mimarz
Copy link
Copy Markdown
Collaborator

@mimarz mimarz commented Jan 13, 2026

resolves #4387
resolves #4362

After meeting on 27 jan we decided to hide the variables tab until we can dedicated more resources on designing it how we want in themebuilder. Still want to merge changes for future work

  • Changed default tab to be colorsystem
  • Renamed overview tab to be examples
  • Added new table for display tokens variables to @internal/components
    • These use preview tokens and have a toggle for preview visualisation of variable.
  • New tables are used in both www and themebuilder
  • Cleaned up a lot of code in themebuilder to make it more descriptive what components are used for and added missing layout for themebuilder page.
  • Removed "tokens" from www, all this code now live in @internal/components
  • Changed fallback port to 3001 on themebuilder so its possible to run both themebuilder an www at the same time locally. ( can move this to different PR if desirable)

Know bug/limitation:

  • border-radius variables does not update according to selected borde-radius-base in preview in themebuilder. Didn't get this to work properly, needs to be looked at closer in a different PR

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 13, 2026

🦋 Changeset detected

Latest commit: 2358ad9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 13, 2026

Preview deployments for this pull request:

storybook - 3. Feb 2026 - 17:16

themebuilder - 3. Feb 2026 - 17:16

www - 3. Feb 2026 - 17:22

@mimarz mimarz force-pushed the move-tokens-preview-components branch from 6dab7e8 to 2029404 Compare January 14, 2026 14:18
Comment thread internal/components/src/tokens/common.tsx Dismissed
@mimarz mimarz force-pushed the move-tokens-preview-components branch 2 times, most recently from da40de0 to 6597425 Compare January 20, 2026 07:28
@mimarz mimarz changed the title draft: CSS variables preview in Themebuilder docs: new CSS variable/token preview tables Jan 20, 2026
@mimarz mimarz force-pushed the move-tokens-preview-components branch 2 times, most recently from bd6facf to 412db5e Compare January 23, 2026 07:28
@mimarz mimarz marked this pull request as ready for review January 23, 2026 07:48
Comment thread apps/www/app/_components/mdx-components/mdx-components.tsx
@Barsnes
Copy link
Copy Markdown
Member

Barsnes commented Jan 26, 2026

Is there a reason why neutral and severity colors are not in the preview?
image

@mimarz mimarz force-pushed the move-tokens-preview-components branch from 49031db to f4d449c Compare January 26, 2026 13:03
@mimarz
Copy link
Copy Markdown
Collaborator Author

mimarz commented Jan 26, 2026

Is there a reason why neutral and severity colors are not in the preview? image

Forgot to add them. Fixed now :)

Comment thread apps/www/app/content/fundamentals/no/theme/variables.mdx Outdated
Copy link
Copy Markdown
Member

@Barsnes Barsnes left a comment

Choose a reason for hiding this comment

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

changing color in the select does not update the value in the select, so you can never select the first color anymore.

20260127-1223-32.2253565.mp4

@Barsnes
Copy link
Copy Markdown
Member

Barsnes commented Jan 27, 2026

changing color in the select does not update the value in the select, so you can never select the first color anymore.

It seems like token overrides is not respected either

Comment thread apps/themebuilder/app/_components/color-variables.tsx
Comment thread apps/themebuilder/app/_components/color-variables.tsx
@mimarz
Copy link
Copy Markdown
Collaborator Author

mimarz commented Jan 27, 2026

changing color in the select does not update the value in the select, so you can never select the first color anymore.

20260127-1223-32.2253565.mp4

Fixed this even though we decided to hide this tab for now :)

@mimarz mimarz force-pushed the move-tokens-preview-components branch from cb51e1f to 1871d2f Compare January 27, 2026 14:18
@mimarz mimarz requested review from Barsnes and oddvernes January 27, 2026 14:27
@Barsnes
Copy link
Copy Markdown
Member

Barsnes commented Jan 28, 2026

if a user goes to a url that has this in query: tab=overview, it needs to be chanegd to examples, otherwise we break thousands of URLs:
image

@mimarz
Copy link
Copy Markdown
Collaborator Author

mimarz commented Jan 28, 2026

if a user goes to a url that has this in query: tab=overview, it needs to be chanegd to examples, otherwise we break thousands of URLs: image

Good catch! I'll look into a fix.

@mimarz
Copy link
Copy Markdown
Collaborator Author

mimarz commented Jan 29, 2026

Should be fixed now @Barsnes , added a redirect if tab is overview to new default so that users get updated url when they keep sharing/saving it.

Copy link
Copy Markdown
Member

@Barsnes Barsnes left a comment

Choose a reason for hiding this comment

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

overview used to be the same tab as examples, so if a user comes with that tab, it should redirect to examples

Comment thread apps/themebuilder/app/routes/themebuilder/themebuilder.tsx Outdated
@mimarz mimarz requested a review from Barsnes February 3, 2026 09:09
@mimarz mimarz merged commit 850e9cc into main Feb 4, 2026
26 checks passed
@mimarz mimarz deleted the move-tokens-preview-components branch February 4, 2026 07:32
Barsnes added a commit that referenced this pull request Feb 4, 2026
commit 1741697
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed Feb 4 08:52:17 2026 +0100

    fix(deps): update npm non-major dependencies (#4445)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Oddbjørn Øvernes <oddbjorn.overnes@gmail.com>
    Co-authored-by: Michael Marszalek <mimarz@gmail.com>

commit 850e9cc
Author: Michael Marszalek <mimarz@gmail.com>
Date:   Wed Feb 4 08:32:54 2026 +0100

    docs: new CSS variable/token preview tables (#4395)

    Co-authored-by: Oddbjørn Øvernes <oddbjorn.overnes@gmail.com>

commit 6051733
Author: Marianne Røsvik <marianne.rosvik@digdir.no>
Date:   Wed Feb 4 08:08:36 2026 +0100

    docs: english version of required and optional form fields (#4459)

commit 7ea081e
Author: Frank Dahle <frankdahle@gmail.com>
Date:   Tue Feb 3 13:55:37 2026 +0100

    docs: fixed mispelling (#4462)

commit 0b03881
Author: stianmorsund <stian.rm@gmail.com>
Date:   Fri Jan 30 12:15:32 2026 +0100

    fix(www): broken redirects (#4457)

commit 7276fdb
Author: Oddbjørn Øvernes <oddbjorn.overnes@gmail.com>
Date:   Fri Jan 30 08:52:15 2026 +0100

    chore(www): add dpg-logo to footer (#4452)
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.

Move Variables preview components to @internal/components Move CSS variables listing to themebuilder

4 participants