Skip to content
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

ui: open TimeScaleDropdown directly to the custom menu when custom is selected #81855

Merged
merged 1 commit into from
May 26, 2022

Conversation

jocrl
Copy link
Contributor

@jocrl jocrl commented May 25, 2022

Fixes #78499

This commit modifies the TimeScaleDropdown so that if a custom time is currently
select it opens directly to the custom selection menu, and a "Preset Time
Ranges" navigation link to go to the preset options from the custom menu.

This commit also cleans up the unused DateRange component.

779475.open.directly.to.custom.when.custom.is.selected.480p.mov

Release note (ui): The time picker now opens directly to the custom time
selection menu when a custom time is already selected. A "Preset Time Ranges"
navigation link has been added to go to the preset options from the custom
menu.

@jocrl jocrl requested review from 1lann and a team May 25, 2022 19:35
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@maryliag maryliag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!
just a tiny nit, otherwise :lgtm:

Reviewed 9 of 10 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @1lann and @jocrl)


pkg/ui/workspaces/cluster-ui/src/timeScaleDropdown/timeScaleDropdown.spec.tsx line 207 at r1 (raw file):

    );

    // When a preset option is selected, the dropdown should open to other preset options

small nit: add period to the end of all comments

@jocrl jocrl requested a review from a team May 26, 2022 14:57
@jocrl
Copy link
Contributor Author

jocrl commented May 26, 2022

TFTR!

@Annebirzin, just checking that the spacing for "Preset Time Ranges" looks good?

… selected

Fixes cockroachdb#78499

This commit modifies the TimeScaleDropdown so that if a custom time is currently
select it opens directly to the custom selection menu, and a "Preset Time
Ranges" navigation link to go to the preset options from the custom menu.

This commit also cleans up the unused DateRange component.

Release note (ui): The time picker now opens directly to the custom time
selection menu when a custom time is already selected. A "Preset Time Ranges"
navigation link has been added to go to the preset options from the custom
menu.
@jocrl jocrl force-pushed the time-picker-sticky-custom branch from a798c0a to bc10e2b Compare May 26, 2022 15:00
@jocrl
Copy link
Contributor Author

jocrl commented May 26, 2022

Added periods to comments.

@Annebirzin
Copy link

looks good, thanks @jocrl!

@jocrl
Copy link
Contributor Author

jocrl commented May 26, 2022

bors r+

@craig
Copy link
Contributor

craig bot commented May 26, 2022

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance the time range selectors for better usability
4 participants