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

DataViews: Routing related issues. #60709

Closed
youknowriad opened this issue Apr 12, 2024 · 5 comments · Fixed by #62372
Closed

DataViews: Routing related issues. #60709

youknowriad opened this issue Apr 12, 2024 · 5 comments · Fixed by #62372
Assignees
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

Comments

@youknowriad
Copy link
Contributor

youknowriad commented Apr 12, 2024

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

  • Go to Patterns.
  • Select the "All Template part" category and then one of the Template Parts.
  • Go to the editor.
  • Go back to the patterns page.
  • Note how the section selected is the "All patterns" though it should be "All template parts".

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

@youknowriad youknowriad added [Type] Bug An existing feature does not function as intended [Feature] Data Views Work surrounding upgrading and evolving views in the site editor and beyond labels Apr 12, 2024
@jorgefilipecosta jorgefilipecosta self-assigned this Jun 6, 2024
@jorgefilipecosta
Copy link
Member

Hi @youknowriad, I submitted a fix for bug 1 at #62372.
I'm not being able to replicate bugs 2 and three. I think they were fixed meanwhile.

@youknowriad
Copy link
Contributor Author

BUG 2 is indeed fixed. For Bug 3, it's less problematic now, but it would be ideal if the actual menu item appears selected in the sidebar.

@youknowriad
Copy link
Contributor Author

@jorgefilipecosta just making sure that you didn't miss my last comment here.

@jorgefilipecosta
Copy link
Member

Hi @youknowriad,

For Bug 3, it's less problematic now, but it would be ideal if the actual menu item appears selected in the sidebar.

I think the PR I merged #62372 already addressed this issue, the actual menu item appears selected, let me know if you are still facing this bug.

@youknowriad
Copy link
Contributor Author

yes, it works. Thanks @jorgefilipecosta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants