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

[MAINT] - Maintenance refactor (not redesign) #439

Open
gabalafou opened this issue Oct 24, 2024 · 1 comment
Open

[MAINT] - Maintenance refactor (not redesign) #439

gabalafou opened this issue Oct 24, 2024 · 1 comment

Comments

@gabalafou
Copy link
Contributor

gabalafou commented Oct 24, 2024

This issue is to provide a reference URL and place to track work on refactoring the UI codebase.

This work is NOT a redesign. This is not about changing the look and feel of the current UI. It is just about making the code behind the UI easier to work with by refactoring it. To an end user, there should be no apparent change. But for people working in the code base, adding features, it should become much easier.

Currently the code base has a number of problems:

  • duplicated code
  • fuzzy boundaries between components
  • curious patterns and anti-patterns
  • over-reliance on side effects during component rendering (i.e., the useEffect() hook is abused)
  • and more

For more on the point about side effects, read the first section of React anti-patterns that lead to unnecessary complexity.

@gabalafou
Copy link
Contributor Author

gabalafou commented Oct 24, 2024

The approach that I plan to take:

  1. Create a new directory outside the repo using a scaffold for a React app (such as create-react-app)
  2. Copy over files from the current repo as needed
    • The idea is that I do not want to carry over cruft
    • But I will be very thorough going through the files
  3. Overwrite the current directory with the new directory
    • I will keep the new directory structure as close as possible to the old structure in order to keep history
    • But I think it is inevitable that history will be lost because part of the refactor involves changing component and module boundaries, which will require things like splitting one file out into multiple files or consolidating code across multiple files into one file.
  4. Create a new branch and push to GitHub

@gabalafou gabalafou changed the title Maintenance refactor Maintenance refactor (not redesign) Oct 24, 2024
@peytondmurray peytondmurray changed the title Maintenance refactor (not redesign) [MAINT] - Maintenance refactor (not redesign) Nov 4, 2024
This was referenced Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant