Skip to content

Add direct NavigaTUM and room calendar links to room details - #360

Open
kordianbruck with Copilot wants to merge 7 commits into
mainfrom
copilot/feature-add-links-to-room-calendar-nav-tum-de
Open

kordianbruck with Copilot wants to merge 7 commits into
mainfrom
copilot/feature-add-links-to-room-calendar-nav-tum-de

Conversation

Copilot AI commented Sep 12, 2026 •

Copy link
Copy Markdown

Room search exposed the relevant room details, but still required leaving the app to reach key NavigaTUM capabilities. This adds direct entry points from the room detail screen to both the canonical room page on nav.tum.de and the room calendar when the backend provides one.

  • Room detail actions

    • Adds an app bar action to open the current room directly in NavigaTUM.
    • Adds a second action for the room calendar when props.calendar_url is available.
  • NavigaTUM detail model

    • Extends room detail parsing to read props.calendar_url.
    • Adds derived URI helpers for:
      • the canonical room URL on nav.tum.de
      • the optional room calendar URL
  • URL safety

    • Treats room IDs as opaque path segments when building the NavigaTUM URL.
    • Only exposes calendar links when they resolve to trusted HTTPS campus.tum.de URLs.
  • Focused coverage

    • Extends NavigaTUM JSON model tests to cover:
      • calendar_url decoding
      • room URL construction
      • rejection of unsafe calendar URI schemes
Uri get navigaTumUri =>
    Uri(scheme: "https", host: "nav.tum.de", pathSegments: ["room", id]);

Uri? get calendarUri {
  final uri = additionalProperties.calendarUrl != null
      ? Uri.tryParse(additionalProperties.calendarUrl!)
      : null;
  if (uri == null || uri.scheme != "https" || uri.host != "campus.tum.de") {
    return null;
  }
  return uri;
}

Copilot AI and others added 6 commits September 12, 2026 14:42
Co-authored-by: kordianbruck <298860+kordianbruck@users.noreply.github.com>
Co-authored-by: kordianbruck <298860+kordianbruck@users.noreply.github.com>
Co-authored-by: kordianbruck <298860+kordianbruck@users.noreply.github.com>
Co-authored-by: kordianbruck <298860+kordianbruck@users.noreply.github.com>
Co-authored-by: kordianbruck <298860+kordianbruck@users.noreply.github.com>
Co-authored-by: kordianbruck <298860+kordianbruck@users.noreply.github.com>
Copilot AI changed the title [WIP] Add link to room calendar and nav.tum.de Add direct NavigaTUM and room calendar links to room details Sep 12, 2026
Copilot AI requested a review from kordianbruck September 12, 2026 14:46
@kordianbruck
kordianbruck marked this pull request as ready for review September 12, 2026 14:51

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add link to the room calendar and nav.tum.de

2 participants