fix(discover1): Fix date for GlobalSelectionHeader not being updated#15948
Conversation
|
Would you mind adding a screenshot / gif of what has changed? Percy is not showing any diff. I don't really have feedback on the UX side of things (this was @ckj / design team's area) but this should probably go through design review before merging. Also, is the date fix separate to the new UX that is being introduced, or do they somehow depend on each other? I'd suggest splitting this into 2 PRs if possible, the PR title only really captures half of what's going on here. |
|
The test failures are related |
|
@leedongwei It is likely related to my PR at #15400 I was able to still reproduce the issue I was resolving as follows:
The crux is the issue is that after saving a Discover v1 query with absolute date ranges, the Django backend will return those same absolute date ranges in a different datetime format. This datetime format is incompatible with the My approach in my PR was to normalize any and all datetime strings to a compatible datetime format on the frontend side. |
|
@lynnagara The changes are not UI-related. For the list of Previously:
In this PR:
|
|
I don't quite follow why we only update at d but not b or c. What's the rule here? |
|
@leedongwei makes sense to me 👍 @lynnagara To clarify, the invariant is that the list is always sorted by Clicking on saved queries is not considered an action that updates a saved query. |
|
The original implementation was that the list was sorted by The PR removes this quirky movement (along with fixing a bug or two). |
b0382fe to
e253946
Compare
e253946 to
e65f57b
Compare

@lynnagara It's been >1 year since you looked at this but I wanted to check in to make sure I'm not missing anything. I removed the
topSavedQueryondiscover/sidebar/savedQueryList.tsxbecause the UX does not make sense to me.Current implementation sorts the queries by
dateUpdatedbut the most recently viewed query is placed at the top (and then moved back to its original position when another query is viewed). IMO if we want to pop and place the most recently viewed query on top of the stack, then we should be tracking alastSeenproperty.@dashed I can't tell if this is related to the issue that you're trying to fix in #15400. I'm not encountering any issues with the date format.
Refs ISSUE-637