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 Calendar page & Pump flutter version to 3.3.10 #154

Merged
merged 15 commits into from
Dec 30, 2022

Conversation

Xanonymous-GitHub
Copy link
Member

@Xanonymous-GitHub Xanonymous-GitHub commented Dec 29, 2022

Description

Upgrade all dependencies and flutter sdk version to 3.3.10.
The Android Kotlin version has upgraded to 1.8.0.

There are three breaking changes:

  • Awsome Dialog
    The dependency version has upgraded to v3, which deprecated the origin DialogTyle values.
    These update changes has addressed here: 3a0d35a.
  • Alice
    Since the alice package on pub.dev depends on lots of its sub-packages which makes us hard to maintain TAT's dependency versions, we have migrated it to the alice_lightweight package.
  • Table Calendar
    Through the table_calendar package version has been upgraded to v3, we rebuilt the whole calendar page.
    First, a new CalendarController, which extends GetXController, has been created. We moved all non-UI layer functions and variables into this controller, and wrapped the calendar and calendar event list view widget by GetBuilder for receiving state updates from the controller.
    Then, we introduced a cache mechanism for the calendar data, which makes it not needed to re-fetch data while it has already exist.
    Additionally, the calendar style has also been refactored. You may found the event marker style changed, and the ripple effect of event ListTile has been fixed that it will not overflow of its container now.

In addition, the comments in the pubspec.yml file has been removed now, since they didn't express any useful meanings and make the file looks so messy.

Note
Includes some null safety migrations.

How to Verify?

  • Calendar page
  1. open calendar page, check if it shows today's event (if provided)
  2. switch to different day in the same month, see if the event can be shown properly, and the calendar's selected day changes to that day.
  3. swipe to next month (and previous month), see if it can fetches the data and show them (the marker) on the calendar right away.
  4. repeat step 2 but now in step 3's month.
  5. change the calendar format to week, two week
  6. enable English UI and see if there are any strange things.
  • Debug page (Alice)
  1. Do something that needs to fetch data from BE, such as ischool page.
  2. go to dev page. (contact @Xanonymous-GitHub If you don't know where it is)
  3. go to Dio Log page
  4. click on each log, see if any error occurrs.

Screenshots/GIF/Test Results (Optional)

截圖 2022-12-30 上午6 30 31截圖 2022-12-30 上午6 30 13

@Xanonymous-GitHub Xanonymous-GitHub added this to the 1.4.3 milestone Dec 29, 2022
@Xanonymous-GitHub Xanonymous-GitHub self-assigned this Dec 29, 2022
@Xanonymous-GitHub Xanonymous-GitHub changed the title Pump flutter version to 3.3.10 Pump flutter version to 3.3.10 & Refactor Calendar page Dec 29, 2022
@Xanonymous-GitHub Xanonymous-GitHub enabled auto-merge (squash) December 29, 2022 23:27
@Xanonymous-GitHub Xanonymous-GitHub changed the title Pump flutter version to 3.3.10 & Refactor Calendar page Refactor Calendar page & Pump flutter version to 3.3.10 Dec 29, 2022
lib/src/controllers/calendar_controller.dart Outdated Show resolved Hide resolved
lib/src/controllers/calendar_controller.dart Outdated Show resolved Hide resolved
lib/src/controllers/calendar_controller.dart Outdated Show resolved Hide resolved
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 eda1fc8 into master Dec 30, 2022
@Xanonymous-GitHub Xanonymous-GitHub deleted the pump-flutter-version-to-3.3.10 branch December 30, 2022 16:28
Xanonymous-GitHub added a commit that referenced this pull request Mar 28, 2023
* chore: upgrade packages

* chore: replace alice with alice_lightweight

* chore: remove strange comments

* chore: remove strange comments

* feat: rewrite Calendar page with new Calendar controller

* refactor: migrate language util to null safety

* refactor: reconfig calendar style

* fix: calendar event box ripper effect overflow box

* fix: prevent calendar focus day reset while it has already sotred any data of a month

* chore: upgrade kotlin version

* chore: upgrade ios plugin version

* chore: upgrade packages

* refactor: update Awsome Dialog type to fit the new plugin version
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.

2 participants