Skip to content

Popover: Prefer isAlternate style when rendering from Toolbar #45246

Closed

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

Activity

  1. added
    [Type] Enhancement
    [Package] Components
    on Oct 24, 2022
  2. ciampo commented on May 30, 2023

    @ciampo
    Contributor

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

  3. mirka commented on Dec 22, 2023

    @mirka
    MemberAuthor

    Closed by #51154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Package] Components[Type] Enhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions