DataViews: Routing related issues. #60709
Labels
[Feature] Data Views
Work surrounding upgrading and evolving views in the site editor and beyond
[Type] Bug
An existing feature does not function as intended
Description
Sometimes some url arguments linger when navigating between data views related pages, potentially causing bugs in some pages.
Step-by-step reproduction instructions
Bug 1
1- Go to pages: The url should be
path=%2Fpage
2- Click "drafts": The url becomes something like
path=%2Fpage&activeView=drafts&isCustom=false
The first issue here is that I think "isCustom=false" shouldn't be present in the url because "false" is the default value. If an optional argument equals its default value, it should ideally be dropped from the url (nicer urls)
3- Go back to "all pages" The url becomes something like
path=%2Fpage&activeView=all&isCustom=false
Notice that 1 and 3 refer to the same page with two different URLs, this is not great, 3 should just use the same url as 1 (omitting default values from the url).
Bug 2
This one is more important than the previous bug:
1- Go to pages: The url should be
path=%2Fpage
2- Click "drafts": The url becomes something like
path=%2Fpage&activeView=drafts&isCustom=false
3- Click the "back" button on the sidebar to go back to the root level of the site editor: The url becomes
activeView=drafts&isCustom=false
Note the lingering activeView and isCustom arguments that should ideally be removed at this stage (we should end up with no argument in the url (it's the root of the site editor)
4- Click "templates", you'll end up in a broken state in the templates page (empty list) because of the lingering arguments in the url.
Bug 3
Screenshots, screen recording, code snippet
No response
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
The text was updated successfully, but these errors were encountered: