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

USWDS-Site: Fix "current" navigation on security updates #2974

Open
amyleadem opened this issue Nov 18, 2024 · 0 comments
Open

USWDS-Site: Fix "current" navigation on security updates #2974

amyleadem opened this issue Nov 18, 2024 · 0 comments
Labels
Status: Triage We're triaging this issue and grooming if necessary

Comments

@amyleadem
Copy link
Contributor

amyleadem commented Nov 18, 2024

Summary

The pages in the security_updates collection (example security update page) do not show the correct "current" page in the side navigation.

Problem details

This is happening because current.html connects the side nav with posts in a given collection by checking for the parent page's subnav.type and matching it with the collection declared in config.yml.

However, the security.md file has two subnav declarations in its front matter, which is causing subnav.type to be ignored.

Next steps

We should:

  1. Consider if we still need these security updates from v2 on our site, or if they can be considered outdated.
  2. If we need them, consider replacing subnav.type: security_updates in the page's front matter with type: security_updates.
    1. Note: This is dependent on the fix in PR USWDS-Site: Combine "What's new" and "News and updates pages #2958, which enabled connecting the side nav with a collection via the type data key.

Related issue

This is a follow up to the conversation in PR #2958

Comment from #2958

I recommend we remove the subnav.type check in lines 7-8 and replace it with the check added in lines 14-15.

Currently, there is only one other page that uses subnav.type: security.md. Replacing subnav.type with type here should still connect it to the expected collection in config.yml.

I don't see anything in the repo relating to page.type that would cause any regressions, but of course we would want to test that. If we move forward with this approach, we would also need to make an update to the front matter in security.md.

Curious to hear thoughts on this approach and proposed additional change.

Originally posted by @amyleadem in #2958 (comment)

@github-actions github-actions bot added the Status: Triage We're triaging this issue and grooming if necessary label Nov 18, 2024
@amyleadem amyleadem changed the title USWDS-Site: Fix subnav type on Security page USWDS-Site: Fix "current" navigation on security updates Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage We're triaging this issue and grooming if necessary
Projects
Status: No status
Development

No branches or pull requests

1 participant