Skip to content

[EuiTabs] Remove xl size #8302

Closed

Description

@ryankeairns

Description

The purpose of this task is to remove the xl size in EuiTabs.

It's been discussed in #8128. Two reasons for this request are:

  1. Subjectively, it is an atypical font size for tabs (see below). The guidelines say to only use for page titles only, but I don't believe this is a justifiable recommendation.
  2. Objectively, we don't use it in Kibana. Search for usage with this regex <EuiTabs[ \w=\{\}>\(\)\n;".-:]* size="xl".

Note

This is a breaking change with low impact. We can suggest using l as the recommended fix.

CleanShot 2024-11-10 at 21 51 08@2x

Acceptance criteria

  • xl size is removed from EuiTabs

Activity

  1. added
    design decision
    on Jan 31, 2025
  2. changed the title [-][EuiTabs] Remove 'xl' size[/-] [+][EuiTabs] Remove `xl` size[/+] on Jan 31, 2025
  3. JasonStoltz commented on May 9, 2025

    @JasonStoltz
    Contributor

    Sorry @ryankeairns, we missed this one. It wasn't added to our team board automatically for some reason. It's here now, we'll take a look.

  4. weronikaolejniczak commented on May 29, 2025

    @weronikaolejniczak
    Contributor

    The code changes are small. There are no usages in Kibana and Cloud UI (used the regexp from the description). We should treat it as a breaking change regardless (also to account for external contributors). I put my preliminary estimation.

  5. added
    low hanging fruit
    and removed
    design decision
    on May 29, 2025
  6. ryankeairns commented on May 29, 2025

    @ryankeairns
    ContributorAuthor

    Thanks all.

    Another place these can surface is through EuiPageTemplate (docs) when no heading is provided. In any case, my reasons stand :) ... and I will address feedback that comes as a result of the change.

  7. added
    breaking change
    on Jun 5, 2025
  8. JasonStoltz commented on Jun 5, 2025

    @JasonStoltz
    Contributor

    I assume we'll need to make sure this is updated in Figma after we make this change as well.

  9. JasonStoltz commented on Jun 5, 2025

    @JasonStoltz
    Contributor

    Labeled this as a breaking change -- we should consider pairing this with other breaking changes in a planned release. If we do that, we should plan for a breaking change release and give folks extra time to test in Kibana.

  10. ryankeairns commented on Jun 5, 2025

    @ryankeairns
    ContributorAuthor

    I assume we'll need to make sure this is updated in Figma after we make this change as well.

    Created an issue on our EUI Design work board and will have this ready to roll in conjunction with the component change.

  11. weronikaolejniczak commented on Jun 6, 2025

    @weronikaolejniczak
    Contributor

    @ryankeairns We have to account for direct EuiPageHeader and KibanaPageTemplate.Header usages (that use EuiPageHeader underneath). Specifically, those that pass tabs and NOT pageTitle at the same time. They fall into this condition:

    let tabsNode;
    if (tabs) {
    const tabsSize: EuiTabsProps['size'] = pageTitle ? 'l' : 'xl';
    const renderTabs = () => {
    return tabs.map((tab, index) => {
    const { label, ...tabRest } = tab;
    return (
    <EuiTab key={index} {...tabRest}>
    {label}
    </EuiTab>
    );
    });
    };
    // When tabs exist without a pageTitle, we need to recreate an h1 based on the currently selected tab and visually hide it
    const screenReaderPageTitle = !pageTitle && (
    <EuiScreenReaderOnly>
    <h1>
    {
    tabs.find((obj) => {
    return obj.isSelected === true;
    })?.label
    }
    </h1>
    </EuiScreenReaderOnly>
    );
    tabsNode = (
    <>
    {pageTitleNode && <EuiSpacer />}
    {screenReaderPageTitle}
    <EuiTabs {...tabsProps} bottomBorder={false} size={tabsSize}>
    {renderTabs()}
    </EuiTabs>
    </>
    );
    }
    const childrenNode = children && (
    <>
    <EuiSpacer />
    {children}
    </>
    );
    let bottomContentNode;
    if (tabsNode && pageTitleNode) {
    bottomContentNode = (
    <div className="euiPageHeaderContent__bottom">
    {pageTitleNode && tabsNode}
    </div>
    );
    }

    In theory, there will be no code changes on Kibana side but there could be visual changes (and there could be snapshot changes). I have a PR open just for removing the size: #8762

    Do we want to proceed or do we want to pause the change?

  12. ryankeairns commented on Jun 6, 2025

    @ryankeairns
    ContributorAuthor

    Thanks @weronikaolejniczak

    This is helpful. With this information, I will communicate the proposed change to the EUI ambassadors (meeting next week) so that they are aware and have the opportunity to voice any concerns.

    So, yes, hold for just a bit, and I will knock on some doors.

  13. weronikaolejniczak commented on Jun 7, 2025

    @weronikaolejniczak
    Contributor

    @ryankeairns just before falling asleep I realized that I read the condition wrong 😅 The affected cases would be if there are tabs passed but NO pageTitle. I searched in Kibana and Cloud, and I didn't find any EuiPageHeader or KibanaPageTemplate.Header that pass tabs and not pageTitle (so they all should use the l size). That being said, might be worth to double-check by someone and raise this change on the EUI ambassadors meeting.

  14. JasonStoltz commented on Jun 10, 2025

    @JasonStoltz
    Contributor

    @weronikaolejniczak Should we move this to blocked until Ryan has a chance to talk to the ambassadors?

  15. weronikaolejniczak commented on Jun 10, 2025

    @weronikaolejniczak
    Contributor

    @JasonStoltz there are no usages of EuiPageHeader or KibanaPageTemplate.Header, so I think we're fine to proceed but I can put it in Blocked for now anyway.

  16. ryankeairns commented on Jun 10, 2025

    @ryankeairns
    ContributorAuthor

    @ryankeairns just before falling asleep I realized that I read the condition wrong 😅 The affected cases would be if there are tabs passed but NO pageTitle. I searched in Kibana and Cloud, and I didn't find any EuiPageHeader or KibanaPageTemplate.Header that pass tabs and not pageTitle (so they all should use the l size). That being said, might be worth to double-check by someone and raise this change on the EUI ambassadors meeting.

    Got it. I also could not find any use cases of this.
    I have sent a message in #ux-wg-patterns and will reiterate the point on Thursday, in person.

  17. ryankeairns commented on Jun 25, 2025

    @ryankeairns
    ContributorAuthor

    Thanks for following through on this. I received 0 feedback and interpret that to mean there would be little to no impact.

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

Metadata

Metadata

Labels

breaking changelow hanging fruit

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions