Skip to content

DataForm/DataViews: Consider adding a revisions or compare mode (or view?) #76623

@talldan

Description

@talldan

What problem does this address?

With the visual revisions feature shipping in WordPress 7.0, and the possibility of posts and blocks using DataForms more in the future (Quick Edit / Block Fields), I think it could be worth considering how revisions can be presented within a DataView or DataForm.

#76359 is a related issue.

What is your proposed solution?

For the API, I think one of the challenges is that DataForm/DataView typically receives data via a single prop. It might need to support diff data, or second previousData value to compare against.

I'd be interested to hear thoughts on whether this should be a specific 'view' or 'layout'. I could see arguments for side-by-side, stacked or table that are layouts specific to a revisions. Or there may be a need to support revisions in existing views or layouts.

For the UX, I think the fields should be in readonly mode, and use the same Red/Yellow/Green indicator for removals/modifications/additions alongside the field value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyond[Package] DataViews/packages/dataviews[Type] EnhancementA suggestion for improvement.
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions