Conversation
…rofile info page.
…n expected. I hate SIGARRA!
…page. Change the visual aspect of the new page.
pedroafmonteiro
left a comment
There was a problem hiding this comment.
Waiting for conflict resolution!
Codecov Report❌ Patch coverage is ❌ Your project check has failed because the head coverage (14%) 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 #1799 +/- ##
========================================
+ Coverage 7% 14% +7%
========================================
Files 38 35 -3
Lines 1886 931 -955
========================================
- Hits 125 124 -1
+ Misses 1761 807 -954 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Implements the “Personal Information” feature (closes #1774) by fetching personal profile details from Sigarra and exposing them via a new profile-info page reachable from the profile settings.
Changes:
- Added profile-info fetching/parsing and new UI pages/widgets to display personal information sections.
- Added navigation entry + icon to reach the new page, and registered the route in the app router.
- Updated localization strings and regenerated ObjectBox / intl artifacts.
Reviewed changes
Copilot reviewed 25 out of 32 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/uni_ui/lib/icons.dart | Adds a new user/profile icon constant for UI navigation. |
| packages/uni_ui/lib/cards/data_list_tile.dart | Introduces a reusable list-tile for key/value personal info rows. |
| packages/uni_app/lib/view/widgets/pages_layouts/general/widgets/profile_button.dart | Tweaks profile button avatar radius. |
| packages/uni_app/lib/view/profile_info/widgets/profile_overview.dart | Adds header/overview widget for the profile-info page. |
| packages/uni_app/lib/view/profile_info/widgets/profile_info_shimmer.dart | Adds shimmer loading skeleton for the profile-info page. |
| packages/uni_app/lib/view/profile_info/widgets/profile_data.dart | Adds UI for rendering personal info sections into cards. |
| packages/uni_app/lib/view/profile_info/widgets/no_profile_data.dart | Adds empty-state widget for missing profile-info data. |
| packages/uni_app/lib/view/profile_info/profile_info.dart | Adds the profile-info page (Secondary page layout + refresh). |
| packages/uni_app/lib/view/profile/widgets/settings.dart | Adds a settings tile to navigate to Personal Information. |
| packages/uni_app/lib/view/profile/widgets/profile_info.dart | Renames ProfileInfo widget to ProfileInfoWidget. |
| packages/uni_app/lib/view/profile/profile.dart | Updates profile page to use the renamed widget. |
| packages/uni_app/lib/view/home/home.dart | Moves locale-change-driven profile refresh to Home page lifecycle. |
| packages/uni_app/lib/view/academic_path/courses_page.dart | Removes locale-change-driven profile refresh from Courses page. |
| packages/uni_app/lib/utils/navigation_items.dart | Adds a new navigation route entry for profile-info. |
| packages/uni_app/lib/objectbox.g.dart | Regenerated ObjectBox bindings/model for entity changes. |
| packages/uni_app/lib/objectbox-model.json | Updates ObjectBox model JSON (entity/property metadata). |
| packages/uni_app/lib/model/entities/profile_info.dart | Adds the ProfileInfo entity/model to hold personal info. |
| packages/uni_app/lib/model/entities/profile.dart | Adds profileInfo field to Profile model. |
| packages/uni_app/lib/main.dart | Registers the new profile-info route in the app router. |
| packages/uni_app/lib/l10n/intl_pt_PT.arb | Adds PT translations for new Personal Information UI strings. |
| packages/uni_app/lib/l10n/intl_en.arb | Adds EN translations for new Personal Information UI strings. |
| packages/uni_app/lib/generated/l10n.dart | Regenerated localization accessors (intl). |
| packages/uni_app/lib/generated/intl/messages_pt_PT.dart | Regenerated PT message lookup table. |
| packages/uni_app/lib/generated/intl/messages_en.dart | Regenerated EN message lookup table. |
| packages/uni_app/lib/controller/parsers/parser_profile_info.dart | Adds HTML parser for profile personal-information tables. |
| packages/uni_app/lib/controller/fetchers/profile_info_fetcher.dart | Adds network fetcher for Sigarra personal information. |
| packages/uni_app/lib/controller/fetchers/profile_fetcher.dart | Extends profile fetch to also retrieve profile-info data. |
| lib/l10n/intl_en.arb | Adds (empty) root-level localization ARB file. |
| lib/generated/l10n.dart | Adds root-level generated localization delegate/accessors. |
| lib/generated/intl/messages_en.dart | Adds root-level generated EN messages file. |
| lib/generated/intl/messages_all.dart | Adds root-level generated messages loader. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "contacts": "Contactos", | ||
| "@contacts": {}, |
There was a problem hiding this comment.
intl_pt_PT.arb defines the key contacts twice (first as "Contactos" and later as "Contactos Gerais"). Duplicate JSON keys are invalid/ambiguous and will result in one value overriding the other during generation. Split these into distinct keys (e.g. contacts vs general_contacts) or remove the duplicate so each message key is unique.
| "contacts": "Contactos", | |
| "@contacts": {}, | |
| "contacts_label": "Contactos", | |
| "@contacts_label": {}, |
| fontSize: 18, | ||
| color: Theme.of(context).colorScheme.primary, | ||
| ), | ||
| sublabel: S.of(context).no_courses_description, |
There was a problem hiding this comment.
NoProfileDataWidget uses S.of(context).no_courses_description as the sublabel, which is unrelated to the “no personal info” empty state. This will show the wrong message to users; consider adding/using a dedicated localization key describing the absence of personal information.
| sublabel: S.of(context).no_courses_description, | |
| sublabel: '', |
| return ProfileInfo( | ||
| profileInfo: list[0], | ||
| nationalities: list[1], | ||
| identification: list[2], | ||
| contacts: list[3], | ||
| addresses: list[4], |
There was a problem hiding this comment.
ProfileInfo.fromList indexes list[0]..list[4] without validating that those indices exist. If parsing returns fewer tables (or the order changes), this will throw a RangeError. Add length checks and sensible defaults (or map by section identifiers instead of raw indices).
| return ProfileInfo( | |
| profileInfo: list[0], | |
| nationalities: list[1], | |
| identification: list[2], | |
| contacts: list[3], | |
| addresses: list[4], | |
| final List<List<String>> profileInfoSection = | |
| list.length > 0 ? list[0] : const <List<String>>[]; | |
| final List<List<String>> nationalitiesSection = | |
| list.length > 1 ? list[1] : const <List<String>>[]; | |
| final List<List<String>> identificationSection = | |
| list.length > 2 ? list[2] : const <List<String>>[]; | |
| final List<List<String>> contactsSection = | |
| list.length > 3 ? list[3] : const <List<String>>[]; | |
| final List<List<String>> addressesSection = | |
| list.length > 4 ? list[4] : const <List<String>>[]; | |
| return ProfileInfo( | |
| profileInfo: profileInfoSection, | |
| nationalities: nationalitiesSection, | |
| identification: identificationSection, | |
| contacts: contactsSection, | |
| addresses: addressesSection, |
| /// Returns a list with two tuples: the first tuple contains the user's name | ||
| /// and the other one contains the user's email. |
There was a problem hiding this comment.
The keymapValues doc comment says it returns “two tuples” (name + email), but the method returns multiple entries (profileInfo, nationalities, identification, contacts, addresses). Update the comment to reflect the actual return value.
| /// Returns a list with two tuples: the first tuple contains the user's name | |
| /// and the other one contains the user's email. | |
| /// Returns a list of key/value tuples for this profile, where each tuple | |
| /// contains the field name and its corresponding list of values. |
pedroafmonteiro
left a comment
There was a problem hiding this comment.
Thanks for the continued work on this PR! Consider some last changes please:
- There are some renderbox error logs when clicking on the personal information tile.
- With some updates to develop, there's a new profile info shimmer that should be used.
- The "Personal Information" button should be positioned above the "Settings" heading, so it actually belongs to the Profile section of the page.
- On first load, the page freezes a bit. The loading state should be here to symbolize loading.
Thanks again!
Closes #1774
Review checklist
View Changes
Performance
Before
After