DanXi icon indicating copy to clipboard operation
DanXi copied to clipboard

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

Open w568w opened this issue 3 years ago • 2 comments

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

  • [ ] Clean nested hell in the layouts
  • [x] Write comments for complex codes (especially those in build(), initState() and repositories)

Contributing Guide

  • [x] Have a guide describing how to contribute to this project
  • [x] #256

w568w avatar Feb 21 '22 01:02 w568w

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 avatar Mar 12 '24 08:03 w568w

Riverpod has been chosen as our new state management library.

w568w avatar Apr 01 '24 05:04 w568w