WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.49k stars 4.19k forks source link

DataForm: replicate DocumentInspector in QuickEdit #64519

Open gigitux opened 2 months ago

gigitux commented 2 months ago

In the Site Editor, the Pages page is powered by the DataViews library. We are implementing the Detail Panel (aka Quick Edit) to allow users to edit one or more pages easily (https://github.com/WordPress/gutenberg/issues/55101). This issue contains a list of the view/edit controls that we have to implement for this view:

louwie17 commented 2 months ago

We may also want to add password, date, and allow comments to this list. Although looks like date is already implemented: https://github.com/WordPress/gutenberg/pull/64267

In addition the posts quick edit has Categories, and Tags as well.

gigitux commented 2 months ago

We may also want to add password, date, and allow comments to this list. Although looks like date is already implemented: https://github.com/WordPress/gutenberg/pull/64267

Thanks! Added!

In addition the posts quick edit has Categories, and Tags as well.

True, but Categories and Tags doesn't exist for the page post type:

image
gigitux commented 1 month ago

👋 Howdy @jameskoster!

I need your expertise with some UI/UX aspects for field controls. Here are the details:

Template Field Control

In the page editor, the template field control offers various options:

https://github.com/user-attachments/assets/30563581-f608-451b-816b-709a1eee5f96

Should we implement a similar design?

Password Field Control

The password field control is located in the status section of the page editor:

https://github.com/user-attachments/assets/0fc30d6e-8cdf-4482-960a-30949fb8d800

Do you think it's worth replicating this functionality for the data view as well?

Thanks for your help!

jameskoster commented 1 month ago

Template Field Control

In terms of the quick-edit panel I think the only option that makes sense here is swapping the template. Would it be possible to hide the other options?

Do you think it's worth replicating this functionality for the data view as well?

Yes I think so. See https://github.com/WordPress/gutenberg/issues/49012.

gigitux commented 1 month ago

In terms of the quick-edit panel I think the only option that makes sense here is swapping the template. Would it be possible to hide the other options?

https://github.com/user-attachments/assets/16f0771c-cedc-4451-ad12-e17ec81cc402

Should be this the experience?

Yes I think so. See https://github.com/WordPress/gutenberg/issues/49012.

Great! 👍

Technically, those are two different fields of the page object. I'm wondering if this could be a good chance to explore the JSON Forms layout property: in particular way, the group layout.

cc @louwie17 @joshuatf

jameskoster commented 1 month ago

Should be this the experience?

I think we can try that to start, seeing as it already exists. Currently the previews are populated with content from the current page, do you have any idea how that might work in the context of bulk selection? Should we use the first item in the selection for the preview? Or not use any data in the preview (blocks will just display placeholder content).

oandregal commented 1 month ago

I've updated a bit the issue description and reworded the title so its focus is clearer.

gigitux commented 1 week ago

I marked as done the order field because we decided to keep it as an action in quick edit as well for now. You can find more details on this Slack thread: https://wordpress.slack.com/archives/C02QB2JS7/p1729765343839939