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

SRO Bonus stats UI #2482

Merged
merged 1 commit into from
Oct 5, 2024
Merged

SRO Bonus stats UI #2482

merged 1 commit into from
Oct 5, 2024

Conversation

frzyc
Copy link
Owner

@frzyc frzyc commented Oct 4, 2024

Describe your changes

Add initial UI to add and edit SRO bonus stats, need additional work to link to calc.

Issue or discord link

Testing/validation

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

Copy link
Contributor

github-actions bot commented Oct 4, 2024

[sr-frontend] [Fri Oct 4 03:53:20 UTC 2024] - Deployed f7ed084 to https://genshin-optimizer-prs.github.io/pr/2482/sr-frontend (Takes 3-5 minutes after this completes to be available)

[Sat Oct 5 02:05:14 UTC 2024] - Deleted deployment

[sr-frontend] [Mon Oct 7 15:56:40 UTC 2024] - Deployed a8aee38 to https://genshin-optimizer-prs.github.io/pr/2482/sr-frontend (Takes 3-5 minutes after this completes to be available)

@@ -24,6 +25,7 @@ export interface Loadout {

buildTcIds: string[]
optConfigId: string
bonusStats: Array<{ tag: Tag; value: number }>
Copy link
Collaborator

Choose a reason for hiding this comment

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

just curious, why are we using Array<> syntax over []?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I think { tag: Tag; value: number }[] looks jank, imo

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can use TagMapEntries<number>

setValue: (value: number) => void
onDelete: () => void
}) {
// TODO: best way to infer percentage from tag?
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is the correct way

>
<SqBadge sx={{ m: 'auto' }}>{tag.q}</SqBadge>
{tag.q === 'dmg_' && (
<ElementTypeDropdown
Copy link
Collaborator

Choose a reason for hiding this comment

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

technically this doesn't matter for HSR. I'm not aware of any character or mechanic that we would support in SRO that can do multi-element

Copy link
Collaborator

Choose a reason for hiding this comment

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

damageType1 and damageType2 would be better candidates, if we want to be technical about it

Copy link
Owner Author

Choose a reason for hiding this comment

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

I think you misunderstand. this differentiates between dmg_ and ${element}_dmg_, this is not a multi select.

Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't really be in 'tabs', but i assume this is just temporary anyways

Copy link
Owner Author

Choose a reason for hiding this comment

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

yeah im waiting for design team to come up with some preliminary before going into tabs

@frzyc frzyc merged commit a8aee38 into master Oct 5, 2024
7 checks passed
@frzyc frzyc deleted the sro_bonus_stats branch October 5, 2024 02:04
@frzyc frzyc added the SRO For Star Rail Optimizer label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SRO For Star Rail Optimizer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants