Conversation
chippison
left a comment
There was a problem hiding this comment.
We also seem to have removed 'rolling dates' (today, last7, last30, thisMonth etc) in the url.
This will mean if a period is saved/bookmarked, when the that bookmarked date is returned to, it will no longer have the same context.
Meaning if I chose to get a report for the last month (lets say this month is: June, then last month is May) and bookmarked it,
Previously, once we go to the bookmarked page after a month, it will show 'last months' report (show June report since its July after a month),
Now, it will still show May's report
This seems to be a previous needed behaviour since we put in a bunch of code to make this work.
If we decide not to honor the rolling dates anymore, there would be a bunch of dead code that needs cleaning up
chippison
left a comment
There was a problem hiding this comment.
There are some double/redundant functions that we can remove.
Also a 'dead' css rule as well
| const exactMatch = PRESET_DATE_RANGES.find((preset) => { | ||
| const resolvedPreset = resolvePresetDateRange(preset.id, todayInput); | ||
| return resolvedPreset.period === period && resolvedPreset.date === date; | ||
| }); |
There was a problem hiding this comment.
Nitpicking here:
You seem to have called PRESET_DATE_RANGES.find twice in this function. (line: 326 and 337)
Could be done in one
chippison
left a comment
There was a problem hiding this comment.
There is a regression when clicking through the dates:
- Rolling dates disappear/go back to real dates when reclicking on the preset for
last7,last30,last90
rolling-dates-disappear.mov
- When clicking on a preset date, I can no longer add comparisons to it unless I change preset first
Description
This PR improves the preset period selector behavior:
Screen.Recording.2026-06-01.at.23.58.30.mov
issue dev-20172 #24425
Test Scenario
Checklist
Review