designsystemet icon indicating copy to clipboard operation
designsystemet copied to clipboard

chore(cli): add designsystemet theme

Open mimarz opened this issue 8 months ago • 5 comments

lay the groundwork for #3541

  • Default theme is called designsystemet
  • Edit config file packages/theme/configs/designsystemet.config.json for default theme.
  • Run pnpm update:theme to build new css and tokens for default theme.
  • Refactored some configs use in CLI
  • Fixed wrong quotation marks for @charset in css package
  • design-tokens later when we figure out how we want to handle Digdirs themes.
  • Theme is used in themebuilder, storybook and css as default theme.
  • design-tokens for theme are stored in internal/design-tokens for now, but can be move later depending on what we figure out to do with digdirs themes.

Default theme is currently exported under @digdir/designsystemet-theme/default, we will have to change main export at a later point when we decide how to move forward with this.

mimarz avatar May 07 '25 06:05 mimarz

🦋 Changeset detected

Latest commit: 4922d25cada01ab6480d7079bd2b90d76ea1dfba

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

This PR includes changesets to release 4 packages
Name Type
@digdir/designsystemet-css Patch
@digdir/designsystemet Patch
@digdir/designsystemet-react Patch
@digdir/designsystemet-theme Patch

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

changeset-bot[bot] avatar May 07 '25 06:05 changeset-bot[bot]

Preview deployments for this pull request:

Storybook - 20. May 2025 - 14:05

Theme - 20. May 2025 - 14:05

github-actions[bot] avatar May 07 '25 06:05 github-actions[bot]

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 49.12% 3311 / 6740
🔵 Statements 49.12% 3311 / 6740
🔵 Functions 83.26% 219 / 263
🔵 Branches 77.85% 580 / 745
File CoverageNo changed files found.
Generated in workflow #3159 for commit 4922d25 by the Vitest Coverage Report Action

github-actions[bot] avatar May 07 '25 06:05 github-actions[bot]

@digdir/designsystemet-css is now bundles with default theme...

I think it belongs in our theme package. It's not a big obstacle to install a secondary package to get colors. If we put it in the css package it's easy to get confused as to why we have a theme package at all.

You mention "Could potentially be opt-in with a different export", but if we just put it in the theme package we won't have to do any of this.

Should the default theme be called, default or designsystemet?

I vote for designsystemet

Barsnes avatar May 08 '25 06:05 Barsnes

@digdir/designsystemet-css is now bundles with default theme...

I think it belongs in our theme package. It's not a big obstacle to install a secondary package to get colors. If we put it in the css package it's easy to get confused as to why we have a theme package at all.

You mention "Could potentially be opt-in with a different export", but if we just put it in the theme package we won't have to do any of this.

Should the default theme be called, default or designsystemet?

I vote for designsystemet

yeah, I agree, I actually started refactoring it this morning for the theme and its config to be in @digdir/designsystemet-theme, felt much better.

mimarz avatar May 08 '25 06:05 mimarz

Code looks good, but we need to define the colors used in this theme before merging

Barsnes avatar May 13 '25 08:05 Barsnes