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: The "custom date range" option in the time picker component should update its initial values according to the current selection #75552

Closed
jocrl opened this issue Jan 26, 2022 · 2 comments
Assignees
Labels
A-sql-console-general SQL Observability issues on the DB console spanning multiple areas. Includes Cockroach Cloud Console C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@jocrl
Copy link
Contributor

jocrl commented Jan 26, 2022

The prepopulated start and end times for the "custom date range" option is permanently stuck at 10 min before the current time. This gets annoying for users who change the time to something other than the last 10 minutes, then want to adjust it with the custom time picker. The start and end times should instead be prepopulated with the current selection.

Implementation-wise, the DateRangeMenu component most likely needs a useEffect for changing startInit and endInit props

The video also shows a bug where set a custom time -> click apply -> click the dropdown again, it shows the custom time dialogue instead of the default options. One must click "cancel" to get back to the default options.

This can be seen in db-console, on master as of d990758.

779873.custom.stuck.time.mov

Jira issue: CRDB-12724

@jocrl jocrl added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-observability A-sql-console-general SQL Observability issues on the DB console spanning multiple areas. Includes Cockroach Cloud Console labels Jan 26, 2022
@jocrl jocrl changed the title ui: The "custom date range" option in the time picker component should update its initial values according to the currently selection ui: The "custom date range" option in the time picker component should update its initial values according to the current selection Mar 24, 2022
@jocrl
Copy link
Contributor Author

jocrl commented Mar 24, 2022

Other people are noticing this; from @dt:
I'm trying to adjust my start time to capture the interesting window, but every time I re-open it, it seems to have gone back to some other time, not the time it was just set to
if i just type in the text box, when i de-focus, it seems to then pick... some other time?

jocrl added a commit to jocrl/cockroach that referenced this issue Apr 27, 2022
Addresses cockroachdb#75552. Partially addresses cockroachdb#71205.

This commit modifies the time picker custom selection to be prefilled with the
currently selected time.

Release note (ui): The time picker (in the Metrics and SQL Activity, among
other, pages) custom selection now defaults to the currently selected time.
jocrl added a commit to jocrl/cockroach that referenced this issue Apr 27, 2022
Addresses cockroachdb#75552. Partially addresses cockroachdb#71205.

This commit modifies the time picker custom selection to be prefilled with the
currently selected time.

Release note (ui): The time picker (in the Metrics and SQL Activity, among
other, pages) custom selection now defaults to the currently selected time.
craig bot pushed a commit that referenced this issue Apr 28, 2022
80660: ui: Initialize the time picker custom option with the current selection r=jocrl a=jocrl

Addresses #75552. Partially addresses #71205.

This commit modifies the time picker custom selection to be prefilled with the
currently selected time.

https://user-images.githubusercontent.com/91907326/165617651-8b1c735b-fb5d-468b-bc88-aa8d2c8ccbe3.mov

Release note (ui): The time picker (in the Metrics and SQL Activity, among
other, pages) custom selection now defaults to the currently selected time.

Co-authored-by: Josephine Lee <[email protected]>
blathers-crl bot pushed a commit that referenced this issue Apr 29, 2022
Addresses #75552. Partially addresses #71205.

This commit modifies the time picker custom selection to be prefilled with the
currently selected time.

Release note (ui): The time picker (in the Metrics and SQL Activity, among
other, pages) custom selection now defaults to the currently selected time.
@jocrl
Copy link
Contributor Author

jocrl commented May 2, 2022

Fixed by #80660

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-console-general SQL Observability issues on the DB console spanning multiple areas. Includes Cockroach Cloud Console C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

No branches or pull requests

2 participants