Skip to content

Feature/parking lot information#1824

Draft
HenriqueSFernandes wants to merge 5 commits intodevelopfrom
feature/parking-lot-information
Draft

Feature/parking lot information#1824
HenriqueSFernandes wants to merge 5 commits intodevelopfrom
feature/parking-lot-information

Conversation

@HenriqueSFernandes
Copy link
Copy Markdown
Contributor

Closes #1823

Copilot AI review requested due to automatic review settings March 16, 2026 13:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new “Parking Lots” feature to the app’s home/faculty views by introducing a parking occupation fetcher + Riverpod provider, new UI card components, and localized strings.

Changes:

  • Introduce parking lot occupation domain model, fetcher, and Riverpod provider.
  • Add parking lot home card UI (including loading shimmer) and a uni_ui card to render lot rows + occupancy bars.
  • Wire the new parking card into favorites/home/faculty screens and add i18n strings/icons.

Reviewed changes

Copilot reviewed 14 out of 19 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/uni_ui/lib/icons.dart Adds a parking icon mapping for UI usage.
packages/uni_ui/lib/cards/parking_lot_card.dart New UI card for rendering parking lot rows + occupancy indicator.
packages/uni_app/lib/view/home/widgets/parking/parking_home_card.dart New home card that consumes parking provider and renders ParkingLotCard.
packages/uni_app/lib/view/home/widgets/parking/parking_card_shimmer.dart Loading shimmer placeholder for the parking card.
packages/uni_app/lib/view/home/widgets/edit/draggable_utils.dart Adds parking label/icon support in the “edit home” draggable UI.
packages/uni_app/lib/view/home/home.dart Wires parking provider/card into home favorites + refresh behavior.
packages/uni_app/lib/view/faculty/faculty.dart Adds parking card to Faculty page and refreshes parking data on pull-to-refresh.
packages/uni_app/lib/utils/favorite_widget_type.dart Adds parking to the favorites enum.
packages/uni_app/lib/model/providers/riverpod/parking_lot_provider.dart New CachedAsyncNotifier-backed provider for parking occupation.
packages/uni_app/lib/model/entities/parking_lot_occupation.dart New entities/enums representing parking lots and occupation.
packages/uni_app/lib/controller/fetchers/parking_lot_fetcher.dart New network fetcher/parser for parking lot occupation endpoint.
packages/uni_app/lib/l10n/intl_pt_PT.arb Adds Portuguese translations for parking UI strings.
packages/uni_app/lib/l10n/intl_en.arb Adds English translations for parking UI strings.
packages/uni_app/lib/generated/l10n.dart Generated localization accessor updates for parking strings.
packages/uni_app/lib/generated/intl/messages_pt_PT.dart Generated pt_PT messages updates for parking strings.
packages/uni_app/lib/generated/intl/messages_en.dart Generated en messages updates for parking strings.
flake.nix Updates Flutter package selection in the Nix dev environment.
flake.lock Updates pinned nixpkgs revision/hash.
.gitignore Ignores .direnv and fixes/normalizes custom lint log ignore line.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@override
Widget build(BuildContext context) {
final occupied = capacity - free;
final ratio = capacity > 0 ? (occupied / capacity).clamp(0.0, 1.0) : 0.0;
@override
Widget build(BuildContext context) {
return GenericCard(
key: key,
Comment on lines +15 to +20
Duration? get cacheDuration => const Duration(minutes: 15);

@override
Future<ParkingLotOccupation?> loadFromStorage() async {
return null;
}
Future<ParkingLotOccupation> getParkingLotOccupation(Session session) async {
final url = '${NetworkRouter.getBaseUrl('feup')}$_endpoint';

final response = await NetworkRouter.getWithCookies(url, {}, session);
}

@override
void onCardClick(BuildContext context) => {};
Comment on lines +7 to +13
final parkingLotProvider =
AsyncNotifierProvider<ParkingLotNotifier, ParkingLotOccupation?>(
ParkingLotNotifier.new,
);

final class ParkingLotNotifier
extends CachedAsyncNotifier<ParkingLotOccupation?> {
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 0% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 7%. Comparing base (e72d0e3) to head (03c0220).
⚠️ Report is 47 commits behind head on develop.

❌ Your project check has failed because the head coverage (7%) is below the target coverage (70%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##           develop   #1824   +/-   ##
=======================================
- Coverage        7%      7%   -0%     
=======================================
  Files           38      38           
  Lines         1842    1875   +33     
=======================================
  Hits           125     125           
- Misses        1717    1750   +33     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@simaopsbarbosa
Copy link
Copy Markdown
Contributor

simaopsbarbosa commented Mar 16, 2026

i added the necessary changes for this to run on CarPlay. i could only test this with an emulator for now, because trying to run locally grants me this error:

Error (Xcode): Entitlement com.apple.developer.carplay-parking requires approval from Apple to include in a profile. Please request access to the associated capability. To continue building for device during request processing, remove entitlement and add upon approval.

anyway, this is what it looked like on the emulator:

image

@pedroafmonteiro pedroafmonteiro marked this pull request as draft March 23, 2026 14:05
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.

feat: implement the parking lot occupancy

4 participants