Skip to content

Conversation

@domai-tb
Copy link
Member

@domai-tb domai-tb commented Jun 23, 2025

Planner & Calendar

This update refactors the Event page to a unified Campus-wide Feed and a separate Calendar.

Features

  • Calendar UI: Daily, Weekly, Monthly
  • (Pomodoro) Timer
  • Integration with Feed and other useful existing features
  • Integration of VVZ
  • Open ideas etc.

Fixes

Code Quality / Internals

  • Unit-Testing (ideally)

AzadWanli added 7 commits June 3, 2025 16:39
- Replaced AStA event calendar with a new user-editable planner.
- Implemented TableCalendar for date navigation and event display.
- Added functionality for users to create and view personal events.
- Basic event model (PlannerEventEntity) and state management (PlannerState) for in-memory event handling.
- Improved selected day visibility and addressed linting issues.
- Replaced `table_calendar` with the `calendar_view` package to enable timeline-based week and day views.
- Implemented view-switching logic in the AppBar to toggle between month, week, and day views.
Corrects multiple visual inconsistencies and theming issues within the planner's calendar views (Month, Week, and Day) to ensure they align with the application's overall light/dark theme.

- Replaced the default `MonthView` builders, which used hardcoded light-theme colors, with custom `cellBuilder` and `weekDayBuilder` implementations that source colors directly from the app's `ThemeData`.
- Unified the `HeaderStyle` across all three views to ensure a consistent header appearance.
- Corrected the `MonthView` weekday labels (e.g., "Mon") to match the format used in the `WeekView`.
- Styled cells with events in the `MonthView` to have a colored background and rounded corners, similar to event tiles in other views.
Adds the ability for users to edit and delete events they have created in the planner.

- Adds a unique ID to the `PlannerEventEntity` to ensure events can be reliably identified and modified.
- Implements `updateEvent` and `deleteEvent` methods in `PlannerState` to handle the business logic for modifying the event list.
- Implements a unified dialog (`_showAddOrEditEventDialog`) for both creating new events and editing existing ones.
- Adds a details dialog (`_showEventDetailsDialog`) that appears on event tap, providing "Edit" and "Delete" options.
- Includes a confirmation step for deletions to prevent accidental data loss.
- Wires up tap handlers in the Month, Week, and Day views to trigger the new functionality.
Introduces the ability for users to create, edit, and view planner events that span multiple days.

- Refactored the `PlannerEventEntity` data model to use `startDateTime` and `endDateTime`, replacing the previous single-day structure.
- Updated the "Add/Edit Event" dialog with dedicated pickers for setting a full start and end date-time for events.
- Implemented logic to process multi-day events and split them into daily segments, allowing them to be rendered correctly across multiple days in all calendar views.
- Integrated the `rrule` package to handle the complex logic of parsing rules and generating event occurrences.

- Added a "Repeats" button to the event dialog, which opens a new, detailed dialog for setting recurrence patterns (e.g., daily, weekly, monthly, yearly).

- The recurrence dialog allows users to specify an interval and an end condition (never, on a specific date, or after a set number of occurrences).
@domai-tb domai-tb added feature:events Everything that is related to personal or campus-wide events. enhancement New feature or request labels Jun 23, 2025
AzadWanli added 15 commits July 4, 2025 12:40
- split dialogs, calendars, FAB, and view switch into widgets/
- move date helpers to utils
- PlannerPage now only wires state + UI
* Disposed EventController in _PlannerPageState.dispose() to prevent
  ChangeNotifier leaks during hot-reload and page tear-down.

* Added listener on PlannerState in initState() and created
  _syncEventController() helper.
  - Moves heavy removeAll/addAll work out of build()
  - Sends only a single notification per state change
  - Eliminates scroll-jump and redundant rebuild cost.
…handling

• “Merken / Nicht mehr merken” button in CalendarDetailPage now adds/removes
  the displayed event to/from the local Planner.
• Added Event→Planner mapper (calendar_event_planner_mapper.dart) to convert
  Calendar Event objects into PlannerEventEntity.
• EventDetailsDialog now renders HTML descriptions with StyledHTML instead
  of raw text.
• Hide “Edit” button for imported Calendar events; it remains visible only
  for user-created planner events (detected by dashed UUID).
• Introduced layered structure
data: planner_datasource.dart – Hive I/O only

domain:
entities/planner_event_entity.dart
planner_repository.dart
planner_usecases.dart

application: planner_state.dart

UI: planner_page.dart + dialogs widgets

• Dependency-injection
  · registerSingletonAsync<PlannerDatasource>() now opens Hive box
  · registerSingletonWithDependencies for Repository + Usecases

• Added StorageFailure to core/failures.dart for local-storage errors
- Normalize local ↔ UTC handling (dialogs, utils, mapper).
- Emit single range events (date + endDate) instead of per‑day splits.
- Restore taps for full‑day / multi‑day events in WeekView & DayView.
• MonthView: max 3 rows; compact tiles; “+ n more” opens detail sheet
• Week/Day full‑day rows list multi‑day events on each day
fix: event colors, 2 h default, smaller labels in add_edit_event_dialog
* Month‑view cells now open **AddEditEventDialog** for the tapped day
* Dialog starts at “current clock time” on that day
* FAB opens the same dialog for **today @ now** instead of last‑focused date
* Start/End labels switched to `dd/MM/yyyy h:mm a` for consistent D/M/Y display
* Month‑view cells now open **AddEditEventDialog** for the tapped day
* Week & Day view background taps open dialog at the tapped slot time
* Dialog starts at “current clock time” on that day
* FAB opens the same dialog for **today @ now** instead of last‑focused date
* Start/End labels switched to `dd/MM/yyyy h:mm a` for consistent D/M/Y display
…campus_app into feature/planner"

This reverts commit 1b68e00, reversing
changes made to 159cc7b.
Event colour survives restarts.
PlannerEventEntity now accepts `colorValue`;
style(ui): adjust font sizes + tweak WeekView timeline width
style(ui): - adjust font sizes
- tweak WeekView timeline width
- unify calendar theming
- polish UI
AzadWanli and others added 13 commits July 23, 2025 16:53
- Toggle button on meal title row (prevents duplicates)
- Uses MensaDayNotifier for selected day
- RestaurantLocation via Provider;

- planner UI fixes
- Toggle button on meal title row (prevents duplicates)
- Uses MensaDayNotifier for selected day
- RestaurantLocation via Provider;

- planner UI fixes
- Planner Unecessary cancel button in RecurrenceOptionsDialog removed
@domai-tb domai-tb added this to the v2.5 milestone Oct 7, 2025
@domai-tb domai-tb moved this to In progress in Campus App by AStA Roadmap Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature:events Everything that is related to personal or campus-wide events.

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

Wrong displayed copyright Saved events not saved None website links are not handled proberley

5 participants