fix: unify notifications #139

Merged
maxtkc merged 6 commits from 135-89-unify-notifications into main 2026-06-04 11:09:49 +00:00
Owner

Closes #135 Closes #89

Closes #135 Closes #89
maxtkc self-assigned this 2026-06-04 11:09:23 +00:00
- Rename NotificationSystem verbose show* methods to concise
  success/error/warning/info/loading; export singleton as notify
- Add break-words/overflow-wrap/hyphens CSS to the message span so long
  unbreakable ids wrap instead of overflowing (#135)
- Remove map-controller's private showNotification, use notify directly
- Migrate all callers to notify.*

Phase 1 of #89 + #135.
Rewrite humanLabel() to the `Type "name" verb` convention so the toast,
Changes panel, and undo/redo menu all share one wording source (#135).

- add getEntityDisplay(table, row) dispatcher + getTripDisplay() in
  entity-display.ts; resolve the entity display name from patch row data
- centralize human TYPE_LABELS map in patch-label.ts
- update patches fall back to the raw id (only changed fields are carried),
  cooperating with the Phase 1 word-break CSS
Remove the explicit success toasts that duplicated the patch-driven
notification (closes #89): agency/service/route in inline-entity-creator
and trip in schedule-controller. Drop the now-unused notificationSystem
constructor param from InlineEntityCreator and route its validation/error
notifications through the notify singleton.
Drop the conflicting break-words class so overflow-wrap:anywhere actually
applies — break-word leaves min-content at full width, which the DaisyUI
alert grid (minmax(auto,1fr)) refuses to shrink, so digit-hyphen-digit ids
(non-breaking per UAX#14) overflowed (#135). Add formatMessage() to render
the quoted entity name/id as a monospace chip and mute the changed-field
list, so ids read as identifiers and are visually distinct from prose.
Replace the hardcoded bg-black/20 on the id chip with bg-current/15 so the
tint derives from the alert's own content color (color-mix on currentColor,
the same technique DaisyUI uses), adapting per alert type and across themes.
DaisyUI's kbd/badge are inline-flex with fixed sizing and cannot wrap a long
id, so a custom wrapping span remains the right call for the #135 case.
Render the changed-field summary as muted monospace so GTFS column keys
read as keys, and bold the created/updated/deleted verb for quick scanning.
Uses weight/monospace/opacity rather than hue, since change toasts render on
an info-colored alert where semantic text colors would clash.
maxtkc merged commit 4f826d2ed4 into main 2026-06-04 11:09:49 +00:00
maxtkc deleted branch 135-89-unify-notifications 2026-06-04 11:09:50 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gtfs.zone/coloring-book!139
No description provided.