-
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] Add configurable truncation #7388
Commits on Nov 25, 2023
-
[docs] Set up basic truncation demo
- documentating `textWrap` for now, will also demo `truncationProps` once we add that
Configuration menu - View commit details
-
Copy full SHA for e942628 - Browse repository at this point
Copy the full SHA e942628View commit details -
Set up logic for rendering truncated vs non-truncated text
+ add logic for conditionally rendering `<EuiHighlight>` if no search is present (removes a `<span>` wrapper and extra logic) + add tests
Configuration menu - View commit details
-
Copy full SHA for b6c51af - Browse repository at this point
Copy the full SHA b6c51afView commit details -
[optional] Allow configuring
textWrap
per-optionnot super sure how useful this is, since it requires virtualization to be off, but I want this API to match the upcoming `truncationProps`
Configuration menu - View commit details
-
Copy full SHA for fff157a - Browse repository at this point
Copy the full SHA fff157aView commit details -
Add
truncationProps
configuration+ configurable at the option level as well + bonus grammar/link fix on combobox truncationProps docs
Configuration menu - View commit details
-
Copy full SHA for 3dafd5b - Browse repository at this point
Copy the full SHA 3dafd5bView commit details -
[docs] Add truncation props configuration
+ fix broken link on combobox page
Configuration menu - View commit details
-
Copy full SHA for 09cfbfd - Browse repository at this point
Copy the full SHA 09cfbfdView commit details -
[setup] Add a
data
attr to text truncate components w/ resize obser……vers - to help analyze downstream component performance
Configuration menu - View commit details
-
Copy full SHA for d815cdb - Browse repository at this point
Copy the full SHA d815cdbView commit details -
[workaround] Fix bizarre cross-browser issue where truncation calcula…
…tion is slightly off the `width` is correct but canvas's `measureText` API is off very slightly on mount for some very frustrating reason the best solution/workaround I came up with was adding a configurable tick/wait (and yes, 1 doesn't work either, has to be 2 for EuiSelectable :/)
Configuration menu - View commit details
-
Copy full SHA for 5a1fe1b - Browse repository at this point
Copy the full SHA 5a1fe1bView commit details -
[perf] Reduce individual resize observer instantiations for each trun…
…cated line - by using `EuiAutoSizer` and attempting to guesstimate the default available width for options that don't have custom `append` or `prepend` nodes [cleanup] Move several `options` based vars to state, to more explicitly limit the amount of times they fire/cause rerenders + fix `EuiAutoSizer` test mock to fire `onResize` on mount (same behavior as actual prod)
Configuration menu - View commit details
-
Copy full SHA for 0a58bd8 - Browse repository at this point
Copy the full SHA 0a58bd8View commit details -
- some tests copied from EuiComboBox, but EuiSelectable also has extra affordances that need to be tested for (resizing etc)
Configuration menu - View commit details
-
Copy full SHA for 901c697 - Browse repository at this point
Copy the full SHA 901c697View commit details -
Configuration menu - View commit details
-
Copy full SHA for cc72686 - Browse repository at this point
Copy the full SHA cc72686View commit details
Commits on Nov 29, 2023
-
Co-authored-by: Tomasz Kajtoch <tomek@kajto.ch>
Configuration menu - View commit details
-
Copy full SHA for 6cef78b - Browse repository at this point
Copy the full SHA 6cef78bView commit details