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

Popover: Prefer isAlternate style when rendering from Toolbar #45246

Closed
mirka opened this issue Oct 24, 2022 · 2 comments
Closed

Popover: Prefer isAlternate style when rendering from Toolbar #45246

mirka opened this issue Oct 24, 2022 · 2 comments
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.

Comments

@mirka
Copy link
Member

mirka commented Oct 24, 2022

What problem does this address?

According to the design spec, popovers opened from the block toolbar should have the same dark border (isAlternate) style by default. Currently, consumers need to set that prop on their popovers manually.

What is your proposed solution?

See if we can do this automatically, likely by using the context system.


More context from @jasmussen (#49838 (comment))

I found a little more context in #45137, where the "isAlternate" is refactored/deprecated in favor of a variant.

But it boils down to this, you can have two styles of popovers. This one:
Screenshot 2023-04-28 at 09 30 06

Notice how it opens from the block toolbar and has the same black borders as the block toolbar.

This one:

Screenshot 2023-04-28 at 09 30 15

Notice how it doesn't open from the block toolbar, and has the light gray borders, plus a drop shadow.

The thing is, a developer should not have to choose a variant if we can automate this for them. The gray with box shadow can be default, but if something opens from the block toolbar, it should always be the dark version. That way we avoid this issue where someone forgot the variant:

Screenshot 2023-04-28 at 09 30 21

@ciampo
Copy link
Contributor

ciampo commented May 30, 2023

I started working the approach suggested by this issue for the new DropdownMenu component in #51097

@mirka
Copy link
Member Author

mirka commented Dec 22, 2023

Closed by #51154

@mirka mirka closed this as completed Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
Status: Done 🎉
Development

No branches or pull requests

2 participants