Skip to content

[Visual Refresh][EuiButton] Add Refresh design update #1 #8595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: feat/button-visual-refresh
Choose a base branch
from

Conversation

mgadewoll
Copy link
Contributor

@mgadewoll mgadewoll commented Apr 15, 2025

Summary

Implements https://github.com/elastic/eui-private/issues/280

Important

This PR merged into a feature branch.
This is to allow for a more scoped review on parts of the updates as well as providing time for visual reviews before merging to main.

This PR adds the first part to implement the new button design. (figma)

Changes

  • adds theme flag buttonVariant to enable toggling between refresh and classic design variants
  • updates EuiProvider to support rebuilding the theme on theme flags change
  • adds utils isEuiThemeRefreshVariant and useEuiThemeRefreshVariant to enable in-code feature flagging
  • adds more button specific component tokens
  • updates backgroundLightText token value from shade130 to shade120
  • adds and updates transparent semantic color tokens (used for button hovers)
  • updates common (shared) button styles in _button.ts
    • updated min-width
    • updated hover and active states
    • removed animation on focus
    • updated color/border for base text button

Note

Focus style changes are not included. Those will be handled as standalone update (https://github.com/elastic/eui-private/issues/267).

Note

This PR only updates base button components. Related components like EuiButtonGroup or EuiFilterGroup etc will be updated in a separate PR.

Screenshots

ℹ️ Left: new; Right: previous

  • base EuiButton (primary)
Screen.Recording.2025-04-15.at.10.22.00.mov
  • base EuiButton (text)
Screen.Recording.2025-04-15.at.10.22.24.mov
  • filled EuiButton (primary)
Screen.Recording.2025-04-15.at.10.22.57.mov
  • EuiButtonEmpty
Screen.Recording.2025-04-15.at.10.24.27.mov
  • flush EuiButtonEmpty
Screen.Recording.2025-04-15.at.10.28.22.mov
  • empty EuiButtonIcon
Screen.Recording.2025-04-15.at.10.27.19.mov
  • base EuiButtonIcon
Screen.Recording.2025-04-15.at.10.27.44.mov
  • filled EuiButtonIcon
Screen.Recording.2025-04-15.at.10.27.33.mov
  • disabled
    Screenshot 2025-04-15 at 10 36 17

QA

ℹ️ Provided testing stories that display "refresh" and "classic" design variants next to each other:
EuiButton
EuiButtonEmpty
EuiButtonIcon

  • verify there is no visual regression for buttons in Amsterdam theme between staging and production
  • verify the refresh variant buttons look according to design specs
    (ℹ️ provided test stories have both "refresh" and "classic" variants displayed for easier review)

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in both MacOS and Windows high contrast modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately.
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)
  • Designer checklist
    • If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

@mgadewoll mgadewoll self-assigned this Apr 15, 2025
@mgadewoll mgadewoll force-pushed the button/280-visual-refresh-part-1 branch from 452a7b0 to e213698 Compare April 15, 2025 09:29
@mgadewoll mgadewoll requested review from acstll and ek-so April 15, 2025 09:33
@mgadewoll mgadewoll changed the title [Visual Refresh][EuiButton] Add Refresh design update [Visual Refresh][EuiButton] Add Refresh design update #1 Apr 15, 2025
@mgadewoll mgadewoll marked this pull request as ready for review April 15, 2025 10:27
@mgadewoll mgadewoll requested a review from a team as a code owner April 15, 2025 10:27
@mgadewoll mgadewoll force-pushed the button/280-visual-refresh-part-1 branch from e213698 to 075cc28 Compare April 15, 2025 12:59
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mgadewoll

@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mgadewoll

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