-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix: Pattern details page backpath #61174
Conversation
Size Change: +12 B (0%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
f19ff06
to
abbaac7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is the correct way to fix it. The SidebarNavigationScreenPatterns
component is using categoryType
and categoryId
to select the right list item in the sidebar. These values should be preserved in the backpath.
@jsnajdr Thanks for the review! |
Fix part of #61172
Related to #60466
What?
This PR ensures that the previously selected category is selected when you return from the Pattern details/Template part details page.
Why?
On the pattern page, the
categoryType
parameter indicates which template part or pattern is selected, and thecategoryId
parameter indicates which category is selected.Previously, these parameters were carried over when returning from the details page, but after #60466 was merged, it appears that the only explicitly specified parameter (
path
) is carried over.How?
I explicitly included
categoryId
andcategoryType
in thebackpath
. I would appreciate any advice on whether this is the correct approach.Testing Instructions
Patterns
Template Part
Screenshots or screencast
c08905ff2eb549a55923ce051e6393fa.mp4