Skip to content

Conversation

@dancastellon
Copy link
Contributor

Resolves #4545
Impact: minor
Type: bugfix

Issue

After performing a specific set of steps in the UI (see issue), the admin sidebar becomes unusable.

Solution

There was a piece of logic in productGridContainer.js that automatically closed the sidebar if the admin didn't have any products selected in the grid. It was checking whether the user's selectedGridItems preference was empty (empty array or undefined). After performing the reproduction steps, that preference is set to an empty array.

To prevent the auto-close logic from re-runing, I set selectedGridItems to undefined when auto-closing the sidebar, and updated the logic to only run if selectedGridItems is an empty array.

Breaking changes

None

Testing

  1. Perform the steps in the referenced issue and confirm you can open the sidebar as the last step
  2. Select a product in grid. Click it again to de-select. Confirm sidebar still auto-closes

@dancastellon dancastellon requested a review from aldeed August 14, 2018 15:47
@aldeed aldeed merged commit 72c3ddd into release-1.15.0 Aug 14, 2018
@aldeed aldeed deleted the fix-4545-dancastellon-sidebar-edge-case branch August 14, 2018 16:02
@spencern spencern mentioned this pull request Aug 14, 2018
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.

3 participants