-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Major changes in this PR: ## Removal of `.euiAccordionForm` classNames EUI is moving away from providing global `classNames` styles for components - where possible, we want to provide props as opposed to styles. As part of our ongoing Emotion conversion, we have removed the following `EuiAccordion`-specific classes: - `.euiAccordionForm` (replaced with `borders="horizontal"`) - `.euiAccordionForm__button` (replaced with `buttonProps={{ paddingSize: 'm' }}`) - `.euiAccordionForm__title` styles - this was only removing text underlines on hover. If still desired, re-add this behavior with custom CSS. - `.euiAccordionForm__extraAction` - there was 1 usage of this in Kibana in Watcher, which was converted to one-off custom inline Emotion CSS instead. This change accounts for the first 3-4 commits in the PR.⚠️ If your team was one of the 4-5 teams affected by this change, we would greatly appreciate your help QAing the UI and ensuring it looks as desired/the same as before. ## Fixed `EuiHeader` affordance The Sass `euiHeaderAffordForFixed` mixin has been deprecated and replaced by a global `--euiFixedHeadersOffset` CSS variable. This variable updates independently and dynamically based on the number of fixed headers on the page, and is usable by both Sass and Emotion. All underlying EUI components that need to account for fixed headers (such as flyouts and page sidebars/templates) have been updated to consume this new variable. This change cleans up a great deal of Sass code, and is incidentally extremely timely with serverless efforts (as serverless has only one fixed header and the classic Kibana chrome has two). This change constitutes a majority of the commits in this PR, which involve removing various fixed Sass header variables and replacing them with the new CSS variable. I strongly recommend [reviewing changes by commit if possible](https://github.com/elastic/kibana/pull/165790/commits) to see any associated changes that make sense together with any of your touched file(s).⚠️ If your team was affected by this change (primarily due to custom header layouts), your help would be greatly appreciated QAing your app to ensure no UI regressions in that regard have occurred. --- `v88.1.0`⏩ `v88.2.0` ## [`88.2.0`](https://github.com/elastic/eui/tree/v88.2.0) - Added a new `EuiTextTruncate` component, which provides custom truncation options beyond native CSS ([#7116](elastic/eui#7116)) - Fixed-positioned `EuiHeader`s now set a global CSS `--euiFixedHeadersOffset` variable, which updates dynamically based on the number of fixed headers on the page. ([#7144](elastic/eui#7144)) - `EuiFlyout`s now dynamically set their position, height, and mask based on the number of fixed headers on the page. ([#7144](elastic/eui#7144)) - Sticky-positioned `EuiPageSidebar`s now dynamically set their position and height based on the number of fixed headers on the page. This can still be overridden via the `sticky.offset` prop if needed. ([#7144](elastic/eui#7144)) - `EuiPageTemplate` now dynamically offsets content from any fixed headers on the page. This can still be overridden via the `offset` prop if needed. ([#7144](elastic/eui#7144)) - Updated `EuiAccordion` with a new `borders` prop ([#7154](elastic/eui#7154)) - Updated `EuiAccordion` with a new `buttonProps.paddingSize` prop ([#7154](elastic/eui#7154)) **Deprecations** - Deprecated the Sass `euiHeaderAffordForFixed` mixin. Use the new global CSS `var(--euiFixedHeadersOffset)` variable instead. ([#7144](elastic/eui#7144)) **CSS-in-JS conversions** - Except for generic CSS utilities, EUI is moving away from providing global `classNames` that are component-specific. As part of this effort, we have removed the following `EuiAccordion`-specific classes: ([#7154](elastic/eui#7154)) - Removed `.euiAccordionForm` styles. Use the `borders="horizontal"` prop instead - Removed `.euiAccordionForm__button` styles. Use the `buttonProps={{ paddingSize: 'm' }}` prop instead - Removed `.euiAccordionForm__extraAction` styles. Convert this to your own custom CSS if necessary. - Removed `.euiAccordionForm__title` styles. Convert this to your own custom CSS if necessary. --------- Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
- Loading branch information
Showing
43 changed files
with
162 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...me/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
...core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...ion-list-components/src/exception_item_card/comments/__snapshots__/comments.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...s/shared-ux/page/kibana_template/impl/src/__snapshots__/page_template_inner.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/shared-ux/page/solution_nav/src/__snapshots__/with_solution_nav.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:root { | ||
// height of the header banner | ||
--kbnHeaderBannerHeight: #{$euiSizeXL}; | ||
// total height of all fixed headers (when the banner is *not* present) inherited from EUI | ||
--kbnHeaderOffset: var(--euiFixedHeadersOffset, 0); | ||
// total height of everything when the banner is present | ||
--kbnHeaderOffsetWithBanner: calc(var(--kbnHeaderBannerHeight) + var(--kbnHeaderOffset)); | ||
} | ||
|
||
// Quick note: This shouldn't be mixed with Sass variable declarations, | ||
// as each import will cause :root to be re-declared unnecessarily |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,6 @@ | ||
@import './variables'; | ||
|
||
/* stylelint-disable-next-line length-zero-no-unit -- need consistent unit to sum them */ | ||
@mixin kibanaFullBodyHeight($additionalOffset: 0px) { | ||
// default - header, no banner | ||
height: calc(100vh - #{$kbnHeaderOffset + $additionalOffset}); | ||
|
||
@at-root { | ||
// no header, no banner | ||
.kbnBody--chromeHidden & { | ||
height: calc(100vh - #{$additionalOffset}); | ||
} | ||
// header, banner | ||
.kbnBody--hasHeaderBanner & { | ||
height: calc(100vh - #{$kbnHeaderOffsetWithBanner + $additionalOffset}); | ||
} | ||
// no header, banner | ||
.kbnBody--chromeHidden.kbnBody--hasHeaderBanner & { | ||
height: calc(100vh - #{$kbnHeaderBannerHeight + $additionalOffset}); | ||
} | ||
} | ||
} | ||
|
||
/* stylelint-disable-next-line length-zero-no-unit -- need consistent unit to sum them */ | ||
@mixin kibanaFullBodyMinHeight($additionalOffset: 0px) { | ||
// default - header, no banner | ||
min-height: calc(100vh - #{$kbnHeaderOffset + $additionalOffset}); | ||
|
||
@at-root { | ||
// no header, no banner | ||
.kbnBody--chromeHidden & { | ||
min-height: calc(100vh - #{$additionalOffset}); | ||
} | ||
// header, banner | ||
.kbnBody--hasHeaderBanner & { | ||
min-height: calc(100vh - #{$kbnHeaderOffsetWithBanner + $additionalOffset}); | ||
} | ||
// no header, banner | ||
.kbnBody--chromeHidden.kbnBody--hasHeaderBanner & { | ||
min-height: calc(100vh - #{$kbnHeaderBannerHeight + $additionalOffset}); | ||
} | ||
} | ||
@mixin kibanaFullBodyHeight($additionalOffset: 0) { | ||
// The `--euiFixedHeadersOffset` CSS variable is automatically updated by | ||
// styles/rendering/_base.scss, based on whether the Kibana chrome has a | ||
// header banner, and is visible or hidden | ||
height: calc(100vh - var(--euiFixedHeadersOffset, 0) - #{$additionalOffset}); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@import './variables'; | ||
@import './css_variables'; | ||
@import './mixins'; | ||
@import './styles/index'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.