Skip to content

refactor: structure of the fetchers folder#1861

Merged
simaopsbarbosa merged 5 commits into
developfrom
refactor/fetchers_folder
Jul 15, 2026
Merged

refactor: structure of the fetchers folder#1861
simaopsbarbosa merged 5 commits into
developfrom
refactor/fetchers_folder

Conversation

@simaopsbarbosa

@simaopsbarbosa simaopsbarbosa commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Closes #1859

i organized the structure of the fetchers folder with a new domain / feature-based organization system. here is a brief before and after:

Before

lib/controller/fetchers/
      ├── course_units_fetcher/
      │   ├── all_course_units_fetcher.dart
      │   ├── course_units_info_fetcher.dart
      │   └── current_course_units_fetcher.dart
      ├── location_fetcher/
      │   ├── location_fetcher.dart
      │   ├── location_fetcher_asset.dart
      │   └── location_fetcher_osm.dart
      ├── schedule_fetcher/
      │   ├── schedule_fetcher.dart
      │   ├── schedule_fetcher_api.dart
      │   └── schedule_fetcher_new_api.dart
      ├── book_fetcher.dart
      ├── calendar_fetcher_json.dart
      ├── courses_fetcher.dart
      ├── departures_fetcher.dart
      ├── exam_fetcher.dart
      ├── faculties_fetcher.dart
      ├── fees_fetcher.dart
      ├── library_occupation_fetcher.dart
      ├── news_fetcher.dart
      ├── print_fetcher.dart
      ├── professor_info_fetcher.dart
      ├── profile_fetcher.dart
      ├── profile_info_fetcher.dart
      ├── reference_fetcher.dart
      ├── restaurant_fetcher.dart
      ├── session_dependant_fetcher.dart
      └── terms_and_conditions_fetcher.dart

After


lib/controller/fetchers/
      ├── core/ # base interfaces & application-level configurations
      │   ├── session_dependent_fetcher.dart # (spelling correction & renamed)
      │   └── terms_and_conditions_fetcher.dart
      │
      ├── academics/ # enrollments, schedules, grades, and faculty calendars
      │   ├── course_units/ # subdomain for course unit pages (moved)
      │   │   ├── all_course_units_fetcher.dart
      │   │   ├── course_units_info_fetcher.dart
      │   │   └── current_course_units_fetcher.dart
      │   ├── schedule/ # subdomain for timetable schedules (moved)
      │   │   ├── schedule_fetcher.dart
      │   │   ├── schedule_fetcher_api.dart
      │   │   └── schedule_fetcher_new_api.dart
      │   ├── calendar_fetcher.dart # (renamed from calendar_fetcher_json.dart)
      │   ├── courses_fetcher.dart
      │   ├── exam_fetcher.dart
      │   ├── faculties_fetcher.dart
      │   └── professor_info_fetcher.dart
      │
      ├── profile/ # student profile and personal details
      │   ├── profile_fetcher.dart
      │   └── profile_info_fetcher.dart
      │
      ├── finances/ # account balances, statement logs, fees, and ATM references
      │   ├── current_account_fetcher.dart # (renamed from fees_fetcher.dart)
      │   ├── print_fetcher.dart
      │   └── reference_fetcher.dart # (multibanco payment references)
      │
      ├── campus/ # campus resources, canteen menu, libraries, map pins, and news
      │   ├── locations/ # subdomain for maps and floor plans (moved)
      │   │   ├── location_fetcher.dart
      │   │   ├── location_fetcher_asset.dart
      │   │   └── location_fetcher_osm.dart
      │   ├── book_thumbnail_fetcher.dart # (renamed from book_fetcher.dart)
      │   ├── library_occupation_fetcher.dart
      │   ├── news_fetcher.dart # (university news feed)
      │   └── restaurant_fetcher.dart # (restaurant menus)

Other changes

  • i renamed fees_fetcher.dart to current_account_fetcher.dart
  • i renamed book_fetcher.dart to book_thumbnail_fetcher.dart
  • i renamed calendar_fetcher_json.dart to calendar_fetcher.dart
  • i renamed session_dependant_fetcher.dart to session_dependent_fetcher.dart (typo)
  • fixed all imports
  • removed bus related fetchers and entities

Review checklist

  • Terms and conditions reflect the changes

View Changes

  • Description has screenshots of the UI changes.
  • Tested both in light and dark mode.
  • New text is both in portuguese (PT) and english (EN).
  • Works in different text zoom levels.
  • Works in different screen sizes.

Performance

  • No helper functions to return widgets are added. New widgets are created instead.
  • Used ListView.builder for Long Lists.
  • Controllers (TextEditingController, ...) are beeing disposed of in dispose() method.

@simaopsbarbosa simaopsbarbosa self-assigned this Jun 4, 2026
@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 6%. Comparing base (34157d8) to head (df02ab2).
⚠️ Report is 1 commits behind head on develop.

❌ Your project check has failed because the head coverage (6%) 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   #1861   +/-   ##
=======================================
+ Coverage        6%      6%   +1%     
=======================================
  Files           38      38           
  Lines         2148    2121   -27     
=======================================
  Hits           125     125           
+ Misses        2023    1996   -27     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@simaopsbarbosa
simaopsbarbosa requested a review from a team June 5, 2026 09:23

@goncalopinto1 goncalopinto1 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 🚀

@pedroafmonteiro pedroafmonteiro 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.

Looks good! Just need to solve the conflicts and is ready to merge! 🚀

@simaopsbarbosa
simaopsbarbosa merged commit c5a225a into develop Jul 15, 2026
6 checks passed
@simaopsbarbosa
simaopsbarbosa deleted the refactor/fetchers_folder branch July 15, 2026 14:21
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.

Organize the Fetchers folder

3 participants