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

[PNI] Setup categories navigation snippet #11848

Merged
merged 22 commits into from
Feb 9, 2024

Conversation

jhonatan-lopes
Copy link
Contributor

Description

The buyers guide on PNI includes a sub navigation with categories:

image

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 their sort_order. This allows editors to build the navigation menu with their desired items and order them:

image

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.

image

Link to sample test page:
Related PRs/issues: #11770

Checklist

Tests

  • Is the code I'm adding covered by tests?

Changes in Models:

  • Did I update or add new fake data?
  • Did I squash my migration?
  • [ ] Are my changes backward-compatible. If not, did I schedule a deploy with the rest of the team? ⚠️ Preboot will need to be disabled! ⚠️

Documentation:

  • Is my code documented?
  • Did I update the READMEs or wagtail documentation?

Merge Method
💡❗Remember to use squash merge when merging non-feature branches into main

@jhonatan-lopes jhonatan-lopes temporarily deployed to foundation-s-bugfix-117-b5hsk5 February 9, 2024 19:26 Inactive
@jhonatan-lopes jhonatan-lopes temporarily deployed to foundation-s-bugfix-117-b5hsk5 February 9, 2024 19:31 Inactive
@jhonatan-lopes jhonatan-lopes temporarily deployed to foundation-s-bugfix-117-b5hsk5 February 9, 2024 19:40 Inactive
@jhonatan-lopes jhonatan-lopes temporarily deployed to foundation-s-bugfix-117-b5hsk5 February 9, 2024 20:35 Inactive
@jhonatan-lopes jhonatan-lopes temporarily deployed to foundation-s-bugfix-117-b5hsk5 February 9, 2024 21:26 Inactive
Copy link
Collaborator

@danielfmiranda danielfmiranda left a 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 jhonatan-lopes temporarily deployed to foundation-s-bugfix-117-b5hsk5 February 9, 2024 22:42 Inactive
@jhonatan-lopes jhonatan-lopes merged commit f99c0bc into main Feb 9, 2024
6 checks passed
@jhonatan-lopes jhonatan-lopes deleted the bugfix/11770-pni-prod-cat-sort-order branch February 9, 2024 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants