Skip to content
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

CircularOptionPicker: Update Button sizes #67285

Merged
merged 4 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ exports[`ColorPaletteControl matches the snapshot 1`] = `
<button
aria-label="Color: red"
aria-selected="true"
class="components-button components-circular-option-picker__option"
class="components-button components-circular-option-picker__option is-next-40px-default-size"
data-active-item="true"
id="components-circular-option-picker-0-0"
role="option"
Expand Down Expand Up @@ -247,7 +247,7 @@ exports[`ColorPaletteControl matches the snapshot 1`] = `
class="components-circular-option-picker__custom-clear-wrapper"
>
<button
class="components-button components-circular-option-picker__clear is-tertiary"
class="components-button components-circular-option-picker__clear is-next-40px-default-size is-tertiary"
type="button"
>
Clear
Expand Down
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

- `ColorPicker`: Update sizes of color format select and copy button ([#67093](https://github.com/WordPress/gutenberg/pull/67093)).
- `Autocomplete`: Increase option height ([#67214](https://github.com/WordPress/gutenberg/pull/67214)).
- `CircularOptionPicker`: Update `Button` sizes to be ready for 40px default size ([#67285](https://github.com/WordPress/gutenberg/pull/67285)).

### Experimental

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export function ButtonAction( {
}: WordPressComponentProps< ButtonAsButtonProps, 'button', false > ) {
return (
<Button
__next40pxDefaultSize
Copy link
Member Author

Choose a reason for hiding this comment

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

The other Button instance in this file doesn't need the prop because it is the link variant.

className={ clsx(
'components-circular-option-picker__clear',
className
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export function Option( {
const commonProps = {
id,
className: 'components-circular-option-picker__option',
__next40pxDefaultSize: true,
...additionalProps,
};

Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/circular-option-picker/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ $color-palette-circle-spacing: 12px;
.components-circular-option-picker__option {
display: inline-block;
vertical-align: top;
height: 100%;
width: 100%;
height: 100% !important;
Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunate override. Needs some kind of unstyled Button variant.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, quite a bummer with these overrides. I think it would make sense to explore an unstyled variant at some point. Perhaps opening an issue is a good first step to keep it documented?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done ✅ #67320

aspect-ratio: 1;
border: none;
border-radius: $radius-round;
background: transparent;
Expand Down
Loading