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

Fix nav highlights in admin area #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

peteryates
Copy link
Member

@peteryates peteryates commented Jan 16, 2025

Now when we're deeply into the nested structure the primary nav highlights properly.

image

Changes

  1. redirect from /admin to /admin/teachers instead of just rendering the teachers list on /admin
  2. within the admin section nest ABs and Schools within Organisations so the structure matches the nav
  3. add active_when args to the service nav so nav items are appropriately highlighted

In the nav we're nesting schools, ABs, DPs and LPs beneath
organisations so it makes sense for us to do it in the routes too, to
keep things consistent.

Also, there's no /admin page, we render admin/teachers here
instead. This means the nav won't know what's actually being shown
(without us hardcoding extra behaviour) so let's redirect instead.
This sets active to true for nav nodes when the beginning of the
current_path matches the active when path.
Copy link

Review app deployed to https://cpd-ec2-review-28-web.test.teacherservices.cloud

@peteryates peteryates added the bug Something isn't working label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants