Skip to content

feat(campus): support Campuskino Heilbronn alongside TU Film (#389) - #390

Merged
jakobkoerber merged 5 commits into
TUM-Dev:mainfrom
gerovonmanstein:campuskino-heilbronn
Nov 22, 2026
Merged

jakobkoerber merged 5 commits into
TUM-Dev:mainfrom
gerovonmanstein:campuskino-heilbronn

Conversation

@gerovonmanstein

@gerovonmanstein gerovonmanstein commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #389

This PR introduces support for Campuskino Heilbronn alongside the existing TU Film program under the Campus tab and the Home screen movie carousel.

Changes

  • Preference Management: Added UserPreference.cinema so user selection is persisted across app sessions and resets cleanly to "Closest".
  • Dynamic Selection (UX): Added a filter button (Icons.filter_list) in MovieScreen using the shared PreferenceSelectionView, matching the existing Cafeteria and Departures behavior.
  • Dynamic Headers & Actions:
    • MovieScreen title and website action adapt to the currently active cinema (tu-film.de vs. unifilm.de/studentenkinos/heilbronn).
    • MovieWidgetView section header updates dynamically.
    • CampusScreen shortcut chip uses the localized string movies ("Filme").
  • Data Fetching & Fallback:
    • TU Film continues to use the existing gRPC backend.
    • Campuskino Heilbronn scrapes unifilm.de/studentenkinos/heilbronn via dio and html, with an automatic fallback card to the website if the cinema is currently on semester break.

Verification

  • Code conforms to project conventions and uses existing dependencies (dio, html, material_ui).
  • Translations updated (filter in de.json and en.json).
  • Verified compatibility with MovieCardView and CampusCollectionView.

@jakobkoerber jakobkoerber left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @gerovonmanstein, thanks for your contribution! That's a nice addition to the app. The code looks good and reuses most of the components in place. I added some comments to make the code a bit more coherent. Give them a look and let me know if you have questions

@gerovonmanstein

Copy link
Copy Markdown
Contributor Author

Habe gerade die Vorschläge gesehen. Bin dran :) Re-request review kommt nochmals

- extract _parseMovie and use .map().whereType().toList()
- use null date instead of falling back to currentDate when date can't be parsed
- guard date display in MovieCardView with hasDate()
- filter out past screenings for Campuskino Heilbronn to match TU Film behaviour
- replace _cinemaNames/_cinemaWebsites lists with a readable-key Map
- consolidate into _readSavedCinema()/setCinema(int?) with null for Closest
- log preference errors with debugPrint instead of swallowing them
@gerovonmanstein

Copy link
Copy Markdown
Contributor Author

Hey @jakobkoerber, thanks for the review! I've addressed all the points and also noticed that Campuskino Heilbronn was showing past screenings unlike TU Film. So I added a .where() to filter those out.

Here is what you recommended and what I changed:

  • Extracted _parseMovie and replaced the for-loop with .map().whereType().toList()
  • movieDate is now DateTime? — no longer falls back to currentDate when a date can't be parsed; the card guards the date display with hasDate()
  • Replaced the two parallel lists with a single Map with readable keys (tuFilm, campuskinoHeilbronn)
  • Consolidated into one _readSavedCinema() → int? and setCinema(int?), using null for "Closest" as you suggested
  • Both catch blocks now debugPrint the error

@jakobkoerber jakobkoerber left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will do an E2E this evening :)

  • E2E Test in Simulator

@jakobkoerber
jakobkoerber merged commit 10c4e97 into TUM-Dev:main Nov 22, 2026
3 checks passed
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] Support Campuskino Heilbronn alongside TU Film

2 participants