Skip to content

Conversation

@ryankeairns
Copy link
Contributor

Summary

Part of a series of adjustments to realize the Borealis vision and move away from the hallmarks of Amsterdam.

Why are we making this change?

Stylistic decisions for Amsterdam - like large, heavy titles and tabs - were baked into the components. This PR is one of several that bring additional theme override capabilities.

Screenshots

Before and after from docs examples; reduce tabs from 16 to 14

CleanShot 2025-09-22 at 13 30 12@2x

Looking ahead, this screenshot include forthcoming changes to also reduce title and text

CleanShot 2025-09-22 at 13 31 00@2x

Impact to users

  • Improved visual hierarchy.
  • Adjacent to undoing large, 'shouty' titles

QA

Remove or strikethrough items that do not apply to your PR.

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in both MacOS and Windows high contrast modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately.
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)
  • Designer checklist
    • If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

@ryankeairns ryankeairns changed the title Reduce [EuiPageHeader] tabs sizes for Borealis theme Reduce EuiPageHeader tabs sizes for Borealis theme Sep 22, 2025
@ryankeairns ryankeairns marked this pull request as ready for review September 22, 2025 21:24
@ryankeairns ryankeairns requested a review from a team as a code owner September 22, 2025 21:24
!!responsive
);

const euiTheme = useEuiTheme();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can restructure it here, right?

Suggested change
const euiTheme = useEuiTheme();
const { euiTheme } = useEuiTheme();

@ryankeairns
Copy link
Contributor Author

ryankeairns commented Sep 24, 2025

I see I have conflicts on these visual regression updates... is that typical?
I have a bunch on #9055 , too.

@ryankeairns ryankeairns marked this pull request as draft September 24, 2025 19:08
@ryankeairns
Copy link
Contributor Author

Moving back to Draft; refactoring to use theme component tokens which proved to be much simpler in #9057

@ryankeairns ryankeairns force-pushed the rk/page-header-tab-size branch from c26bb51 to 0032a35 Compare September 24, 2025 21:45
@ryankeairns ryankeairns marked this pull request as ready for review September 24, 2025 21:46
@weronikaolejniczak
Copy link
Contributor

I see I have conflicts on these visual regression updates... is that typical?

That may be the case if the VRT images have been updated on main. In such a situation, I'd accept the incoming version and re-run yarn test-visual-regression update.

@ryankeairns
Copy link
Contributor Author

Ok, addressed feedback, ready again!
Thanks @weronikaolejniczak

Copy link
Contributor

@weronikaolejniczak weronikaolejniczak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🟢 Thank you for the contribution and for the patience, @ryankeairns 🙏🏻

- Add _EuiThemePage interface and page theme extension to Borealis theme
- Set pageHeader.tabsSize to 'm' for Borealis (reduced from default 'l')
- Update EuiPageHeaderContent to use theme-based tabs size with fallback
- Maintain backward compatibility - Amsterdam continues to use default 'l'
- Update static JSON theme files to include page configuration
- Fix interactive examples in docs to make tabs clickable
- Update test snapshots to reflect new theming behavior

This allows themes to customize page header tab sizes while maintaining
sensible defaults for themes that don't specify custom values.
Update snapshots to reflect new theming behavior for tabs size.
- Updated EuiPageHeader and EuiPageHeaderContent baselines to reflect new Borealis theme tab size 'm'
- Updated EuiPageTemplate baselines that use EuiPageHeader
- Updated other component baselines from visual regression test run
- Add _EuiThemePageHeader type to eui-theme-common
- Create pageHeader component tokens in Borealis theme (tabsSize: 'm')
- Add default pageHeader tokens in Amsterdam theme (tabsSize: 'l')
- Update EuiPageHeaderContent to use euiTheme.components.pageHeader.tabsSize
- Export EuiTabsSizes type for proper TypeScript support
- Update THEMING_TEMPLATE.md with real-world implementation lessons
- Follow component tokens pattern for type safety and consistency

Resolves circular dependency issues through proper type export chain
and correct build order (eui-theme-common → eui-theme-borealis → eui)
- Remove type assertion and let TypeScript infer EuiTabsSizes from theme
- Remove unused EuiTabsSizes import from page header component
- Add proper type import and annotation to Amsterdam theme components
- Use explicit type annotation instead of type assertion
- Fixes TypeScript error: Type 'string' is not assignable to type 'EuiTabsSizes'
- Apply Prettier formatting fixes
@ryankeairns ryankeairns force-pushed the rk/page-header-tab-size branch from b8f2911 to 6661a33 Compare September 26, 2025 14:45
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@ryankeairns ryankeairns merged commit 7f2df0d into main Sep 26, 2025
5 checks passed
@ryankeairns ryankeairns deleted the rk/page-header-tab-size branch September 26, 2025 15:24
"euiColorBorderStrongDanger": "#C61E25",
"euiColorBorderStrongText": "#5A6D8C"
"euiColorBorderStrongText": "#5A6D8C",
"page": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 I'm not sure that this is really that useful on the JSON export (it's not a value to use as a token).

That being said, if we add these for Borealis we should add them for Amsterdam as well (example file), otherwise switching themes would break if these are used somewhere.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I realize, we still have these files duplicated in packages/eui/src/themes/json and packages/eui-theme-borealis/src.

Originally it was duplicated when introducing Borealis as there were issues loading the file from the theme package. But that is not the case anymore and Kibana was updated (file) to use the eui-theme-borealis file.
That means this change is not actually available in Kibana as the packages/eui-theme-borealis/src files were not updated.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants