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] Improve imports #4703

Open
wants to merge 1 commit into
base: beta
Choose a base branch
from

Conversation

DayKev
Copy link
Collaborator

@DayKev DayKev commented Oct 22, 2024

What are the changes the user will see?

N/A

Why am I making these changes?

I got tired of fixing annoying merge conflicts from imports that were hundred of characters long. It would be even better if it were possible to apply "Organize Imports" globally but that causes issues :pikastare:. Maybe in the future...
Hopefully this can turn a recurring issue into a one-time changeover.

What are the changes from a developer perspective?

  • Overly long import lines are turned into multi-line imports (the reason I made this PR)
  • * as Utils replaced with { ... }
  • Instances of IntegerHolder replaced with NumberHolder
  • Added #phases (#app/phases), #mystery-encounters (#app/data/mystery-encounters) and #balance (#app/data/balance) import mappings
  • Replaced a bunch of relative imports with absolute imports (the ones that were easy to mass-convert, anyway)

How to test the changes?

npm run test

Checklist

  • I'm using beta as my base branch
  • There is no overlap with another PR?
  • The PR is self-contained and cannot be split into smaller PRs?
  • Have I provided a clear explanation of the changes?
  • [ ] Have I considered writing automated tests for the issue?
  • [ ] If I have text, did I make it translatable and add a key in the English locale file(s)?
  • Have I tested the changes (manually)?
    • Are all unit tests still passing? (npm run test)
  • [ ] Are the changes visual?
    • [ ] Have I provided screenshots/videos of the changes?

This should hopefully prevent most merge conflicts with imports

- Replace `* as Utils` with `{ ... }`

- Replace instances of `IntegerHolder` with `NumberHolder`

- Add `#phases`, `#mystery-encounters`, `#balance` import mappings

- Replace many instances of relative with absolute imports
@DayKev DayKev added Miscellaneous Changes that don't fit under any other label Refactor Rewriting existing code related labels Oct 22, 2024
@DayKev DayKev requested a review from a team as a code owner October 22, 2024 09:01
@Tempo-anon
Copy link
Collaborator

434 files changed :darumastare:

@DayKev
Copy link
Collaborator Author

DayKev commented Oct 23, 2024

I don't expect this to go in to the current beta, so there will be plenty of time next cycle to review the non-functional changes. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Miscellaneous Changes that don't fit under any other label Refactor Rewriting existing code related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants