-
Notifications
You must be signed in to change notification settings - Fork 843
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
Fix time selection in EuiSuperDatePicker #1704
Fix time selection in EuiSuperDatePicker #1704
Conversation
jenkins test this 🎵flaky test 🎶 |
🤔
Are these just flaky or do we have problems on master? |
lol |
@snide the issue Greg mentions above is because the overflowed div is getting scrolled back "into view"; any ideas? |
@chandlerprall I'll take a look, but it's definitely a better tradeoff. |
@thompsongl given Dave's comment above on the tradeoff, mind giving this a full review? |
@chandlerprall @cchaos I should have a fix incoming. But you can review everything else. |
Committed a fix in. Nothing a few flex grows can't fix! Thanks for the quick read @cchaos |
There's a non-breaking, but annoying IE11 issue with my change. Fixing that now |
@chandlerprall Is there no way to retain auto-scrolling to the selected time on open? |
* Make EuiPopover's repositionOnScroll prop optional in TS * changelog
@cchaos derp I hadn't pushed all my changes up, and forgot about them trying to solve that scroll-on-tab-focus issue |
Added a fix for #1711 while i was in there |
CHANGELOG.md
Outdated
|
||
**Bug fixes** | ||
|
||
- Added button to `EuiSuperDatePicker`'s “Now” tab to trigger the "now" time selection ([#1620](https://github.com/elastic/eui/pull/1620)) |
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.
Why does this keep moving? It's technically not a bug fix....
OK. I'm out of this PR. IE works and shouldn't have weird stretches anymore. |
I think a bad merge/rebase happened here. |
…erprall/eui into bug/1596-datepicker-time-selector
Still missing this changeset, I think? |
Logic conflicted with Dave's changes, I've updated and re-pushed. @cchaos @thompsongl I believe everything's ready for testing again. |
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.
Changes LGTM.
Manual test results in expected scroll behavior
Still need changelog
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.
Fan freakin fantastic! 🥇
* Update react-datepicker time selector to not _always_ scroll to preSelection time * Update react-datepicker time selection scroll-into-view onMount logic * revert props default changes I made for testing * fix scroll issue * fix ie issue * A few more dark mode fixes (elastic#1700) * 9.2.0 * Updated documentation. * Make EuiPopover's repositionOnScroll prop optional in TS (elastic#1705) * Make EuiPopover's repositionOnScroll prop optional in TS * changelog * fix range coloring * Fix scrollTop target * changelog
Summary
Fixes #1596
Fixes #1711
The time selector had a
componentDidUpdate
that would always scroll the pre-selected time into view, which was implemented for keyboard up/down arrows to properly navigate the list. I've updated that function's logic to:I also simplified the scrolling to the selected/preselected time in
componentDidMount
, now unified across the react-datepicker docs and our super date picker where we changes the scrollable element.Checklist
- [ ] This was checked in mobile- [ ] This was checked in IE11- [ ] This was checked in dark mode- [ ] Any props added have proper autodocs- [ ] Documentation examples were added- [ ] Jest tests were updated or added to match the most common scenarios- [ ] This required updates to Framer X components