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

[BUG] Can't add tag that is accidentally removed #442

Open
dot-mike opened this issue Nov 30, 2024 · 2 comments · May be fixed by #447
Open

[BUG] Can't add tag that is accidentally removed #442

dot-mike opened this issue Nov 30, 2024 · 2 comments · May be fixed by #447
Labels
bug Something isn't working

Comments

@dot-mike
Copy link
Member

dot-mike commented Nov 30, 2024

Describe the bug
During curation if you accidentally click a tag to remove it and then try re-add the tag it won't allow you to do so.

Work around:

  1. Select another curation
  2. then go back and add the tag

To Reproduce
Steps to reproduce the behavior:

  1. Go to Curation
  2. Remove tag
  3. Try to re-add the same tag again
  4. Tag does not appear in the list of tags

Expected behavior
Tag to appear again.

I managed to find a state where the bug does NOT occur:

  1. It has be a new tag not present in the list of tags
  2. Add the new tag
  3. Remove the new tag
  4. Add the new tag again, it will work

Desktop (please complete the following information):

  • OS: Windows 11
  • Flashpoint Version: release/13.1.0 (dev)
@dot-mike dot-mike added the bug Something isn't working label Nov 30, 2024
@dot-mike
Copy link
Member Author

dot-mike commented Dec 4, 2024

I happened to accidentally remove the tag Adventure on a curation yesterday and I was able to add it again without any effort. This bug needs more testing...

@dot-mike
Copy link
Member Author

dot-mike commented Dec 13, 2024

The bug is not consistent. Sometimes it happens, sometimes not. I've narrowed it down to being an issue with the redux-state.

I managed to find a state where the bug does NOT occur:

  1. It has be a new tag not present in the list of tags
  2. Add the new tag
  3. Remove the new tag
  4. Add the new tag again, it will work

When the bug, this if-case is in below line is True, which means the game has the tag when trying to add it after being removed.

if (!tags.find(t => t.id === tag.id)) {

Redux state is managed in these two funcs

addTag: lockedFunc((state: CurateState, { payload }: PayloadAction<TagAction>) => {

removeTag: lockedFunc((state: CurateState, { payload }: PayloadAction<RemoveTagAction>) => {

@dot-mike dot-mike linked a pull request Dec 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant