frzyc / genshin-optimizer

An Artifact optimizer for Genshin Impact.
https://frzyc.github.io/genshin-optimizer/
MIT License
751 stars 219 forks source link

add a delete button to the artifact editor #2107

Closed frzyc closed 2 months ago

frzyc commented 2 months ago

Describe your changes

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.)

github-actions[bot] commented 2 months ago

[frontend] [Sun May 12 01:16:20 UTC 2024] - Deployed aa81f0fba539e850e4d01a7077764749478cf86e to https://genshin-optimizer-prs.github.io/pr/2107/frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Tue May 14 04:28:22 UTC 2024] - Deployed 87e64184d3085fa2f4e60e249bd5ef6959aa93a6 to https://genshin-optimizer-prs.github.io/pr/2107/frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Tue May 14 04:52:05 UTC 2024] - Deployed 7ec56f327224cea722634ec0ba1fb6a7a46607a5 to https://genshin-optimizer-prs.github.io/pr/2107/frontend (Takes 3-5 minutes after this completes to be available)

[Tue May 14 06:13:58 UTC 2024] - Deleted deployment

frzyc commented 2 months ago

Delete button is enabled for artifacts that you are still in the process of creating. Not really an issue, but feels a bit strange since the Clear button does the same thing

It shouldn't? it should only be enabled for edited artifact (has an id), or artifact that detects a dup

nguyentvan7 commented 2 months ago

It was definitely enabled, I clicked add new artifact and filled out the fields and the delete button lit up and worked

frzyc commented 2 months ago

It was definitely enabled, I clicked add new artifact and filled out the fields and the delete button lit up and worked

You are right, there is a bug with the id detection. Good catch.