-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade EUI to v63.0.6 - updates to new EuiPageTemplate and deprecates old page components #138546
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 2d6e6e3 contains the overall conversion of Stack Management application and a set of examples in the API Keys page
solutionNav={solution} | ||
// @ts-expect-error Techincally `paddingSize` isn't supported but it is passed through, | ||
// this is a stop-gap for Stack managmement specifically until page components can be converted to template components | ||
mainProps={{ paddingSize: 'l' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typically the paddingSize
is passed to the sections and header elements so each can be tweaked individually, however, Since most of the page contents don't contain padding themselves, we need to force it until all pages are updated.
@@ -118,14 +115,12 @@ export class APIKeysGridPage extends Component<Props, State> { | |||
if (!apiKeys) { | |||
if (isLoadingApp) { | |||
return ( | |||
<EuiPageContent verticalPosition="center" horizontalPosition="center" color="subdued"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The KibanaPageTemplate.EmptyPrompt now takes care default coloring based on overall layout and centering.
); | ||
} | ||
|
||
const concatenated = `${this.state.createdApiKey?.id}:${this.state.createdApiKey?.api_key}`; | ||
|
||
return ( | ||
<> | ||
<EuiPageHeader | ||
<KibanaPageTemplate.Header | ||
paddingSize="none" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paddingSize
is another temporary fix here for the addition of the padding at the top level
<EuiPageContentBody>{this.renderTable()}</EuiPageContentBody> | ||
<EuiSpacer size="l" /> | ||
|
||
<KibanaPageTemplate.Section paddingSize="none"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paddingSize
is another temporary fix here for the addition of the padding at the top level
💚 CLA has been signed |
7096f8f
to
4dfe7dc
Compare
4dfe7dc
to
3043763
Compare
- `withSolutionNav` not yet handled
- Pushes existing `pageHeader` prompts onto created EuiPageTemplate.PageHeader - Uses `isEmptyState` to push `pageHeader` props to EuiPageTemplate.EmptyPrompt instead (if `children` are not supplied)
- Collapsing isn’t working (minWidth isn’t updating)
- Moved `bottomBar` to EuiPageTemplate.BottomBar (now contained in just the page contents) - Change EuiPanel children wrapper with EuiPageTemplate.Section
- Updated `docs/tutorials` mdx page - Fixed SolutionNav prop types
- Some temporary props applied for BWC until all other pages can be converted - Converted `API Keys` page’s layout (and especially prompt usags) to new paradigm
- copying and pasting types from KibanaPageTemplateProps, but ah well
…na/EuiPageTemplate
- converts pageBodyProps - fixes non-centered loading template
- fix layouts by auto-wrapping an EuiPageSection for padding, while adding a `customPageSections` prop for more custom sections/layouts - re-center 404 errors - update tests
- drop shadow changed slightly in EUI
- Modifies ObservabilityPageTemplate to accept a `bottomBar` prop (a la the old EuiPageTemplate behavior) NOTE: This opinionated page layout structure is starting to feel like it could be potentially limiting / have all the same pitfalls the previous EuiPageTemplate did. If so, consider something closer to the Enterprise Search page template conversion (`customPageSections`). - Misc cleanup: Use `KibanaPageTemplate` over `EuiPageTemplate`
- Since theObservabilityPageTemplate is using the new Eui/KibanaPageTemplate, its child templates and types need to be updated accordingly
- was an EUI issue that required a patch release + update snapshots
- Fix empty state logic removed in a previous commit - bogarts KibanaPageTemplate's `isEmptyState` prop instead of using `template="noData"` - extend template wrappers to past ...rest to underlying Kibana/EuiPageTemplate + replace EuiPageTemplate with KibanaPageTemplate for consistency
- for deprecation tags and section tag support
3043763
to
9f94033
Compare
Closing this PR on recommendation of Kibana Ops - unfortunately kibana-ci is no longer making reports on this PR 😢 |
Summary
[email protected]
⏩[email protected]
63.0.1
⏩63.0.6
Patch releases containing bugfixes for EuiPageTemplate and release fixes already present in the previous EUI PR
63.0.6
component
prop toEuiPageSection
, allowing overriding of the defaultsection
tag (#6192)Deprecations
@deprecated
flags toEuiPageContent_Deprecated
,EuiPageContentBody_Deprecated
,EuiPageContentHeader_Deprecated
,EuiPageContentHeaderSection_Deprecated
,EuiPageSideBar_Deprecated
andEuiPageTemplate_Deprecated
, which will provide helpful hints to IDEs that support jsdoc flags. Consumers will have until August 2023 to migrate from these deprecated components. (#6194)63.0.5
Bug fixes
data-fixed-headers
property in some layout configurations usingEuiPageTemplate
. (#6140)EuiPageSidebar
bug where inline styles were not correctly updating (#6191)63.0.4
Bug fixes
EuiDescriptionListTitle
whenEuiDescriptionList
is compressed (#6160)63.0.3
Bug fixes
CollapsedItemActions
ref callback not accounting fornull
value (#6145)63.0.2
Bug fixes
eui.d.ts
containing@testing-library
type definitions (#6142)63.0.1
Bug fixes
useCurrentEuiBreakpoint
(#6117)63.0.0
- Main EuiPageTemplate release changelog63.0.0
EuiPageTemplate
namespaced component that uses context to pass through props (#5768)EuiPageSection
component for easier section stacking (#5768)EuiPageSidebar
component that is an upgrade toEuiPageSideBar
(#5768)bottomBorder
prop to add'extended'
onEuiPageHeader
(#5768)paddingSize
andrestrictWidth
directly onEuiPageHeaderContent
(#5768)data-fixed-headers
attribute to<body>
with the count of fixedEuiHeader
components (#5768)usePortal
prop onEuiBottomBar
to acceptEuiPortalProps
(#5768)paddingSize
support byEuiPage
forxl
andxs
sizes (#5768)restrictWidth
defaulttrue
style tostyle
attribute onEuiPage
andEuiPageBody
(#5768)height
parameter toeuiYScroll()
,useEuiYScroll
,euiYScrollWithShadows()
, anduseEuiYScrollWithShadows
(#5768)repositionOnScroll
directly toEuiPopover
rendered by mobile version ofEuiHeaderLinks
(#5768)Bug fixes
breadcrumbs
onEuiPageHeader
whenalignItems = 'top'
(#5768)logicalStyle()
to return the same value type as was passed in (instead of converting to string) (#5768)Deprecations
EuiPageTemplate
component and renamed toEuiPageTemplate_Deprecated
(#5768)EuiPageContent
andEuiPageContentBody
in favor of newEuiPageSection
(#5768)EuiPageContent
and renamed toEuiPageContent_Deprecated
(#5768)EuiPageContentBody
and renamed toEuiPageContentBody_Deprecated
(#5768)EuiPageContentHeader
and renamed toEuiPageContentHeader_Deprecated
(#5768)EuiPageContentHeaderSection
and renamed toEuiPageContentHeaderSection_Deprecated
(#5768)EuiPageSideBar
and renamed toEuiPageSideBar_Deprecated
(#5768)Breaking changes
EuiPageHeader
styles when a child ofEuiPageBody
(#5768)paddingSize
ofEuiPage
fromm
tonone
(#5768)CSS-in-JS conversion
EuiPage
andEuiPageBody
to Emotion (#5768)EuiPageHeader
andEuiPageHeaderContent
to Emotion (#5768)euiPageRestrictWidth()
Sass mixin (#5768)EuiPageTemplate
This component has been replaced (in EUI) with a new flexible namespaced component that utilizes React context to pass through top level props and a new sectioning component that makes it easier to stack page contents including headers in any order.
👉 New component docs: https://elastic.github.io/eui/#/templates/page-template
👉 EUI PR with details: elastic/eui#5768
👉 Guidelines: https://elastic.github.io/eui/#/templates/page-template/guidelines
In addition, the latest update deprecates a lot of (now defunct) page components like EuiPageContent and renames then with
_Deprecated
. This will hopefully alert owners that they should be switching to the latest template paradigm.Tasks performed
✅ Updated deprecated page component imports
Example:
✅ Updated the
@kbn/shared-ux-page-kibana-template
version of KibanaPageTemplateThis is mostly done and even re-exports the namespaced components so that consumers in Kibana don't have to mis-match Kibana vs EUI prefixed components.
kibana/packages/kbn-shared-ux-components/src/page_template/page_template.tsx
Lines 64 to 70 in 2829dea
✅ Updated the tutorial documentation page
New version found here: https://github.com/elastic/kibana/blob/2829dea45c970ef21188e399c4004ca40a02dca9/dev_docs/tutorials/kibana_page_template.mdx
✅ Fixed current usages of the Shared-UX KibanaPageTemplate
Only those consuming
KibanaPageTemplate
from@kbn/shared-ux-page-kibana-template
have been fixed / updated to the new paradigm.✅ Converted a few examples from old template to new
See comment review below: #138546 (review)
✅ Updated snapshots and FTR tests
The snapshots and tests caught some amount of bugs, but can't catch every possible UI bug or regression. Please take the time to manually QA/regression test your app.
🚨 Affected apps/teams 🚨
If your app/solution is in the below list list, it was affected by the new
EuiPageTemplate
/KibanaPageTemplate
updates. Please take the time to manually QA/UI regression test your app.Apps importing
KibanaPageTemplate
from@kbn/kibana-react-plugin/public
are using the old/deprecatedEuiPageTemplate
and should convert to theKibanaPageTemplate
from@kbn/shared-ux-page-kibana-template
as soon as possible. This applies to the following apps:Teams that were directly using the now-deprecated
EuiPageTemplate
/EuiPageContent
components (as noted by an_Deprecated
import from EUI) should generally convert to using KibanaPageTemplate, or at minimum the new non-deprecated EuiPage* equivalents. There are too many applications to list of these usages (222 files total), so we cannot call these teams out individually, but please consider doing a grep for_Deprecated as
in your team codebase to check for them and start planning to migrate over.The deprecated page components will be removed by August 2023.