Skip to content

DataViews: Active page is not highlighted properly in list view. #60708

@youknowriad

Description

@youknowriad

Description

When you're navigating the the page lists (list view).
you can select pages and they become highlighted,
you can click the "preview" to enter the editor and you can go back to the previous page (two steps through the details page)
But when you're back to the list view, the right page is actually rendered in the preview but it's not highlighted properly in the list.

It seems like we need a "controlled" mode for the selection in the DataViews component (passing the selection as a prop)

Step-by-step reproduction instructions

A quick way to trigger this is to open a url like the following: http://localhost:8888/wp-admin/site-editor.php?postId=2&path=%2Fpage

Screenshots, screen recording, code snippet

Screenshot 2024-04-12 at 2 08 36 PM

Sample page is active on the preview but not on the list view.

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Labels

[Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyond[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions