-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Show save button in the Reusable Block toolbar if there are changes #29871
Comments
Thanks for looking at this one! The main issue that comes to mind is that reusable blocks already use the space next to the icon to show the full title of the reusable block: In that case it becomes almost indistinguishable whether "Save" represents an action or a block name. Should "Save" take more of the appearance of a regular primary button? Especially since the action is significant (it commits live changes). I could see the action showing after the "ellipsis" button in the toolbar, for example, as an appendix :)
My inclination would be that the reusable block should only be saved from the wrapper block, which is where you do the meta-operations like naming the reusable block. The parent selector having a direct action on the parent besides selecting could get a bit tricky to handle and communicate well. |
Thanks for these notes @mtias! I tried another version that only allows saving from the Reusable block toolbar: save-from-rb_v2.mov
Really like this suggestion because it allows for the custom name of the Reusable block to be displayed persistently and because it results in a lot less horizontal shifting around as the Save button is shown and hidden :) |
Thank you for your explorations Channing! |
Nice, I think this helps a bit with the clarity. Is there other possible placement that occurs to you that might be better? Also not sure what should happen when the block is actually saved. In the above prototype you have a checkmark, but I'd imagine the checkmark would disappear if you deselect the block and select it again, so should it disappear from the start? The "is saving" state should also coincide with the one at the top from the "is busy" component state. |
For the saving, I was curious how it might work if we applied a busy state to the button on click, then displayed a snackbar on success/error. That could allow us to contextualise any errors, and potentially provide an option for users to perform subsequent actions (e.g. undo/revert), if we feel that is worthwhile. Since the save button in the toolbar can be easily missed when editing innerblocks, is it worth displaying the dot in any location where the reusable block name appears for maximum exposure? I see you have it in the Inspector which I like, should it also appear in block list view(s)? |
A snackbar seems important to have, for sure. It's worth noting this doesn't change anything about the main saving flow in the top level "update" or "publish" button, which still would include the reusable block if it has pending changes. |
Thanks for the feedback, all!
@mtias I like the Save button grouped with the Options ellipses as a sort of “appendix” area but maybe they are swapped so that Save comes first? (this change is reflected below)
I didn't communicate this very well, sorry 😂 The sequence I proposed before was:
To your point @mtias and @jameskoster, maybe a better approach is to use the button busy state. In this scenario, I wonder if it would make sense to leave the Save button persistently visible in the RB toolbar rather than hiding and showing it:
Really like both of these ideas, I’ve included here: rb-save.movHere's a Figma prototype in case anyone wants to click around. Note that the Save action in this video/prototype goes straight from the active → disabled state but imagine there's an animated busy state in between :) |
Another problem is when he reusable block contains innerblocks. There's no way at the moment to let user know is editing a reusable block. A lock state should be added before any edit/delete action is performed. |
@Tropicalista we're exploring an interaction similar to what you describe over in #29337 :) @critterverse I like the harmony of having the save button here behave the same as the one in the top bar. It helps me understand that the RB is a global element before I even edit it. On that last point, do you think it would be overkill to have a one-time guide pop up the first time a user saves an RB in this context, to highlight the global nature of the action? Perhaps something simple like "You just saved a reusable block, any other documents that include this block have been updated to reflect this change." |
Interesting! This is just a quick sketch but I can imagine a nice bubbly animation here in the style of the Gutenberg onboarding guides :) I like that this could help with user understanding as well as potentially help reinforce any color coding decisions. Perhaps the snackbar wouldn't show up on first save when you see the guide, but then always appear after that. |
It'd be cool to see that flow more integrally, but contextual education can help. Perhaps even more in detail about where things are. The material UI of the Save button could also be wider to gain more specific weight within the toolbar. It seems squeezed for the main action at that moment, no? There's something uncanny about how the ungroup/revert/convert to regular blocks icon lives with Save. They can be understood as opposites but are treated as distant UIs. |
An option with a lighter a footprint could be an action to "Learn more about Reusable blocks" on the Snackbar that appears on save. |
These are helpful notes, thanks @pablohoneyhoney!
I originally matched the padding for a text-based toolbar item but I've updated it to match the primary button style which feels a lot better 👍
I hear what you're saying here. One revision that could help is to move the "convert to regular block" action into the ellipses menu (I realize this would be undoing a change made last summer 😅). FWIW that's where I was expecting to find this item initially because of the flow for converting a regular block into a Reusable block — the "convert to regular block" action is sort of the reverse of that (albeit at a local, not global, level). This would also bring the Reusable block more in line with the "detach" behavior of Template Part blocks. Curious whether it seems likely that this action will remain in the ellipses menu for Template Parts (cc @jameskoster who might have more context on this). |
I think this is fair. Using a reusable block as a starting point/template (the original issue that lead to the ungroup action being added to the toolbar) is now better served by block patterns in general. "Ungrouping" the blocks – whether that is from a template part or a reusable block – does not feel like a primary action to me. Therefore the Toolbar placement seems inappropriate. |
This is not user-serviceable, though. Until you can easily create your own patterns, the flow of detaching the blocks to get a quick start is going to remain important to consider. |
Brainstorming... What are the primary actions of an instance of a Reusable block? What are the secondary actions of an instance of a Reusable block? So before the discussion continues it would be helpful to create an overview. A perspective in relation to an instance of a Reusable block and the Reusable block in itself. |
I also find it difficult to select the entire reusable block (which may contain multiple blocks inside) and I have to keep hovering and clicking until I click the exact "pixel" I am supposed to. Can't navigate using the keyboard either, that just takes the cursor to the block above but the reusable is never entirely selected like before. |
@TheSimArchitect we're exploring a solution to that in #29337 :) |
Nice!!! |
These are great questions @paaljoachim — I'm also looking at the division between primary/secondary controls for the Reusable block in #30357. Attempted a breakdown/overview there! |
One thing in relation to needing to click a dot to do something. An example. The visual seen here: #29577 (comment) one just unchecks what one does not want to save and then should be able to move on in the Save/Publish flow. |
EDIT Here is a suggestion for a Save procedure. Where I also incorporate an undo button. (Actually the revisions icon. The proper icon to use would be the back undo arrow icon. Which I thought about when I posted this comment.) It starts out with just having saved. Publish panel: Clicking the Save button (blue color same as the Publish button) in the Reusable block removes the dot in the toolbar and in the Publish buttons, and saves the change. This is a recording of the prototype. Reusable-block-Save-procedure.mp4Test the Figma Prototype: Figma file located here: https://www.figma.com/file/4jP1BWklMIIS50nvo7NJa5/Reusable-blocks-Save-procedure?node-id=2%3A5 Version 2. For this prototype I removed the dots and changed the revision icon for the undo icon. Here is a screenshot: Version 2 prototype here: |
Thanks so much for continuing to explore this, @paaljoachim! One thing I really like about your design (and something you touched on in your earlier comments) is the POV that there should be an easy way to Discard changes that's not hidden beneath a layer of UI. I wonder if it would make sense to incorporate Save/Discard functionality in the inspector underneath the “Revisions” panel (which is currently being explored in issue #30357). RB-save-discard.movSo starting with an up-to-date Reusable block, the Save flow could be... A change is made to the RB: ↓ Up-to-date RB: |
This issue was discussed in the Making WordPress Design channel yesterday: https://wordpress.slack.com/archives/C02S78ZAL/p1618936992186300 Just wanted to note that several contributors suggested that the first version/implementation of the design might work better without the green color (which is still being explored more holistically): ^ Removing the "click-through" overlay (that's currently being explored in #30156), Revisions, and Save/Discard actions from the inspector so this issue can focus on the Save button in the toolbar :) |
Thanks Channing! Here is another method being explored by @jameskoster |
We do have a general improvement of the multi-entity saving method added to a new issue: #31456 |
This is part of #27890: Improvements to Reusable Blocks
Building off of an idea from @jameskoster about using dots as a way to indicate unsaved changes in the canvas (#29577, comment), this version explores using both dots and an explicit Save button in the toolbar as indicators of changes made to a Reusable block.
It would be nice to be able to save what you’ve changed within the inner blocks without having to click back over to the Reusable parent block, so I looked at including the Save button as part of the parent selector.
save-from-inner-block.mov
Saving sequence:
(Note that the Save button and “unsaved changes” notification dots are green rather than blue, building on the potential Reusable block color-coding proposed in #29337.)
You could also save changes to inner blocks while the Reusable parent block is selected, either from the toolbar or the block inspector:
save-from-rb.mov
Note that in this flow, the Save button would replace the move up/down arrows and drag handle in the Reusable block toolbar until the save action is complete.
The text was updated successfully, but these errors were encountered: