Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Category Block: Don't automatically save category changes in edit mode, add cancel button #172

Closed
ryelle opened this issue Nov 29, 2018 · 3 comments
Assignees

Comments

@ryelle
Copy link
Member

ryelle commented Nov 29, 2018

From #166

We're now aligning the Done button right and including a cancel link so that folks aren't forced to save changes.

Currently all category selections are automatically applied & saved to the block, which works for both the sidebar UI and edit mode UI. If I understand correctly, we want to add a "cancel" button to just the edit mode, and cancelling should reset to the previous selected categories. ie, I select "Shirts", then go to edit mode, change my selection to "Shoes", but hit cancel – the block should still be showing products in "Shirts".

I'm assuming the same is not true for the sidebar, there is no concept of cancelling changes in the sidebar because they live-update. The only possible issue here is that the sidebar UI and edit mode UI can both be on the screen at the same time, and having it save real-time means your changes to edit mode are reflected in the sidebar and vice-versa. Looking at #171 we could show Layout open while in edit mode, but it's possible a user would open the Product Category setting anyway.

The other issue (code-wise) is that we now have two different functionalities when clicking a category, but both UIs use the same base component, which will add complexity to the components.

Does this sound right, @jameskoster ?

@ryelle ryelle added the Blocks label Nov 29, 2018
@ryelle ryelle added this to the 1.2.0 milestone Nov 29, 2018
@ryelle ryelle self-assigned this Nov 29, 2018
@ryelle ryelle assigned jameskoster and unassigned ryelle Nov 29, 2018
@ryelle
Copy link
Member Author

ryelle commented Nov 29, 2018

Assigning to @jameskoster since he mentioned a possible solution (?) in slack

@jameskoster
Copy link
Member

Yup, all sounds correct.

This functionality is coming to core. We just need to keep an eye on this issue and adopt the feature when it's ready.

@ryelle ryelle removed this from the 1.2.0 milestone Nov 30, 2018
@ryelle
Copy link
Member Author

ryelle commented Nov 30, 2018

Thanks– I'm moving this out of the 1.2 release milestone then, and we can add it in once there's a core pattern.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants