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

Widget Editor: Moving widgets between areas #24703

Closed
mapk opened this issue Aug 20, 2020 · 5 comments
Closed

Widget Editor: Moving widgets between areas #24703

mapk opened this issue Aug 20, 2020 · 5 comments
Assignees
Labels
[Block] Legacy Widget Affects the Legacy Widget Block - used for displaying Classic Widgets [Feature] Widgets Screen The block-based screen that replaced widgets.php. Needs Design Feedback Needs general design feedback.

Comments

@mapk
Copy link
Contributor

mapk commented Aug 20, 2020

In the widgets.php screen widgets can be moved by dragging and dropping into different areas because all areas are available in the one screen. My proposal for a single area screen will change this. That means users can no longer drag and drop widgets between areas. So I'm exploring alternative ways to move widgets.

Block toolbar

I've iterated around the idea of bringing the ability to activate/deactivate widgets using the block toolbar. This is somewhat limited to that particular action though, so can we expand on that to move widgets to any area?

It might be better to get away from these "activate" and "deactivate" scenarios. Since I'm proposing to keep an Inactive Widget Area, we can just have the user "move" their widgets to any area. If the widget is moved to the Inactive Widget Area, the widget, of course, becomes deactivated. So how should we surface this to the user?

Option 1 - Ellipses menu dropdown

We could add consistent block toolbar options (in ellipses menu) for the Legacy Widget block that wraps the widgets. However, this add a lot of options to an already long dropdown.

Screen Shot 2020-08-20 at 2 38 49 PM

Option 2 - Top level in block toolbar

There is the option to surface these interactions in the top level of the block toolbar making them their own dropdown. This would only be available for the Legacy Widget block.

Screen Shot 2020-08-20 at 2 37 34 PM


Introducing problems?

I do see an obvious problem with this solution right now. Any changes to an Editor need to be saved. If I "move" a block from one area to another, how do these both get saved? Which editor should I be viewing after the move is complete?

Possible options for this flow

  • Save the current screen automatically and push the user to the new screen where the widget now exists and require a save.
  • Save both screens automatically, but keep the user in their current screen. This could require a prompt of some kind to ensure the user is aware of what's about to happen.
  • Other ideas?

Moving vs. Copy/Paste

"Moving" could also be going down a rabbit hole. This is how I landed earlier on active widgets only being allowed to move to the inactive widgets area, while inactive widgets could only be moved to active widget areas. Active widgets, initially as I thought about this, would not allow moving between widget areas using the drop down. The way that could be accomplished is by copy/pasting (existing ability) the block from one widget area into the other. That would be straightforward requiring the user to save their editor states before jumping to the next one and pasting it in.

Feedback

I'm looking for feedback on whether or not this "move" ability feels like a good solution.

@mapk mapk added [Feature] Widgets Screen The block-based screen that replaced widgets.php. [Block] Legacy Widget Affects the Legacy Widget Block - used for displaying Classic Widgets labels Aug 20, 2020
@mapk mapk self-assigned this Aug 20, 2020
@mapk mapk added the Needs Design Feedback Needs general design feedback. label Aug 20, 2020
@noisysocks
Copy link
Member

  • Save the current screen automatically and push the user to the new screen where the widget now exists and require a save.

This might cause unexpected updates to go live on the user's site.

  • Save both screens automatically, but keep the user in their current screen. This could require a prompt of some kind to ensure the user is aware of what's about to happen.

I imagine most users would just dismiss the prompt without reading it.

  • Other ideas?

This reminds me of the if I cut a file, but then don't paste it anywhere, where does the file go? problem that Apple infamously solved by not adding Cut to Finder 🙂

So, along those lines, we could have only Copy to instead of Move to.

Alternatively we could do something similar to the Site Editor where clicking Save brings up an interface that lets you save multiple things at once.

Screen Shot 2020-08-21 at 10 16 14

@noisysocks
Copy link
Member

I think I prefer leaning on the existing block copy and paste mechanism. Copy already exists in the ellipsis menu. Could we the discoverability of Paste?

@mapk
Copy link
Contributor Author

mapk commented Aug 25, 2020

@noisysocks, I like those ideas! I'm working through those flows a bit more and closed the issue about activating/deactivating widgets in favor of this one. I'll get some prototypes on Copy to posted soon.

I think I prefer leaning on the existing block copy and paste mechanism. Copy already exists in the ellipsis menu. Could we the discoverability of Paste?

I've been thinking about this one as well, but it's just not as explicit. This may not be a problem, but thinking through edge cases where problems could arise is important.

@mapk
Copy link
Contributor Author

mapk commented Aug 25, 2020

Considering @noisysocks' feedback along with others, it's worth moving forward with the copy/paste functionality that comes with all blocks inherently. This would play out similarly to this prototype below:

Prototype

copy-paste

@mapk
Copy link
Contributor Author

mapk commented Aug 26, 2020

Looks like we're going to keep the multiple widget areas on screen. This means drag and drop will still work between them. I'm going to close this issue since we're going in that direction.

#24561 (comment)

@mapk mapk closed this as completed Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Legacy Widget Affects the Legacy Widget Block - used for displaying Classic Widgets [Feature] Widgets Screen The block-based screen that replaced widgets.php. Needs Design Feedback Needs general design feedback.
Projects
None yet
Development

No branches or pull requests

2 participants