-
Notifications
You must be signed in to change notification settings - Fork 153
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
[PNI] Setup categories navigation snippet #11848
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jhonatan-lopes
temporarily deployed
to
foundation-s-bugfix-117-b5hsk5
February 9, 2024 19:26
Inactive
jhonatan-lopes
temporarily deployed
to
foundation-s-bugfix-117-b5hsk5
February 9, 2024 19:31
Inactive
jhonatan-lopes
temporarily deployed
to
foundation-s-bugfix-117-b5hsk5
February 9, 2024 19:40
Inactive
jhonatan-lopes
commented
Feb 9, 2024
network-api/networkapi/wagtailpages/pagemodels/buyersguide/products.py
Outdated
Show resolved
Hide resolved
jhonatan-lopes
commented
Feb 9, 2024
jhonatan-lopes
temporarily deployed
to
foundation-s-bugfix-117-b5hsk5
February 9, 2024 20:35
Inactive
jhonatan-lopes
temporarily deployed
to
foundation-s-bugfix-117-b5hsk5
February 9, 2024 21:26
Inactive
danielfmiranda
approved these changes
Feb 9, 2024
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.
Amazing work @jhonatan-lopes! LGTM 👍
jhonatan-lopes
temporarily deployed
to
foundation-s-bugfix-117-b5hsk5
February 9, 2024 22:42
Inactive
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The buyers guide on PNI includes a sub navigation with categories:
The way that this is setup currently will include all categories defined in the CMS that are not flagged with a
hidden
property and displays them sorted by theirsort_order
. This allows editors to build the navigation menu with their desired items and order them:However, this setup is inefficient as there is an additional mental load on editors to keep track of which categories have been hidden and their relative order. It makes more sense instead to build a navigation menu out of the current categories and then order them.
This is the goal of this PR: to replace the current implementation by a "PNI categories navbar" snippet, located in the PNI side menu, that will allow editors to build a categories navigation -- displaying only the items that they want and setting them up in the correct order.
Link to sample test page:
Related PRs/issues: #11770
Checklist
Tests
Changes in Models:
[ ] Are my changes backward-compatible. If not, did I schedule a deploy with the rest of the team?Documentation:
Merge Method
💡❗Remember to use squash merge when merging non-feature branches into
main