Skip to content

[Page Template Feature] Updating EuiPageHeader to use the same paradigm as EuiPageSection#5857

Merged
cchaos merged 13 commits intoelastic:feature/page_templatesfrom
cchaos:_page_now/page_header
May 9, 2022
Merged

[Page Template Feature] Updating EuiPageHeader to use the same paradigm as EuiPageSection#5857
cchaos merged 13 commits intoelastic:feature/page_templatesfrom
cchaos:_page_now/page_header

Conversation

@cchaos
Copy link
Copy Markdown
Contributor

@cchaos cchaos commented Apr 29, 2022

Also converted styles to Emotion.

Primarily EuiPageHeader is just a pass-through now to EuiPageHeaderContent, even just plain children. So EuiPageHeaderContent now renders everything all of the time. EuiPageHeader acts as just a wrapper for controlling the restrictWidth, paddingSize, and bottomBorder props just like EuiPageSection.

The best docs example to test how this works in conjunction with EuiPageSection is: https://eui.elastic.co/pr_5857/#/layout/page-components#page-sections

Additions:

EuiPageHeader

  • Adds extended as an option of bottomBorder
  • Consumer's no longer have to enforce bottomBorder in conjunction with Tabs, it's all handled programatically

EuiPageHeaderContent

  • Adds paddingSize & restrictWidth but really only for EuiPageHeader to control them
  • Fixed some of the complex logic of when to force show the bottom border, or put tabs at the top
  • Fixed breadcrumbs not showing up when alignItems was not top

Todo in a follow up

  • Update usages of style helpers/mixins for the ones in flight to main
  • Re-evaluate Emotion conversion to match recently established patterns
  • I added a very basic useEuiBreakpoint mixin, but it needs to be fleshed out more

Checklist

  • Checked in both light and dark modes
  • Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox
  • Props have proper autodocs and playground toggles
  • Added documentation
  • [ ] Checked Code Sandbox works for any docs examples
  • Added or updated jest and cypress tests
  • [ ] Checked for breaking changes and labeled appropriately
  • [ ] Checked for accessibility including keyboard-only and screenreader modes
  • [ ] Updated the Figma library counterpart
  • A changelog entry exists and is marked appropriately

cchaos added 7 commits April 20, 2022 11:58
same `bottomBorder`, `restrictWidth` and `paddingSize` props as EuiPageSection…

(needs clenaup)
Still needs cleanup and shimmed a breakpoint mixin, not great
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_5857/

@cchaos cchaos marked this pull request as ready for review May 3, 2022 02:57
@cchaos
Copy link
Copy Markdown
Contributor Author

cchaos commented May 3, 2022

Finally..... ready for review...

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_5857/

@elizabetdev elizabetdev self-requested a review May 6, 2022 16:28
Copy link
Copy Markdown
Contributor

@elizabetdev elizabetdev left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉

Tested in Chrome, Firefox, Edge, and Safari.

cchaos added 2 commits May 9, 2022 10:47
…page_now/page_header

# Conflicts:
#	src/components/page/page_header/__snapshots__/page_header.test.tsx.snap
#	src/components/page/page_header/__snapshots__/page_header_content.test.tsx.snap
#	src/global_styling/mixins/_padding.ts
#	src/global_styling/mixins/index.ts
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_5857/

@cchaos cchaos merged commit 9233976 into elastic:feature/page_templates May 9, 2022
@cchaos cchaos deleted the _page_now/page_header branch May 9, 2022 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants