Skip to content

refactor(Button): use design tokens#6916

Merged
snorrekim merged 24 commits intov11from
feat/button-tokens
Mar 24, 2026
Merged

refactor(Button): use design tokens#6916
snorrekim merged 24 commits intov11from
feat/button-tokens

Conversation

@snorrekim
Copy link
Copy Markdown
Contributor

@snorrekim snorrekim commented Mar 4, 2026

  • Use tokens in Button
  • Add Carnegie theme
  • Use new selected prop for icon button styling in HelpButton and DatePicker instead of custom styling.
  • Use status="error" in Number instead of custom styling.
  • Update styles for Autocomplete, DatePicker, Dropdown, HelpButton, Input, Pagination, Popover, Slider, Table, ToggleButton

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented Mar 4, 2026

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

Branch Preview URL (stable):
https://feat-button-tokens.eufemia-e25.pages.dev

https://feat-button-tokens.eufemia-e25.pages.dev

Deployment URL (unique):
https://0c74d96b.eufemia-e25.pages.dev

https://0c74d96b.eufemia-e25.pages.dev

Copy link
Copy Markdown
Contributor

@langz langz left a comment

Choose a reason for hiding this comment

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

Looking great 👍

@langz
Copy link
Copy Markdown
Contributor

langz commented Mar 4, 2026

How can one verify that the correct tokens are used?
Like is the --token-color-component-button-* used here?

@snorrekim snorrekim force-pushed the feat/button-tokens branch from f61b9d5 to eec540c Compare March 13, 2026 17:42
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 13, 2026

commit: 4c5deb7

Comment thread packages/dnb-eufemia/src/components/button/style/dnb-button.scss Outdated
Comment thread packages/dnb-eufemia/src/components/button/style/dnb-button.scss Outdated
Comment thread packages/dnb-eufemia/src/components/button/style/dnb-button.scss
Comment thread packages/dnb-eufemia/src/components/button/style/dnb-button.scss
Comment thread packages/dnb-eufemia/src/components/button/style/dnb-button.scss
@langz
Copy link
Copy Markdown
Contributor

langz commented Mar 16, 2026

@snorrekim, I did rebase with v11 and fixed this conflict deee171

Please be aware 🙏

@snorrekim snorrekim force-pushed the feat/button-tokens branch from deee171 to 3a99ea8 Compare March 16, 2026 10:47
@langz langz force-pushed the feat/button-tokens branch from 3a99ea8 to 77f7906 Compare March 16, 2026 13:40
@langz
Copy link
Copy Markdown
Contributor

langz commented Mar 16, 2026

I did a new rebase now 🙏

@snorrekim snorrekim force-pushed the feat/button-tokens branch 2 times, most recently from 6bfd466 to f487e43 Compare March 17, 2026 17:01
@langz
Copy link
Copy Markdown
Contributor

langz commented Mar 17, 2026

I saw there was more conflicts now.

image

I've done a new rebase with latest of v11 branch.

@langz langz force-pushed the feat/button-tokens branch from f487e43 to b67521e Compare March 17, 2026 21:17
@snorrekim snorrekim force-pushed the feat/button-tokens branch 2 times, most recently from 740de14 to ba07d3b Compare March 18, 2026 16:39
Comment thread packages/dnb-eufemia/src/components/help-button/style/dnb-help-button-inline.scss Outdated
@snorrekim snorrekim force-pushed the feat/button-tokens branch 5 times, most recently from 7b3ebe6 to 2eada50 Compare March 23, 2026 14:53
@langz
Copy link
Copy Markdown
Contributor

langz commented Mar 23, 2026

🚀

@snorrekim snorrekim force-pushed the feat/button-tokens branch from 9c14e72 to 2df1d02 Compare March 23, 2026 17:49
@snorrekim snorrekim force-pushed the feat/button-tokens branch from fb18f69 to 4c5deb7 Compare March 24, 2026 11:30
@snorrekim snorrekim marked this pull request as ready for review March 24, 2026 11:44
@snorrekim
Copy link
Copy Markdown
Contributor Author

I've added the following to the Carnegie slack document:

Tasks for future PRs:

.dnb-button--on-dark-background should be deprecated
should allow to set surface and deprecate darkBackground
should be renamed to
variant="signal" should be perhaps be deprecated
Add Carnegie badge to ready components in Portal side-menu.
remove on-dark-background classes
Thoughts:

Should input buttons be defined in button (.dnb-button__input-button) or input (.dnb-input__submit-button__button)? We should pick one.
Button has a lot of mixins that are no longer used by it, but it used by other components. We should figure out a strategy for gradually removing or refactoring them.
Unify design for hover/focus/active vs error status and input-button.
Should we remove empty theme files (Pagination)
Secondary button sometimes have transparency as background color. --btn-color-bg--disabled: transparent; or tokens with opacity. And that might not be the best for accessibility.

@snorrekim snorrekim merged commit 0193d95 into v11 Mar 24, 2026
11 checks passed
@snorrekim snorrekim deleted the feat/button-tokens branch March 24, 2026 12:26
langz pushed a commit that referenced this pull request Mar 25, 2026
- Use tokens in Button
- Add Carnegie theme
- Use new `selected` prop for icon button styling in `HelpButton` and
`DatePicker` instead of custom styling.
- Use `status="error"` in `Number` instead of custom styling.
- Update styles for Autocomplete, DatePicker, Dropdown, HelpButton,
Input, Pagination, Popover, Slider, Table, ToggleButton
tujoworker pushed a commit that referenced this pull request Apr 5, 2026
- Use tokens in Button
- Add Carnegie theme
- Use new `selected` prop for icon button styling in `HelpButton` and
`DatePicker` instead of custom styling.
- Use `status="error"` in `Number` instead of custom styling.
- Update styles for Autocomplete, DatePicker, Dropdown, HelpButton,
Input, Pagination, Popover, Slider, Table, ToggleButton
tujoworker pushed a commit that referenced this pull request Apr 5, 2026
- Use tokens in Button
- Add Carnegie theme
- Use new `selected` prop for icon button styling in `HelpButton` and
`DatePicker` instead of custom styling.
- Use `status="error"` in `Number` instead of custom styling.
- Update styles for Autocomplete, DatePicker, Dropdown, HelpButton,
Input, Pagination, Popover, Slider, Table, ToggleButton
tujoworker pushed a commit that referenced this pull request Apr 5, 2026
- Use tokens in Button
- Add Carnegie theme
- Use new `selected` prop for icon button styling in `HelpButton` and
`DatePicker` instead of custom styling.
- Use `status="error"` in `Number` instead of custom styling.
- Update styles for Autocomplete, DatePicker, Dropdown, HelpButton,
Input, Pagination, Popover, Slider, Table, ToggleButton
tujoworker pushed a commit that referenced this pull request Apr 6, 2026
- Use tokens in Button
- Add Carnegie theme
- Use new `selected` prop for icon button styling in `HelpButton` and
`DatePicker` instead of custom styling.
- Use `status="error"` in `Number` instead of custom styling.
- Update styles for Autocomplete, DatePicker, Dropdown, HelpButton,
Input, Pagination, Popover, Slider, Table, ToggleButton
tujoworker pushed a commit that referenced this pull request Apr 6, 2026
- Use tokens in Button
- Add Carnegie theme
- Use new `selected` prop for icon button styling in `HelpButton` and
`DatePicker` instead of custom styling.
- Use `status="error"` in `Number` instead of custom styling.
- Update styles for Autocomplete, DatePicker, Dropdown, HelpButton,
Input, Pagination, Popover, Slider, Table, ToggleButton
tujoworker pushed a commit that referenced this pull request Apr 6, 2026
- Use tokens in Button
- Add Carnegie theme
- Use new `selected` prop for icon button styling in `HelpButton` and
`DatePicker` instead of custom styling.
- Use `status="error"` in `Number` instead of custom styling.
- Update styles for Autocomplete, DatePicker, Dropdown, HelpButton,
Input, Pagination, Popover, Slider, Table, ToggleButton
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.

2 participants