Repository navigation
feat: override the time zone on the search and dashboard pages - #3495
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
🟡 Tier 3 — StandardIntroduces new logic, modifies core functionality, or touches areas with non-trivial risk. Why this tier:
Review process: Full human review — logic, architecture, edge cases. Stats
|
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
PR Review
5 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 5 minor 1 posted as inline comment(s) on the changed lines. 4 listed below. Findings outside the changed lines4 minor
Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
[Medium impact] The PR appears safe to merge; the fullscreen time zone issue is fixed. SummaryAdds a page-only time zone override for Search and dashboards.
|
Deep Review✅ No critical issues found. The change is well-scoped and well-tested: the three prior review findings (fullscreen zone desync 🟡 P2 — recommended
🔵 P3 nitpicks (2)
Reviewers (8): correctness, testing, maintainability, project-standards, kieran-typescript, julik-frontend-races, adversarial, previous-comments. Testing gaps: external-link exclusion of No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
E2E Test Results✅ All tests passed • 460 passed • 1 skipped • 1529s
Tests ran across 4 shards in parallel. |
Add a time zone selector to the time picker on the search and dashboard pages. It overrides the user's time zone setting for that page and is kept in the tz URL param, so links and reloads keep it. - TimeZoneOverrideProvider reads tz; useDisplayTimeZone prefers it over the user setting, and ignores zones the browser doesn't know - The picker input shows the zone it uses, highlighted when it isn't the browser's, and its popover ends with the selector - TimeZoneSelect gains a default option that clears the override, and shows each zone's offset, including on the selected value - Default, UTC and Local shortcut buttons under the selector; User Preferences gets UTC and Local - Show short zone labels as UTC offsets rather than abbreviations - Links from charts and table rows to Search and dashboards carry tz - The sidebar badge stays on the user setting
bd916d6 to
7a1eccb
Compare
🦋 Changeset detectedLatest commit: 335ff2f The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Summary
Adds a time zone selector to the time picker on the search and dashboard pages. It overrides the User Preferences time zone for that page only and is kept in the
tzURL param.TimeZoneOverrideProviderreadstz;useDisplayTimeZoneprefers it over the user setting, so everything on the page switches together. Unknown values are ignored.UTC-7), highlighted when it isn't the browser's. The popover ends with the selector plus "Default", "UTC" and "Local" buttons; User Preferences gets "UTC" and "Local".UTC-7, notPDT). The selector shows the offset on each option and the selected value, and searches by it.tz. External links don't.The override isn't saved with saved searches or dashboards.
Screenshots or video
How to test on Vercel preview
Preview routes: /search, /dashboards
Steps:
data-testid="time-picker-input"), click the "Time zone" field (data-testid="time-picker-time-zone-select"), type "tokyo" and click "Asia/Tokyo".data-testid="time-picker-time-zone") shows "UTC+9" and the URL containstz=Asia%2FTokyo.data-testid="time-picker-time-zone-default"), and verifytzis no longer in the URL.References