feat(app): new compact date range view option for UI and Print for upcoming events - #5321
feat(app): new compact date range view option for UI and Print for upcoming events#5321ux-git wants to merge 3 commits into
Conversation
The shared rules that recolour icons (`& svg, & svg g, & svg g path`, in menuitem, textfield, dashboard menu and elsewhere) only reach a path nested inside a <g>. Every other icon in the set wraps its shapes that way; the cart did not, so none of its twelve shapes matched and the inline fill stayed black on hover. The same gap is why theme_switch had to hand-patch `& svg ellipse` for its own icon. Wrap the shapes in a <g>, and express the wheel as a path rather than an <ellipse> so `svg g path` reaches it too. The path draws the same geometry — both give a bbox of 15.317,18.894 3.457x4.502. The artwork is otherwise untouched.
DatePicker already forwards both to its text field slot. TimePicker renders a PickersTextField, which supports them just as well, so expose the same two props rather than making callers render their own error line underneath.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe PR adds whole-day event editing, configurable multi-day display modes, data-view filtering, shared event formatting/grouping, delete confirmation, and updated calendar/PDF rendering. It also forwards TimePicker validation props and updates the cart icon SVG structure. ChangesUpcoming event flexibility
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Admin
participant MultiDayDisplay
participant SettingsStore
participant UpcomingEventsState
participant UpcomingEventData
participant UpcomingEvent
Admin->>MultiDayDisplay: choose display mode
MultiDayDisplay->>SettingsStore: persist events_multiday_display
UpcomingEventsState->>UpcomingEventData: provide filtered event
SettingsStore-->>UpcomingEventData: provide display setting
UpcomingEventData-->>UpcomingEvent: return wholeDay and showAsRange
UpcomingEvent->>UpcomingEvent: render timed, daily, or range output
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
52ae7cf to
1969aa0
Compare
|
Tick the box to add this pull request to the merge queue (same as
|
1969aa0 to
a5c2eec
Compare
a5c2eec to
59f0db9
Compare
Closes sws2apps#4597. `duration` was doing double duty: it encoded both how long an event spans and whether it has a specific time. That conflation is why a single-day circuit overseer visit forced a start and end time, and why only Special Campaign weeks collapsed to a date range. Split the two axes: - add `wholeDay` to event_data, defaulted per category alongside `duration`. Absent means `duration === MultipleDays`, so existing records render exactly as before and no migration is needed. - single-day events get a "Whole day" toggle; the times collapse when it is on. Pioneer meeting keeps its times, a circuit overseer visit does not. - new events default to 09:00-10:00 rather than the current clock time and an arbitrary five-hour span. - the end of an event is validated against its start, and the end time shifts along when the start passes it. - picking the start date of a circuit overseer visit prefills the end date with that week's Sunday, since the visit runs to the weekend. - the ICS export keys off `wholeDay` instead of `duration`, so a whole-day event now exports as an all-day entry. How multi-day events are laid out is a congregation setting (`events_multiday_display`), surfaced both in congregation settings under "Meeting materials, forms and schedules" and as a quick setting on the events page. Events longer than seven days always collapse to a range regardless, which keeps two-week campaigns on one line without special-casing the category the way the old code did. Two pre-existing bugs fixed along the way: - the PDF export read the unfiltered event list while the on-screen list filtered by data view, so a language group printed every other group's events alongside its own. Both surfaces now read one upcomingEventsByDataViewState atom. - deleting an event went through on a single click; it now asks first. Also corrects the names of UpcomingEventCategory members 7 and 8, which were swapped relative to the decorations table. The stored value is the array index, so the table order is deliberately left alone and no records change meaning.
59f0db9 to
216415f
Compare
|



Description
durationwas encoding two separate things: how long an event spans, and whether it has a specific time. That conflation is why a single-day circuit overseer visit forced a start and end time, and why only Special Campaign weeks collapsed to a date range.This splits the two axes:
wholeDayadded to event data, defaulted per category alongsideduration. When absent it falls back toduration === MultipleDays, so existing records render exactly as before and no migration is needed.wholeDayinstead ofduration, so a whole-day event now exports as an all-day entry.Two pre-existing bugs fixed along the way:
Also corrects the names of
UpcomingEventCategorymembers 7 and 8, which were swapped relative to the decorations table. The stored value is the array index, so the table order is deliberately left alone and no records change meaning.Fixes #4597
Note for reviewers
Congregations created before this release have no stored value for the new setting. There is no settings migration mechanism in the project, so the three read sites fall back to the schema default, following the same pattern as
first_day_weekandschedule_songs_weekend. Nothing existing is rewritten.One deliberate behaviour change: a Special Campaign of 7 days or fewer now renders as a day list rather than a single row, because the default is "Separate days". Campaigns of two weeks, the common case, are unaffected.
Type of change
Checklist: