DanXi-Dev / DanXi

[Windows / Mac / Linux / Android / iOS] Maybe the best all-rounded service app for Fudan University students. 可能是复旦学生最好的第三方校园服务APP。
https://danxi.fduhole.com
GNU General Public License v3.0
197 stars 32 forks source link

Mega-Refactor (aka A head start for newcomers to contribute) #142

Open w568w opened 2 years ago

w568w commented 2 years ago

Soon or later it will be necessary to expect for some newcomers to contribute to the project.

However, we have not done enough work to meet the community standard. I suppose it is time to make a to-do list for it.

No need to accomplish these at once, but at least rethink them when pushing new commits.

p.s. feel free to add new items or edit them ✍️

Code Principle

Contributing Guide

w568w commented 4 months ago

I think the code base is growing to a point where it's hard to maintain and a major overhaul (i.e. Mega-Refactor) is necessary. #334 is an example.

Until Mar 12 2024, we have \~34K LoC, which requires 100\~300 hours to refactor. It's hard to say what needs to be refactored, but the general direction is as follows:

  1. better state management (switching to a modern state management library like GetX or Riverpod, which one will be decided soon);
  2. clean up unnecessary nullable types (?) (and non-null assertions, !).

We invite all maintainers (and you) to participate in the refactoring, to use a more modern code style when contributing new code, and to migrate old code over time.

Edit (2024-04-01): We have decided Riverpod as our new state management library.

w568w commented 3 months ago

Riverpod has been chosen as our new state management library.