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 issue where snackbar would not show up when same error message is triggered multiple times #3389

Merged
merged 1 commit into from
Dec 11, 2022

Conversation

cmdcolin
Copy link
Collaborator

I found that if you trigger the same snackbar error e.g. two times, then close the snackbar, then trigger it again a third time, the snackbar will not show up.

Found debugging #3388

This fixes the issue by always showing the last message on the snackbar stack. It avoids tricky React state+mobx-state-tree state conflicts by removing all react hooks from method

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Dec 11, 2022
@cmdcolin cmdcolin added bug Something isn't working and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Dec 11, 2022
@codecov
Copy link

codecov bot commented Dec 11, 2022

Codecov Report

Merging #3389 (e7b525f) into main (0dfd9bf) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3389      +/-   ##
==========================================
- Coverage   59.32%   59.31%   -0.01%     
==========================================
  Files         812      812              
  Lines       29761    29744      -17     
  Branches     7160     7155       -5     
==========================================
- Hits        17656    17643      -13     
+ Misses      11917    11913       -4     
  Partials      188      188              
Impacted Files Coverage Δ
packages/core/ui/Snackbar.tsx 68.42% <100.00%> (-3.81%) ⬇️
products/jbrowse-web/src/util.ts 48.33% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cmdcolin
Copy link
Collaborator Author

there might be a small UI difference compared with main after this change where it closes and re-pops up 100ms later on main, but should be a minor change in exchange for some correctness here

@cmdcolin cmdcolin merged commit 3febca9 into main Dec 11, 2022
@cmdcolin cmdcolin deleted the snackbar_simplify branch December 11, 2022 04:57
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 this pull request may close these issues.

None yet

1 participant