Skip to content

refactor: remove deprecated themes from kv-components and kv-tokens - #885

Merged
eddieferrer merged 3 commits into
mainfrom
CIT-4445_remove_deprecated_themes
Aug 28, 2026
Merged

refactor: remove deprecated themes from kv-components and kv-tokens#885
eddieferrer merged 3 commits into
mainfrom
CIT-4445_remove_deprecated_themes

Conversation

@eddieferrer

@eddieferrer eddieferrer commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Ticket: https://kiva.atlassian.net/browse/CIT-4445

Summary

  • Removes the deprecated stoneDark, mint, and dark theme options from KvCardFrame, KvDatePicker, KvTooltip, and KvSecondaryNav, leaving only the five approved design-system themes. KvSecondaryNav's dark was already a literal alias of greenDarkTheme, so greenDark is a drop-in.
  • Remaps KvCheckoutReceipt's tooltip from mint to ecoGreenLight, matching the equivalent tooltip in ui. Stories, MDX docs, and the Storybook dark-mode decorator drop the deprecated themes too.
  • Drops the stoneDarkTheme, darkTheme, mintTheme, darkGreenTheme, darkMintTheme, and darkStoneTheme exports from kv-tokens, then deletes the six underlying semantic theme token files so they no longer appear in the built js, css, or scss output.

Downstream cleanup is complete — this is unblocked

The kv-tokens export removal is a breaking change for any consumer importing those names. All consumers are now off them, so this is safe to merge and release:

dependency status
cms-page-server merged — kiva/cms-page-server#3264 (5bd3db865)
ui merged — kiva/ui#7199 (a9e6de8ff)
Contentful content migrated in development and master; storyCard.theme validation list trimmed

Contentful detail is on CIT-5073: 146 entries republished in development and 136 in master, zero deprecated theme values remaining in either environment, in any state. The retired values (kivaClassicMint, kivaClassicGreen, kivaClassicDark, kivaClassicDarkStone, ecoStoneDark) are no longer selectable by authors. imageCard was deliberately retained — it is a layout switch that StoryCard.vue keys CSS off, not a colour theme.

Both consumer repos still carry transitional mapper keys for the legacy Contentful values. Those are now dead code and will be removed in a follow-up, tracked on CIT-5073 — they do not block this PR.

Verification

  • kv-components: lint clean, full Jest suite passing (64 suites / 553 tests)
  • kv-tokens: lint clean, 21/21 node tests
  • After the token files were deleted and the package rebuilt, dist/js/tokens.js exposes exactly DEFAULT, green-dark, green-light, marigold-light, stone-light, and dist/css/tokens.css emits only the matching [data-theme] blocks
  • No build config changes were needed: Style Dictionary globs tokens/**/*.json and the kiva/css-themes format derives theme names from whatever it finds

One unrelated pre-existing failure worth noting: npm run build:make-kit fails in a clean checkout with ENOENT … @kiva/kv-tokens/docs/skills. That directory is not tracked in the repo, so the failure predates these commits, and the script is not part of build or prepare — publishing is unaffected.

Note on KvTooltip

KvTooltip's theme prop is replaced wholesale by CIT-4447 (two fixed light/dark variants, no KvThemeProvider). This change just gets it down to approved themes in the meantime.

@eddieferrer
eddieferrer marked this pull request as ready for review August 28, 2026 01:08
@eddieferrer
eddieferrer requested a review from a team August 28, 2026 01:12
Drops the stoneDark, mint, and dark theme options from KvCardFrame,
KvDatePicker, KvTooltip, and KvSecondaryNav, leaving only the five
approved design-system themes. KvSecondaryNav's dark was already a
literal alias of greenDarkTheme, so greenDark is a drop-in.

KvCheckoutReceipt's tooltip moves from mint to ecoGreenLight, matching
the equivalent tooltip in the ui repo. Stories, MDX docs, and the
Storybook dark-mode decorator drop the deprecated themes as well.

BREAKING CHANGE: the theme props no longer accept stoneDark, mint, or
dark. KvCardFrame and KvDatePicker drop stoneDark; KvTooltip drops
ecoStoneDark, mint, and dark; KvSecondaryNav drops dark. Use greenDark
in place of any dark variant and greenLight in place of mint.
Removes the stoneDarkTheme, darkTheme, mintTheme, darkGreenTheme,
darkMintTheme, and darkStoneTheme named exports along with their token
destructuring, leaving only the five approved design-system themes.

BREAKING CHANGE: kv-tokens no longer exports stoneDarkTheme, darkTheme,
mintTheme, darkGreenTheme, darkMintTheme, or darkStoneTheme. Importing
any of them fails to build. Map dark variants to greenDarkTheme and mint
to greenLightTheme.
Removes the mint, dark, dark-green, dark-mint, dark-stone, and stone-dark
semantic theme definitions. The build globs the themes directory and
derives theme names from it, so no build config changes were needed.

BREAKING CHANGE: the deprecated themes no longer appear in the built
token output. designTokens.colors.theme loses the mint, dark, dark-green,
dark-mint, dark-stone, and stone-dark keys, and the compiled CSS no
longer emits their [data-theme="..."] blocks. Consumers selecting those
themes via the data-theme attribute lose their styling.
@eddieferrer
eddieferrer force-pushed the CIT-4445_remove_deprecated_themes branch from df9e11c to da804f9 Compare August 28, 2026 16:28
@eddieferrer

Copy link
Copy Markdown
Collaborator Author

re added commits as breaking changes

@emuvente emuvente left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Awesome!

@eddieferrer
eddieferrer merged commit 02e2fec into main Aug 28, 2026
3 of 5 checks passed
@eddieferrer
eddieferrer deleted the CIT-4445_remove_deprecated_themes branch August 28, 2026 18:26
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.

3 participants