Use one time-range formatter everywhere #65
Labels
No labels
bug
chore
data
feature
frontend
good first issue
intermediate
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/cal#65
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What's wrong
Two helpers format an event's time range, and they disagree. The manager dashboard shows "Mon, Feb 16 [middle dot] 6:30 PM - 7:45 PM" while Explore and the event popover show "Mon, Feb 16, 6:30 - 7:45 PM". The first also uses a non-ASCII middle dot.
How to reproduce
Expected
One helper, one format, used everywhere.
Where to look
web/src/app/utils/formatters.ts:formatDateRange, used byManagerDashboard.tsxandEventCard.tsx.web/src/app/components/EventCard.tsx: nothing imports it; delete it.web/src/app/utils/dateService.ts:formatTimeRange, used byEventPopover.tsx,ModalEvent.tsxandSearchResultSidebar.tsx. Keep this one.timeZoneargument to the same function; coordinate.Done when
formatters.tsandEventCard.tsxare gone, and ManagerDashboard usesformatTimeRange.grep -rn "formatDateRange" web/srcfinds nothing.