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

fix bug on delete list #79

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fix bug on delete list #79

wants to merge 2 commits into from

Conversation

ocsiddisco
Copy link
Collaborator

Description

When deleteing a list, the modal did not close and stayed in loading state.

Type of Changes

Bug fix

Updates

Before

BugDeleteDespiensa

After

FixBugDeleteDespiensa

Testing Steps / QA Criteria

Note: I am encountering issue with the new firebase config and can't loggin to the app. You may encounter the same issue and may not be able to test it right away.
(I worked on the bug, with the previous config)

  • pull ce-bugDelete
  • delete a list

@ocsiddisco ocsiddisco self-assigned this May 3, 2024
Copy link

github-actions bot commented May 3, 2024

Visit the preview URL for this PR (updated for commit 99f6d30):

https://tcl-71-smart-shopping-list--pr79-ce-bugdelete-rq81u9tw.web.app

(expires Wed, 22 May 2024 18:58:25 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 1e7ade9d0f374c4ddb5d7ab6fc541062fc7a1ab4

Copy link
Collaborator

@borjaMarti borjaMarti left a comment

Choose a reason for hiding this comment

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

Ahhh I didn't know this bug was present. It has to do with how the loading state is implemented: the intent is that after confirming deletion, the loading spinner is shown. Once the list is deleted, the modal should disappear (and initially it does), but because the close state isn't modified, it reappears later when opening another modal.

No idea why that is. With your fix, we lose the loading state and we can still see and interact with the deleted list until the Firestore is updated and it triggers a re-render, but I think it's a better solution for now unless we find a way to fix the loading state not triggering a modal close.

Anyways, thank you for the fix!!

@ocsiddisco
Copy link
Collaborator Author

Ahhh I didn't know this bug was present. It has to do with how the loading state is implemented: the intent is that after confirming deletion, the loading spinner is shown. Once the list is deleted, the modal should disappear (and initially it does), but because the close state isn't modified, it reappears later when opening another modal.

No idea why that is. With your fix, we lose the loading state and we can still see and interact with the deleted list until the Firestore is updated and it triggers a re-render, but I think it's a better solution for now unless we find a way to fix the loading state not triggering a modal close.

Anyways, thank you for the fix!!

Thank for the review! I did not notice we could still click on the button list, I could not let it this way 😅 I pushed a new commit tonight, with deleteList as an async function. Let me know if you notice anything with this update. @borjaMarti

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