Skip to content

DataViews: Routing related issues. #60709

Closed

Description

@youknowriad

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

Activity

  1. added
    [Type] BugAn existing feature does not function as intended
    [Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyond
    on Apr 12, 2024
  2. jorgefilipecosta commented on Jun 6, 2024

    @jorgefilipecosta
    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.

  3. youknowriad commented on Jun 6, 2024

    @youknowriad
    ContributorAuthor

    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.

  4. youknowriad commented on Jun 6, 2024

    @youknowriad
    ContributorAuthor

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

  5. jorgefilipecosta commented on Jun 7, 2024

    @jorgefilipecosta
    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.

  6. youknowriad commented on Jun 7, 2024

    @youknowriad
    ContributorAuthor

    yes, it works. Thanks @jorgefilipecosta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

[Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyond[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

    Sponsor
    SponsoredKunjungi sekarang
    Promo