-
Notifications
You must be signed in to change notification settings - Fork 841
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
[EuiSelectable] Support scrolling in non-virtualized lists #7609
[EuiSelectable] Support scrolling in non-virtualized lists #7609
Conversation
…and not every rerender + bonus props destructure
- chrome, why??
@@ -20,6 +20,8 @@ | |||
.euiSelectableList__list { | |||
@include euiOverflowShadow; | |||
@include euiScrollBar; | |||
overflow: auto; | |||
position: relative; // Chrome/Edge loses its mind without this and doesn't render `mask-image` correctly |
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.
Preview staging links for this PR:
|
💚 Build Succeeded
|
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.
I noticed a small difference between isVirtualized=true
and isVirtualized=false
items. (seen on Chrome and Edge only)
Screen.Recording.2024-03-22.at.11.27.41.mov
From what I can see, there is a will-change: transform
on the euiSelectableList__list
when isVirtualized=true
which is not applied for isVirtualized=false
. Adding it results in the same output.
I'm tempted to leave the |
I agree on your points. Given that |
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.
🚢 🐈⬛ LGTM!
Thanks as always Lene! |
`v93.4.0` ⏩ `v93.5.1` --- ## [`v93.5.1`](https://github.com/elastic/eui/releases/v93.5.1) **Bug fixes** - Fixed unvirtualized `EuiSelectable`s to not cause Jest/jsdom errors on active option change ([#7618](elastic/eui#7618)) ## [`v93.5.0`](https://github.com/elastic/eui/releases/v93.5.0) - `EuiHeaderLinks` now accepts a `children` render function that will be passed a `closeMobilePopover` callback, allowing consumers to close the mobile popover by its content ([#7603](elastic/eui#7603)) - Updated `EuiSelectable` to support scrolling list containers when `listProps.isVirtualization` is set to `false` ([#7609](elastic/eui#7609)) **Bug fixes** - Fixed `EuiIconTip`'s default `aria-label` text to be i18n tokenizable ([#7606](elastic/eui#7606)) - Fixed `EuiTextArea`'s CSS box model to no longer render a few extra pixels of strut height ([#7607](elastic/eui#7607)) **Dependency updates** - Updated `@types/refractor` to v3.4.0 ([#7590](elastic/eui#7590)) - Updated `@types/lodash` to v4.14.202 ([#7591](elastic/eui#7591)) - Removed `@types/resize-observer-browser` dependency. `ResizeObserver` types should already be baked in to Typescript as of 4.2+ ([#7592](elastic/eui#7592)) - Updated `classnames` to v2.5.1 ([#7593](elastic/eui#7593)) - Updated `@types/numeral` to v2.0.5 ([#7594](elastic/eui#7594)) - Updated `@types/react-window` to 1.8.8 ([#7597](elastic/eui#7597)) - Updated `prop-types` to v15.18.1 ([#7602](elastic/eui#7602)) - Removed `prop-types` as a peer dependency, per package recommendation ([#7602](elastic/eui#7602)) **Accessibility** - `EuiIcons` no longer apply `aria-hidden` to empty icons, as long as a valid title or label is provided to the icon. In particular, this is intended to improve the accessibility of loading `EuiIconTip`s. ([#7606](elastic/eui#7606))
Summary
@jeramysoucy pointed out this missing functionality/feature request in the ability to turn off virtualization in
EuiSelectable
- it should continue to support scrolling as necessary. This is fairly trivial for EUI to do and it's not totally clear to me why it wasn't implemented in the first place whenisVirtualized={false}
was added as a prop, so I've gone ahead and added support for that in this PR.QA
Virtualized
toggle to offGeneral checklist
- [ ] Checked in both light and dark modes- [ ] Checked in mobile-~ [ ] Props have proper autodocs (using
@default
if default values are missing) and playground toggles~- [ ] Checked Code Sandbox works for any docs examples- [ ] If applicable, added the breaking change issue label (and filled out the breaking change checklist)