18F / development-guide

A set of guidelines and best practices for an awesome software engineering team
https://engineering.18f.gov
Other
1.25k stars 122 forks source link

Add name of sections so correct main nav is active #236

Closed Sgtpluck closed 3 years ago

Sgtpluck commented 3 years ago

This addresses #198.

Adding an explicit name to the primary nav made it possible to create an "active"[ conditional based on the subnav name. definitely open to other ways of doing this!

i also cleaned up some orphaned pages, and added the sidebar subnav to some topics that were linked to but weren't directly on a page.

i also got rid of a reference to the cloud.gov postmortem repo which either no longer exists or not everyone has access to it.

ryanhofdotgov commented 3 years ago

@Sgtpluck I'll have some time to take a look at this in detail later this week, but saw that some of the changes were to the "protected" files for the upstream template, so those would be the natural place for those, if not in uswds-jekyll directly as appropriate. Basically anything outside of _guide will fall in that category.

I'm planning to retire that meta-template (it didn't get any uptake outside of this guide) but until then, those types of changes would be best made there until this guide gets un-entangled from that template.

IIRC, the header in the isildurs-bane template derived from the UX-guide which forked from uswds-jekyll, so it's been a long term goal to fold those changes back into uswds-jekyll. Here's an example of that: https://github.com/18F/isildurs-bane/issues/18

Sgtpluck commented 3 years ago

@ryanhofdotgov i can make the change upstream; it won't solve the isildurs-bane issue directly though, since the app-specific subnav names will have to be added to each individual repo using it, but i guess it won't be much more broken, and i can add some documentation to that effect. (Eng hiring was using it, but i remember there was that issue with the daily sync so i don't know if that's a concern.)

if i change it at the uswds-jekyll level that means it'll have to be an OR operation (rather than replacing the current conditional) since i wouldn't want to break sites that are currently working by forcing them to add a name key. (which is probably fine, just will look a bit messier)

thoughts?

ryanhofdotgov commented 3 years ago

🤔  I may have to address #239 before any changes outside of _guide will stick. IIRC, the GitHub action will just restore template "owned" files on a daily basis.

Sgtpluck commented 3 years ago

thanks @ryanhofdotgov -- i will hold off on this change until your changes go through, it'll require a rebase. 😬