Skip to content

Popover: Prefer isAlternate style when rendering from Toolbar #45246

@mirka

Description

@mirka

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done 🎉

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions