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

Widgets editor: Add Copy All Content button #25498

Closed
strarsis opened this issue Sep 21, 2020 · 6 comments
Closed

Widgets editor: Add Copy All Content button #25498

strarsis opened this issue Sep 21, 2020 · 6 comments
Labels
[Feature] Widgets Screen The block-based screen that replaced widgets.php. [Type] Enhancement A suggestion for improvement.

Comments

@strarsis
Copy link
Contributor

Describe the bug
The current widgets editor is missing many of the features the normal editor provides,
namely the ability to edit the code directly, to copy everything, and so on.
Ideally the widget editor has the same feature parity as the normal editor, this also makes the UI less surprising.

To reproduce
Steps to reproduce the behavior:

  1. Open the Widgets editor.
    Notice that there are no menus as in the normal editor for e.g. editing the code directly.

Expected behavior
The same features as in the normal editor.

Additional context
#22875

@talldan
Copy link
Contributor

talldan commented Sep 22, 2020

@strarsis It'd be great if you could list specific things that are missing.

My understanding is that being able to edit the code directly isn't possible due to the way widgets are stored. But I might be wrong on this (cc @draganescu @adamziel @kevin940726).

@talldan talldan added the [Feature] Widgets Screen The block-based screen that replaced widgets.php. label Sep 22, 2020
@draganescu draganescu added [Status] Blocked Used to indicate that a current effort isn't able to move forward [Type] Feedback Issues that relate purely to feedback on a feature that isn't necessarily actionable labels Oct 1, 2020
@draganescu
Copy link
Contributor

This is blocked while we're waiting on reporter feedback.

@strarsis
Copy link
Contributor Author

strarsis commented Oct 1, 2020

@talldan: Yes, the code editor and the copy all content of a widget features notably.

@noisysocks noisysocks added [Type] Enhancement A suggestion for improvement. and removed [Status] Blocked Used to indicate that a current effort isn't able to move forward [Type] Feedback Issues that relate purely to feedback on a feature that isn't necessarily actionable labels Oct 2, 2020
@noisysocks noisysocks changed the title Widgets editor missing many editor features Widgets editor: Add Copy All Content button Oct 2, 2020
@noisysocks
Copy link
Member

Thanks for getting back @strarsis.

Let's add the Copy All Content button.

We cannot add Code Editor as the widgets editor does not store its blocks into a single HTML field. We do already support Edit as HTML on a per block basis, though.

@noisysocks
Copy link
Member

Hm. Thinking about it further, I'm not sure how Copy All Content would work.

In the post editors, it copies the raw HTML of the entire post. But the widget editor edits multiple widget areas, not a single post.

We could grab the HTML of every widget area and append it together. Would that be useful, though?

Note that you can already select multiple blocks by shift clicking and then and select Copy.

What do you think @mapk?

@mapk
Copy link
Contributor

mapk commented Oct 12, 2020

@noisysocks, good points!

If the "copy all content" option resides in the topbar, then I'd expect it to copy all content from all of the widget areas together as you mentioned. This doesn't seem to be useful though IMO. If we wanted to target an individual widget area, we start running into the similar problem that we experienced with the Global Inserter in the topbar. For now, I suggest we leave this out.

I think keeping this screen limited in features is okay to do. Selecting multiple blocks and copying them still works as noted, so that feels like a good interim solution.

@mapk mapk closed this as completed Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Widgets Screen The block-based screen that replaced widgets.php. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants