Only call the map "live" when viewing today's date - #12
Merged
Conversation
For past dates the menu tile and page nav now just say "Map" / "See this day on the map" instead of "Live tracking map" / "Follow along on the map", since there's nothing live about a historic day.
There was a problem hiding this comment.
Pull request overview
Updates date-specific UI copy so “Live tracking map” wording is only used when viewing today’s UTC date bucket, avoiding misleading “live” phrasing for historical dates.
Changes:
- Add
todayUtcDay/isTodayUtcDayhelpers for comparingYYYY-MM-DDUTC day buckets. - Update the date menu tile wording to “Live tracking map” only when
urlDateis today. - Update the per-date nav button label so the “live” page is labeled “Map” on non-today dates.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
website/app/utils/dateTime.ts |
Adds helpers for “today” comparisons in the same UTC bucket format used by stored events. |
website/app/routes/date/index.tsx |
Switches menu tile copy between “Live tracking map” and “Map” depending on whether urlDate is today. |
website/app/components/DatePageNav.tsx |
Renames the “live” nav button to “Map” when viewing a non-today date. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
57
to
60
| export default function Page({ loaderData }: Route.ComponentProps) { | ||
| const theme = useMantineTheme(); | ||
| const isToday = isTodayUtcDay(loaderData.urlDate); | ||
| if (!loaderData.hasData) { |
Comment on lines
33
to
36
| export function DatePageNav({ password, urlDate, current }: DatePageNavProps) { | ||
| const basePath = `/${password}/${urlDate}`; | ||
| const isToday = isTodayUtcDay(urlDate); | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
todayUtcDay/isTodayUtcDayhelpers (website/app/utils/dateTime.ts) that compare aYYYY-MM-DDUTC day bucket against today, consistent with howurlDatebuckets are computed elsewhere.website/app/routes/date/index.tsx) and the page nav button (website/app/components/DatePageNav.tsx) now show "Live tracking map" / "Follow along on the map" only whenurlDateis today, and "Map" / "See this day on the map" otherwise.Test plan
npx tsc --noEmitpassesGenerated by Claude Code