Merged
Conversation
- [perf] removes the need for `let headingNode` - cleans up and organizes code
+ remove extra unnecessary `breakpoints` const
- the theme HOC is now causing typescript to correctly flag missing `items` props, no idea why it wasn't doing this previously
+ opinionatedly tweak button padding/height - it's already regressed from pre-Emotion anyway due to the EuiButton conversion + tweak animation to feel a little smoother on EUI docs site + fix `isOpenOnMobile` tests that don't assert anything meaningful because jsdom isn't actually in the mobile breakpoint
- start with button component - reorder imports + convert function to arrow syntax
+ remove `--isClickable` modifier (use CSS selectors instead)
- Remove unnecessary `.euiSideNavItemButton__content` wrapper - just put it on the parent `<button>` - Remove unused `.euiSideNavItemButton__labelContainer` CSS?? doesn't appear to be used anywhere - replace margin with flex gap - remove unnecessary `const`s and just write inline JSX
+ fold in Amsterdam override
661b18d to
80678f4
Compare
+ remove unnecessary CSS and replace let with inline conditional JSX
- remove now-unnecessary `cloneElement` - isn't needed anymore since we use flex `gap` instead of applying a margin to the icon - move let caret to inline conditional JSX - DRY out various depth-related conditions to more readable variables - memoize callback
doesn't need a changelog as this is not a publicly exported component
- actually needed for custom `renderItem` usages that might not apply the passed button styles down + tweak stories to show an example of correctly passed styles
+ fix nested caret alignment
80678f4 to
bfbe5ee
Compare
|
Preview staging links for this PR:
|
Collaborator
💚 Build Succeeded
History
|
tkajtoch
approved these changes
Feb 14, 2024
Member
tkajtoch
left a comment
There was a problem hiding this comment.
Code changes look great! I tested desktop and mobile versions and haven't found any regressions. 🚢
jbudz
pushed a commit
to elastic/kibana
that referenced
this pull request
Feb 23, 2024
`v93.1.1`⏩ `v93.2.0` --- - Updated `EuiPageSidebar` and `EuiPageTemplate.Sidebar` with a new `hasEmbellish` prop (defaults to false) ([#7521](elastic/eui#7521)) - Added `diff` glyph to `EuiIcon` ([#7520](elastic/eui#7520)) - Added `newChat` glyph to `EuiIcon` ([#7524](elastic/eui#7524)) **Bug fixes** - Fixed `EuiSideNav` not correctly typing the `items` prop as required ([#7521](elastic/eui#7521)) - Fixed the `CSS is not defined` bug in `EuiPageTemplate` when rendering in some SSR environments, particularly Next.js v13 and up ([#7525](elastic/eui#7525)) - Fixed `EuiDataGrid` component to clean up timer from side effect on unmount ([#7534](elastic/eui#7534)) **Accessibility** - Fixed `EuiSideNav` to render a fallback aria-label on mobile toggles if no heading or mobile title exists ([#7521](elastic/eui#7521)) **CSS-in-JS conversions** - Converted `EuiSideNav` to Emotion; Removed the following Sass variables: ([#7521](elastic/eui#7521)) - `$euiSideNavEmphasizedBackgroundColor` - `$euiSideNavRootTextcolor` - `$euiSideNavBranchTextcolor` - `$euiSideNavSelectedTextcolor` - `$euiSideNavDisabledTextcolor` - Removed the `euiSideNavEmbellish` Sass mixin. Use the new `EuiPageSidebar` `hasEmbellish` prop instead ([#7521](elastic/eui#7521)) - Added a new memoization/performance optimization utility for CSS-in-JS styles ([#7529](elastic/eui#7529))
semd
pushed a commit
to semd/kibana
that referenced
this pull request
Mar 4, 2024
`v93.1.1`⏩ `v93.2.0` --- - Updated `EuiPageSidebar` and `EuiPageTemplate.Sidebar` with a new `hasEmbellish` prop (defaults to false) ([elastic#7521](elastic/eui#7521)) - Added `diff` glyph to `EuiIcon` ([elastic#7520](elastic/eui#7520)) - Added `newChat` glyph to `EuiIcon` ([elastic#7524](elastic/eui#7524)) **Bug fixes** - Fixed `EuiSideNav` not correctly typing the `items` prop as required ([elastic#7521](elastic/eui#7521)) - Fixed the `CSS is not defined` bug in `EuiPageTemplate` when rendering in some SSR environments, particularly Next.js v13 and up ([elastic#7525](elastic/eui#7525)) - Fixed `EuiDataGrid` component to clean up timer from side effect on unmount ([elastic#7534](elastic/eui#7534)) **Accessibility** - Fixed `EuiSideNav` to render a fallback aria-label on mobile toggles if no heading or mobile title exists ([elastic#7521](elastic/eui#7521)) **CSS-in-JS conversions** - Converted `EuiSideNav` to Emotion; Removed the following Sass variables: ([elastic#7521](elastic/eui#7521)) - `$euiSideNavEmphasizedBackgroundColor` - `$euiSideNavRootTextcolor` - `$euiSideNavBranchTextcolor` - `$euiSideNavSelectedTextcolor` - `$euiSideNavDisabledTextcolor` - Removed the `euiSideNavEmbellish` Sass mixin. Use the new `EuiPageSidebar` `hasEmbellish` prop instead ([elastic#7521](elastic/eui#7521)) - Added a new memoization/performance optimization utility for CSS-in-JS styles ([elastic#7529](elastic/eui#7529))
fkanout
pushed a commit
to fkanout/kibana
that referenced
this pull request
Mar 4, 2024
`v93.1.1`⏩ `v93.2.0` --- - Updated `EuiPageSidebar` and `EuiPageTemplate.Sidebar` with a new `hasEmbellish` prop (defaults to false) ([elastic#7521](elastic/eui#7521)) - Added `diff` glyph to `EuiIcon` ([elastic#7520](elastic/eui#7520)) - Added `newChat` glyph to `EuiIcon` ([elastic#7524](elastic/eui#7524)) **Bug fixes** - Fixed `EuiSideNav` not correctly typing the `items` prop as required ([elastic#7521](elastic/eui#7521)) - Fixed the `CSS is not defined` bug in `EuiPageTemplate` when rendering in some SSR environments, particularly Next.js v13 and up ([elastic#7525](elastic/eui#7525)) - Fixed `EuiDataGrid` component to clean up timer from side effect on unmount ([elastic#7534](elastic/eui#7534)) **Accessibility** - Fixed `EuiSideNav` to render a fallback aria-label on mobile toggles if no heading or mobile title exists ([elastic#7521](elastic/eui#7521)) **CSS-in-JS conversions** - Converted `EuiSideNav` to Emotion; Removed the following Sass variables: ([elastic#7521](elastic/eui#7521)) - `$euiSideNavEmphasizedBackgroundColor` - `$euiSideNavRootTextcolor` - `$euiSideNavBranchTextcolor` - `$euiSideNavSelectedTextcolor` - `$euiSideNavDisabledTextcolor` - Removed the `euiSideNavEmbellish` Sass mixin. Use the new `EuiPageSidebar` `hasEmbellish` prop instead ([elastic#7521](elastic/eui#7521)) - Added a new memoization/performance optimization utility for CSS-in-JS styles ([elastic#7529](elastic/eui#7529))
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
closes #6412
This PR is on the larger side especially in terms of cleanup, so I strongly recommend following along by commit.
Breaking-ish changes
itemsprop is missing (wasn't previously for whatever reason)@euiSideNavEmbellishSass mixin (.euiSideNavItemButton__labelContainerCSS selector which didn't appear to be actually applying to anything in either EUI or Kibana?styleprop on EuiSideNavItem not applying to the same location ascssandclassName(not a public export).euiSideNav__contentMobile-xsthrough.euiSideNav__contentMobile-xl(including m, l, etc).euiSideNavItemButton--isClickable.euiSideNavItem--rootIcon.euiSideNavItem--hasChildItemsto.euiSideNavItem-hasChildItems(single hyphen vs double to indicate state)aria-labelfallback for mobile buttons with noheadingormobileTitlepropsTech debt changes
EuiSideNavHeadingsub-componentlet nodetype JS in favor of inline conditional JSXQA
General checklist
- [ ] If applicable, added the breaking change issue label (and filled out the breaking change checklist)