[EuiDataGrid] Refactor & write unit tests for fullscreen control + Standardize 'fullscreen' copy#5680
Conversation
- follows other toolbar/control behavior - makes it easier to unit test - makes it easier to track different full-screen related logic/events in one place
+ add 'Enter' verb per Gail's suggestion + fix data grid test with misspelled 'screen'
|
@chandlerprall Does this warrant a changelog entry? The first part is definitely internal only, but I'm not sure we add entries for basic copy changes since in theory our i18n changelog should capture that 🤔 |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5680/ |
The i18n keys changed, which should be mentioned and even constitutes a breaking change because existing translations will need to be updated to match the new keys. |
|
👍 Gotcha, I hadn't seen previous changelog entries with mention of copy changes before so I wasn't sure. I can definitely add a breaking changelog. |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5680/ |
chandlerprall
left a comment
There was a problem hiding this comment.
One more nit, otherwise changes LGTM. The new full_screen_selector & its test file should drop the underscore in full_screen to match it being one word everywhere else.
|
FWIW our many internal |
|
Ohh that's right, the file name actually affects the i18n token name so this was a great call! |
That side effect didn't occur to me, but even better! 😄 |
chandlerprall
left a comment
There was a problem hiding this comment.
Re-approving for good luck
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5680/ |
Summary
This is essentially a 2 part PR, both parts centered around the fullscreen behavior of EuiDataGrid:
[Tech debt] Refactors all disparate parts of our fullscreen logic (some previously lived in the main
data_gridfile, others indata_grid_toolbar) to a single selector hook/file, and writes missing unit tests for said fullscreen mode logic.[Copy] closes [EuiDataGrid] Typo in fullscreen tooltip #5653 and addresses all other components to convert
full(-)screen->fullscreenper Caroline's commentTest coverage
Before:

After:

QA
Other than the 'fullscreen' tooltip text, no fullscreen functionality should have changed as a result of this PR:
setIsFullScreendemo should still work as beforerestrictBodyclass should be correctly applied to and removed from the bodyChecklist
- [ ] Check against all themes for compatibility in both light and dark modes- [ ] Checked in mobile- [ ] Checked in Chrome, Safari, Edge, and Firefox- [ ] Checked for accessibility including keyboard-only and screenreader modes- [ ] Props have proper autodocs and playground toggles- [ ] Added documentation- [ ] Checked Code Sandbox works for any docs examples