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

UIData Refactoring #1964

Merged
merged 7 commits into from
Apr 16, 2024
Merged

UIData Refactoring #1964

merged 7 commits into from
Apr 16, 2024

Conversation

frzyc
Copy link
Owner

@frzyc frzyc commented Apr 15, 2024

Describe your changes

mimi branch for mini-migration

  • Added UIData.newGet and newGetNodeDisplay to replace UIData.get and computeNodeDisplay

  • UIData.newGet returns CalcResult, then pass that value into newGetNodeDisplay to get CalcDisplay.

    • Both CalcResult and CalcDisplay should contain all information that NodeDisplay has, albeit in different order/format (Check computeNodeDisplay for the conversion)

TODO:

  • convert UIData.getAll, UIData.getTeamBuff, UIData.getDisplay to use the new type format (NodeDisplay -> CalcDisplay)
  • convert the downstream calls to use UIData.get
  • There're a few TODOs in the UIData, but shouldn't need to touch them too much
  • move all UI-related stuffs to a separate library safely

Issue or discord link

Testing/validation

Before: with intention to remove dependency,
image
After:
image

Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)

  • I have commented my code in hard-to understand areas.
  • I have made corresponding changes to README or wiki.
  • For front-end changes, I have updated the corresponding English translations.
  • I have run yarn run mini-ci locally to validate format and lint.
  • If I have added a new library or app, I have updated the deployment scripts to ignore changes as needed

- Add shim layer for `UIData.get`
- Update types
- Ad `UIData.newGet`
Copy link
Contributor

github-actions bot commented Apr 15, 2024

[frontend] [Mon Apr 15 14:15:25 UTC 2024] - Deployed 85767fc to https://genshin-optimizer-prs.github.io/pr/1964/frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Mon Apr 15 17:10:05 UTC 2024] - Deployed 885763e to https://genshin-optimizer-prs.github.io/pr/1964/frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Tue Apr 16 04:30:08 UTC 2024] - Deployed b8f4bc3 to https://genshin-optimizer-prs.github.io/pr/1964/frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Tue Apr 16 15:14:06 UTC 2024] - Deployed 9d11a4b to https://genshin-optimizer-prs.github.io/pr/1964/frontend (Takes 3-5 minutes after this completes to be available)

[Tue Apr 16 17:46:37 UTC 2024] - Deleted deployment

@frzyc frzyc marked this pull request as ready for review April 16, 2024 16:42
Copy link
Collaborator

@nguyentvan7 nguyentvan7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/shrug

@frzyc frzyc merged commit fb4b9e7 into master Apr 16, 2024
6 checks passed
@frzyc frzyc deleted the mimi branch April 16, 2024 17:46
Copy link
Collaborator

@lantua lantua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@frzyc frzyc mentioned this pull request Apr 17, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants