Skip to content

Tabs: icon tabs and text tabs have a different height #65624

Closed

Description

@ciampo

Text tabs (ie. <Tabs.Tab>text</Tabs.Tab>) are 48px tall: https://wordpress.github.io/gutenberg/?path=/story/components-experimental-tabs--default

Icon tabs (ie. <Tabs.Tab><Icon /></Tabs.Tab>) are 56px tall: https://wordpress.github.io/gutenberg/?path=/story/components-experimental-tabs--with-tab-icons-and-tooltips

Should we revise any aspects of this? It may be tricky to enforce it fully with the current set of APIs, since Tabs can not possibly know what its children are.

Activity

  1. ciampo commented on Sep 24, 2024

    @ciampo
    ContributorAuthor

    cc @WordPress/gutenberg-components @WordPress/gutenberg-design

  2. jasmussen commented on Sep 25, 2024

    @jasmussen
    Contributor

    They should both have the same height, of course. Probably best to maintain the 48px height for now, since it affects a key visual of the editor:

    Screenshot 2024-09-25 at 10 41 21

  3. jameskoster commented on Sep 25, 2024

    @jameskoster
    Contributor

    If we used min-height and removed vertical padding I think that would solve this issue? Appreciate it wouldn't account for children taller than 48px, but that feels like an edge case to me.

  4. ciampo commented on Sep 25, 2024

    @ciampo
    ContributorAuthor

    We could probably just remove the vertical padding and rely on flexbox alignment ?

  5. patil-vipul commented on Sep 25, 2024

    @patil-vipul

    Raising a PR as per the suggestion from @ciampo in sometime.

    cc: @ciampo @jameskoster @jasmussen

  6. DaniGuardiola commented on Sep 25, 2024

    @DaniGuardiola
    Member

    The Tabs component is currently heavily in flux, so please hold off on working on this until a few tweaks have been merged. I believe one of the pending PRs fixes this already.

  7. DaniGuardiola commented on Oct 4, 2024

    @DaniGuardiola
    Member

    This will be fixed by #65387

  8. ciampo commented on Oct 17, 2024

    @ciampo
    ContributorAuthor

    Closing as fixed in #65387

  9. t-hamano commented on Oct 19, 2024

    @t-hamano
    Contributor

    In WordPress 6.7 Beta3, I noticed that the icon tabs are 56px tall:

    https://playground.wordpress.net/?wp=beta

    Image

    Whereas in WordPress 6.6, it is 48px:

    https://playground.wordpress.net/?wp=6.6

    Image

    Maybe a special backport is needed for WordPress 6.7?

  10. ciampo commented on Oct 19, 2024

    @ciampo
    ContributorAuthor

    Yup, feel free to backport the fix PR (and any dependent PRs)!

    Otherwise I'll work on it on Monday

  11. ciampo commented on Oct 21, 2024

    @ciampo
    ContributorAuthor

    @t-hamano I'm actually not sure that backporting the PR that fixed this issue is a good idea — the fix is included in #65387, which introduced substantial changes to the component. In order to merge #65387, we'd likely need to merge a few dependent PRs before AND a few follow-up PRs that fixed a couple of regressions.

    A potential list of backports could be:

    Separately, we may also want to backport these other fixes:

    What do you think?

    As an alternative, maybe we could apply a specific hotfix just for the 6.7 release?

  12. t-hamano commented on Oct 22, 2024

    @t-hamano
    Contributor

    @ciampo I have submitted a minimal PR for WP 6.7.

    Separately, we may also want to backport these other fixes:

    What do you think?

    Are these two bugs first introduced in WP 6.7? If not, I don't think a backport is necessary.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions