Skip to content

Conversation

@jzempel
Copy link
Member

@jzempel jzempel commented Apr 10, 2024

Description

The main consumer-facing change is the replacement color and spacerColor parameters on the getFocusBoxShadow and focusStyles utilities. All other PR updates are internal and include:

  • component calls to focusStyles and getFocusBoxShadow (note these are meant to have parity in this PR – redesigned light/dark color treatment will happen later)
  • replacing theming package references to deprecated getColorV8 and PALETTE_V8
  • exporting utility type parameters

Detail

Temporary inspection of the object parameter ...args allows the functions to straddle between v8 and v9 usage. No changes will be necessary on the main v8 codebase. See getFocusBoxShadow.ts for details.

Checklist

  • 👌 design updates will be Garden Designer approved (add the designer as a reviewer)
  • 🌐 demo is up-to-date (npm start)
  • ⬅️ renders as expected with reversed (RTL) direction
  • 🤘 renders as expected with Bedrock CSS (?bedrock)
  • 💂‍♂️ includes new unit tests. Maintain existing coverage (always >= 96%)
  • tested for WCAG 2.1 AA accessibility compliance
  • 📝 tested in Chrome, Firefox, Safari, and Edge

@jzempel jzempel requested a review from a team as a code owner April 10, 2024 12:48
}}
argTypes={{
position: { control: { type: 'radio', options: MENU_POSITIONS } }
position: { control: 'radio', options: MENU_POSITIONS },
Copy link
Member Author

Choose a reason for hiding this comment

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

These select and radio controls were not working due to a previous Storybook update.

if (typeof _hue === 'object') {
retVal = toHex(_hue, shade, offset, scheme);
} else if (valid(_hue)) {
} else if (_hue === 'transparent' || valid(_hue)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Restores parity with legacy getColorV8 and aligns with the CSS color spec.

@coveralls
Copy link

Coverage Status

coverage: 96.221% (-0.01%) from 96.234%
when pulling 49a8614 on jzempel/util-colors
into 9f3aa37 on next.

Copy link
Contributor

@geotrev geotrev left a comment

Choose a reason for hiding this comment

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

Makes sense, appreciate the piece-meal approach before integrating dark values. 🕶️

@jzempel jzempel changed the title fix: update theming utilities for refactored getColor fix(theming)!: update utilities for refactored getColor Apr 10, 2024
@jzempel jzempel merged commit 04bad34 into next Apr 10, 2024
@jzempel jzempel deleted the jzempel/util-colors branch April 10, 2024 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants