Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor score page (Only score parts) #157

Merged
merged 15 commits into from
Jan 4, 2023
Merged

Conversation

Xanonymous-GitHub
Copy link
Member

@Xanonymous-GitHub Xanonymous-GitHub commented Jan 1, 2023

Description

This PR tried to refactor the score page (also known as the grade page), which specifically did the following things:

  1. The score detail info in each semester has been refined into a 3-part-metric:
  • the course score section
  • the semester score section
  • the rank section
  1. The operation in this page, the refresh and calculate credit, which were originally located in a PopupMenuButton, has been redesigned to IconButton directly put inside the AppBar.
  2. Change the divider color of the theme for using the Divider widget in somewhere.

How to Verify?

  1. Go to the score page, refresh, and see if the score in each semester could be showed properly (no any critical UI problems).
  2. Go to course table page, check the background looks the same as before.
  3. Go to a course detail page, check the classmates info section's bg looks the same as before.
  4. repeat the steps mentioned above with ENG and dark mode.
  5. click the refresh button in the appbar, check if it works.
  6. click the calculate button in the appbar, check if it works.

Screenshots/GIF/Test Results (Optional)

@Xanonymous-GitHub Xanonymous-GitHub added this to the 1.4.3 milestone Jan 1, 2023
@Xanonymous-GitHub Xanonymous-GitHub self-assigned this Jan 1, 2023
@Xanonymous-GitHub Xanonymous-GitHub linked an issue Jan 1, 2023 that may be closed by this pull request
@Xanonymous-GitHub Xanonymous-GitHub changed the title Refactor score page Refactor score page (Only score parts) Jan 4, 2023
@Xanonymous-GitHub Xanonymous-GitHub marked this pull request as ready for review January 4, 2023 15:56
Copy link
Collaborator

@ricky9667 ricky9667 left a comment

Choose a reason for hiding this comment

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

Thanks for doing additional refactoring.

lib/ui/pages/score/widgets/calculation_warning_widget.dart Outdated Show resolved Hide resolved
lib/ui/pages/score/score_page.dart Outdated Show resolved Hide resolved
lib/ui/pages/score/score_page.dart Show resolved Hide resolved
lib/ui/pages/score/score_page.dart Show resolved Hide resolved
lib/ui/pages/score/score_page.dart Show resolved Hide resolved
lib/ui/pages/score/score_page.dart Show resolved Hide resolved
lib/ui/pages/score/widgets/score_tile_widget.dart Outdated Show resolved Hide resolved
lib/ui/pages/score/widgets/score_tile_widget.dart Outdated Show resolved Hide resolved
lib/ui/pages/score/widgets/score_tile_widget.dart Outdated Show resolved Hide resolved
@Xanonymous-GitHub
Copy link
Member Author

For all mistakes made by the former maintainer, through the file will be refactored again in the future (maybe?), they may not needed to be fixed at this moment, since all changes will be replaced with something new again.

@Xanonymous-GitHub Xanonymous-GitHub enabled auto-merge (squash) January 4, 2023 17:03
Copy link
Collaborator

@ricky9667 ricky9667 left a comment

Choose a reason for hiding this comment

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

LGTM.

@Xanonymous-GitHub Xanonymous-GitHub merged commit fc8678c into master Jan 4, 2023
@Xanonymous-GitHub Xanonymous-GitHub deleted the refactor-score-page branch January 4, 2023 17:18
Xanonymous-GitHub added a commit that referenced this pull request Mar 28, 2023
* feat: rewrite score tile widget

* feat: extract & rewrite the section of course score

* feat: add i18n text for key of class and department

* refactor: define highlight color for origin divider color

* feat: add metrics title widget

* feat: add grade metrics cell widget

* feat: rewrite semester score section to new metrics style

* feat: rewrite two rank sections to new metrics style

* refactor: rename widget

* fix: incorrect theme divider color use

* feat: rewrite warning widget and extract from score page

* refactor: use refactored widgets to tidy up the score page, and seperate appbar buttons to two

* fix: i10n key typo

* refactor: use getter to generate sub widgets while it is not depend on any params for building

* refactor: seperate appbar action buttons into isolate widget and wrap buttons with tooltip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Feature: Add refresh button on the appbar of grade page
2 participants