ApplETS / Notre-Dame

The 4th generation of ÉTSMobile, the main gateway between the École de technologie supérieure and its students on mobile devices
Apache License 2.0
39 stars 11 forks source link

Feature/461 semester progress android widget #1051

Open DylanApardian opened 2 months ago

DylanApardian commented 2 months ago

⁉️ Related Issue

461

📖 Description

This PR introduces the semester progress home screen widget for android. The widget behaves the same way as in the application. The widget is re-sizable and displays a circular progress bar when the widget is small enough. The theme/language of the widget matches the application theme/language.

See the screen recording if needed.

🧪 How Has This Been Tested?

Manual testing and day to day use.

☑️ Checklist before requesting a review

🖼️ Screenshots (if useful):

Screenshot_1725841912 Screenshot_1725841832

github-advanced-security[bot] commented 2 months ago

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

XavierPaquet-Rapold commented 2 months ago

Est-ce que c'est possible d'utiliser les settings de l'application ou au minimum les settings du téléphone au lieu d'avoir des settings pour le widget ?

DylanApardian commented 2 months ago

Est-ce que c'est possible d'utiliser les settings de l'application ou au minimum les settings du téléphone au lieu d'avoir des settings pour le widget ? @XavierPaquet-Rapold

J'imagine que oui. Je vais tenter de faire ça ce weekend.

EDIT: C'est fait!

XavierPaquet-Rapold commented 2 months ago

Also, when not connected, the default text should be N/A, for now it's null on the x% progress. Also, the language should follow the app language, just like the theme. The text x days elapsed / x days overflows when the widget takes half the screen. Finally, when the settings change and when changing the position of the widget, the widget becomes unresponsive

LouisPhilippeHeon commented 1 month ago

J'ai pas encore pris le temps de regarder le code, mais je l'ai testé. Pour le i18n comment ça se passe? Mon cell est en anglais mais l'app en français, le widget s'affiche en anglais. Est ce que on ne voudrait pas plutot utiliser la langue de l'app. Aussi, le changement entre light mode et dark mode est pas super smooth.

DylanApardian commented 1 month ago

J'ai pas encore pris le temps de regarder le code, mais je l'ai testé. Pour le i18n comment ça se passe? Mon cell est en anglais mais l'app en français, le widget s'affiche en anglais. Est ce que on ne voudrait pas plutot utiliser la langue de l'app. Aussi, le changement entre light mode et dark mode est pas super smooth.

@LouisPhilippeHeon

github-actions[bot] commented 4 weeks ago

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

sonarcloud[bot] commented 4 weeks ago

Quality Gate Passed Quality Gate passed

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

github-actions[bot] commented 4 weeks ago

Coverage after merging feature/461-semester-progress-android-widget into master will be

72.10%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
lib/constants
   preferences_flags.dart0%100%100%0%59, 64, 66, 68–70, 73, 75–78, 80, 82
   markers.dart100%100%100%100%
lib/features/app/analytics
   analytics_service.dart0%100%100%0%13–14, 17, 20–22, 25, 30, 32–34, 38, 40–41, 43
   remote_config_service.dart0%100%100%0%100, 103–105, 108–110, 113–115, 118–120, 123–125, 128–130, 133–135, 138–140, 143–144, 146–150, 154–156, 58–60, 63–65, 68–70, 73–75, 78–80, 83–85, 88–90, 93–95, 98–99
lib/features/app/error
   internal_info_service.dart0%100%100%0%18–21, 24–29, 32, 34–38, 42–43
lib/features/app/error/not_found
   not_found_viewmodel.dart100%100%100%100%
   not_found_view.dart92.59%100%100%92.59%69–70
lib/features/app/integration
   github_api.dart0%100%100%0%100–101, 104, 106, 110, 112–116, 118–119, 122, 124, 131–134, 138–139, 141, 39, 42–43, 47, 51–55, 57–58, 60, 62, 64–65, 68, 70, 77, 82–88, 92, 94, 96–98
   launch_url_service.dart0%100%100%0%16–18, 21–23, 26–31, 37, 55–56, 59
   networking_service.dart0%100%100%0%10–11, 13–15, 18–20
lib/features/app/monets_api
   monets_api_client.dart90.91%100%100%90.91%22
lib/features/app/monets_api/models
   mon_ets_user.dart50%100%100%50%29–33, 35, 37
lib/features/app/navigation
   navigation_service.dart0%100%100%0%27, 30–31, 33–34, 41–42, 45–46, 49–51, 53, 58, 61, 63–64, 67–69, 71–72
lib/features/app/repository
   author_repository.dart0%100%100%0%13, 15
   course_repository.dart84.34%100%100%84.34%200, 205, 210–211, 213, 217, 219–220, 223–229, 234, 236, 239, 241–243, 246–251, 255, 259–261, 263, 267, 337, 345, 347, 532–533, 83
   news_repository.dart0%100%100%0%16, 21
   quick_link_repository.dart85.71%100%100%85.71%39–40
   user_repository.dart93.52%100%100%93.52%135–136, 186, 308, 310, 98–99
lib/features/app/signets-api
   signets_api_client.dart88.89%100%100%88.89%35, 45, 47, 49
   soap_service.dart100%100%100%100%
lib/features/app/signets-api/commands
   authentificate_command.dart0%100%100%0%18, 21, 24–28, 31
   get_course_reviews_command.dart100%100%100%100%
   get_course_summary_command.dart100%100%100%100%
   get_courses_activities_command.dart100%100%100%100%
   get_courses_command.dart100%100%100%100%
   get_programs_command.dart100%100%100%100%
   get_schedule_activities_command.dart100%100%100%100%
   get_sessions_command.dart100%100%100%100%
   get_student_info_command.dart100%100%100%100%
lib/features/app/signets-api/models
   course.dart80.52%100%100%80.52%102–105, 120, 122–131
   course_activity.dart81.40%100%100%81.40%83, 85–91
   schedule_activity.dart80.95%100%100%80.95%121, 123–133
   session.dart73.08%100%100%73.08%159, 161–173, 175, 177–189
   profile_student.dart82.14%100%100%82.14%56, 58–61
   program.dart81.13%100%100%81.13%100–106, 96, 98–99
   course_review.dart51.92%100%100%51.92%100–103, 51–58, 70, 72–79, 95, 97–99
   course_summary.dart86.84%100%100%86.84%106, 108–116
   course_evaluation.dart70.54%100%100%70.54%128, 167, 169–182, 184, 186–200, 49
lib/features/app/startup
   startup_viewmodel.dart92.50%100%100%92.50%103, 138–139
lib/features/app/storage
   cache_manager.dart0%100%100%0%30–31, 34–37, 40, 44, 46–50, 56, 58–61, 66, 68–71
   preferences_service.dart69.09%100%100%69.09%119–120, 122, 36, 38, 40, 43–45, 69–70, 80–82, 85, 87–88
   siren_flutter_service.dart0%100%100%0%13–14, 18–19, 23–25, 29–31, 35, 41
lib/features/app/widgets
   base_scaffold.dart85.33%100%100%85.33%105, 135, 164–165, 167–169, 171–172, 174–175
   bottom_bar.dart92.65%100%100%92.65%50, 52, 54, 59, 63
   navigation_rail.dart64.18%100%100%64.18%41, 51, 53, 55, 58, 62, 68–69, 74–88, 90
   dismissible_card.dart100%100%100%100%
   link_web_view.dart88.24%100%100%88.24%38–39
lib/features/dashboard
   dashboard_view.dart67.19%100%100%67.19%154–157, 165–168, 176–178, 186–188, 196–198, 238–241, 255–257, 263–265, 274, 276–277, 295–298, 302–304, 322–323, 329–330, 355–356, 395, 402, 424–425, 460–463, 466–470, 472, 474, 476, 478–481, 483–486, 489, 491–492, 499–500, 505, 507, 513, 519–522, 550–551, 573, 85, 96
   dashboard_viewmodel.dart83.88%100%100%83.88%145–147, 149, 152, 203, 206, 278, 324, 328, 367, 372, 410, 425, 427–429, 431, 436–437, 493, 498, 500–501, 503–504, 507–508, 510, 513, 515, 517–518, 520–521, 524–525, 537–538
lib/features/dashboard/widgets
   course_activity_tile.dart100%100%100%100%
   haptics_container.dart100%100%100%100%
lib/features/ets
   ets_view.dart80%100%100%80%27–29, 79–81
lib/features/ets/events/api-client
   hello_api_client.dart91.67%100%100%91.67%26
lib/features/ets/events/api-client/commands
   get_events_command.dart74.07%100%100%74.07%50, 58, 61, 64, 67, 70, 73
   get_organizer_command.dart92.31%100%100%92.31%26
   report_news_command.dart92.86%100%100%92.86%27
lib/features/ets/events/api-client/models
   organizer.dart100%100%100%100%
   paginated_news.dart31.03%100%100%31.03%36–41, 44, 47–53, 55, 57–61