Showing an auto
popover hides all other auto
popovers
#83
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Working through various conditions, I discovered a bug in the existing behaviour. Calling
showPopover()
on anauto
popover should hide all otherauto
popovers - there should only be oneauto
popover visible at a time.I think this is related to #70 but I don't think #70 caused it.
This refactors a large part of the code to abstract the notion of hiding all auto popovers into a single function - and consequently the click handler gets heavily refactored. I've added a test to confirm that showing a auto popover hides others and done a fair amount of manual exploratory testing and I haven't seen this introduce any further regressions.
Steps to test/reproduce
Please explain how to best reproduce the issue and/or test the changes locally (including the pages/URLs/views/states to review).
The tests should explain steps to reproduce.
Show me
Provide screenshots/animated gifs/videos if necessary.
REMEMBER: Attach this PR to the Trello card