Opened 3 years ago
Closed 3 years ago
#54075 closed enhancement (reported-upstream)
Disabling legacy widget previews in the block editor
Reported by: | eatingrules | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Widgets | Keywords: | |
Focuses: | ui, accessibility, administration | Cc: |
Description
In the new Widget Block Editor, when a user clicks on a Legacy Widget the state shift to a different interface is a jarring user experience.
It is additionally confusing because the behavior is different than regular blocks in the same interface.
From what I've seen on multiple production sites so far, the previews aren't very accurate right now (though #53801 should help a lot), with width and height spacing issues being different than the front end.
Being able to preview widgets in the Block Editor is also not that important since they can be edited in the Customizer -- which actually does show an accurate preview.
Instead of trying to fix the previews (which may never be 100% possible), I propose we remove Legacy Widget Previews altogether.
If that's a nonstarter, we should at least give users the option to disable them -- and add a filter to do the same.
@costdev showed us a nifty trick to disable the widget previews via the DevTools console: https://core.trac.wordpress.org/ticket/53801#comment:15 I tried this and found that having the legacy widgets look & behave like old-style widgets made it more intuitive and easier to use.
Additionally, removing Legacy Widget previews will accelerate adoption of the new Widget Block Editor.
This will make the distinction between the new/legacy widgets much more clear, which will help both users and developers see the benefit in moving to new block widgets.
Note, too, that the very popular Genesis Framework has completely disabled the new Block Widget Editor, and I know of at least one other theme that has had significant issues with the new editor as well. So disabling Legacy Widget Previews may allow them to restore the functionality for their users and help further the adoption of the new editor.
Change History (13)
#3
follow-up:
↓ 4
@
3 years ago
Have not thought this through, but since these problems with previews seem to be more like edge cases, I wonder if a filter would be useful, so if a plugin does things that don't work with previews, that plugin can disable them via a filter (for the widgets it provides or globally)?
#4
in reply to:
↑ 3
@
3 years ago
Replying to andraganescu:
since these problems with previews seem to be more like edge cases, I wonder if a filter would be useful
I agree, a filter would absolutely be useful! But I think we really need to also provide the users with an easy way in the interface to disable (or at least toggle on/off) the preview.
So far on every site where I've tried the new widget editor, the Legacy Widget previews have been problematic (even once #53801 is solved).
The biggest problem I'm seeing is that the width of the preview is wider than the sidebar, and the height of the individual widgets is not being calculated correctly.
Here's a screenshot of the widget block editor preview on my site: https://share.nrdp.rs/xQu6wlAO
Here's what it looks like on the front end: https://share.nrdp.rs/L1urX5QL
That should probably be raised as another ticket -- but in the meantime, at least adding this preview toggle (and a filter, yes!) would go a long way to making the new widget editor functional for users.
#5
@
3 years ago
Also, I think having a per-widget filter (which developers can add to their own widgets) and a sitewide filter (to disable all legacy widget previews) would be great. 😁
This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.
3 years ago
This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.
3 years ago
#9
@
3 years ago
This ticket has been reviewed during the last two weekly Accessibility Team's bug-scrub.
Some members of the team shared their preference for having the widget preview off by default.
In any case, at the very least users should be able to activate or deactivate the widget preview on their own.
Also, a filter to allow plugins which add widgets to enable or disable the preview for their widget might be a plus.
#10
@
3 years ago
Hi all, I opened a new issue in the Gutenberg repository to discuss adding this as a preference within the "Option" ellipses menu that appears in the editor top bar on both the Widget screen and Customizer Widgets screen: https://github.com/WordPress/gutenberg/issues/35087
Here's an updated snippet as an example of how a toggle could look (entirely illustrative and by no means complete nor tested for coding standards etc!).
To view this:
You should now see an eye icon at the top left of the Widget Block Editor toolbar. Click it to toggle Legacy Widget Previews.
Notes:
focusin
/focusout
handlers on.wp-block-legacy-widget
would need to be added/removed depending on the toggle state.