HandyPantry / handy-pantry

MIT License
0 stars 1 forks source link

Issue 24: Removing item from shopping list shouldn't "forget" which store we're viewing #26

Open NicMcPhee opened 2 years ago

NicMcPhee commented 2 years ago

If we remove an item from a shopping list from, e.g., the Willie's tab, it resets back to the default view, which is to show the left-most tab ("Other Store"). it really should stay on whichever store was previously selected.

The previous Cypress tests of deleting an item from the shopping list were fragile (they depended on there being 3 items in the "Other Store" list), and very incomplete (they never delete anything but the first item from the first store). This allowed this usability issue to creep in, so we should also add some new tests that fail in the current universe to highlight the issues.

NicMcPhee commented 2 years ago

It's not entirely clear what the "best" behavior is when we remove the last item from a store's "sub-list". Currently, when we remove the last item the store "disappears" from the set of tabs. Based on conversations with @jpwalbran and @OllieWillette667, this is probably a reasonable response, although we might want a snackbar notification so users aren't surprised when that store disappears.