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

Restructure DS website's information architecture #656

Merged
merged 9 commits into from
Jun 23, 2020
Merged

Restructure DS website's information architecture #656

merged 9 commits into from
Jun 23, 2020

Conversation

contolini
Copy link
Member

@contolini contolini commented Jun 22, 2020

This PR restructures the site's navigation and moves every page into its new category. There's no longer a nav in the header, it's all in the sidebar now. It's also editable via the CMS to let users place pages exactly where they want instead of everything getting listed alphabetically.

We used to have a netlify cms collection for every category but IMHO that's silly so I deleted them all and created a new collection called pages that houses every page.

Changes

  • Removes main nav and moves all nav elements to left-hand sidebar.
  • Adds a side nav data file that is editable via the CMS and generates the left-hand sidebar.
  • Adds a netlify cms collection called "Navigation" for the aforementioned new side nav data file.
  • Removes the four netlify cms collections that were identical and replaces them with a single one called "Pages". Accordingly, I moved all website pages into a folder called pages/.
  • Moves special pages like the homepage and the help page to a new collection called "Special pages".
  • Updated the "Updating this website" page with instructions on how to update stuff.
  • Removed the "Add new page button" and replaced it with a link in the footer.
  • Updates tests and Jekyll/netlify metadata files as appropriate

Testing

  1. yarn test:browser should pass
  2. Click around the PR preview link below and see how you feel about the new all-inclusive side nav.
  3. Go to the "Updating this website" page by clicking the link in the footer and peruse the instructions for creating new pages and editing the side nav. Note: If you try and edit the side nav in the CMS on the PR preview website, it will be blank in the CMS because the side-navigation.yml file doesn't exist in this repo's master branch. You can run the site locally to preview it.

Screenshots

new side nav editing side nav in CMS new footer links
screenshot screenshot screenshot

Notes

Todos

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows the standards laid out in the CFPB development guidelines
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Visually tested in supported browsers and devices (see checklist below 👇)
  • Project documentation has been updated
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist

Browsers

  • Chrome on desktop
  • Firefox
  • Safari on macOS
  • Edge
  • Internet Explorer 9, 10, and 11
  • Safari on iOS
  • Chrome on Android

Accessibility

  • Keyboard friendly
  • Screen reader friendly

Other

  • Is useable without CSS
  • Is useable without JS
  • Flexible from small to large screens
  • No linting errors or warnings
  • JavaScript tests are passing

- Removes main nav and moves all nav elements to left-hand sidebar
- Changes nav categories
- Removes four netlify cms collections that were based on categories
  and replaces them with a single one called "Pages"
- Adds a netlify cms collection called "Navigation" that lets users
  edit the side nav
- Moves special pages like the homepage and the help page to a new
  collection called "Special pages"
- Updates tests and Jekyll/netlify metadata files as appropriate

https://GHE/CFPB/el-camino/issues/251
@contolini
Copy link
Member Author

I moved all the pages to a new folder so before merging this PR I'll manually remediate recent content conflicts.

@netlify
Copy link

netlify bot commented Jun 22, 2020

View a preview of the Design System website with your changes using the following link.

Built with commit 31d59ab

https://deploy-preview-656--cfpb-design-system.netlify.app

Copy link
Member

@anselmbradford anselmbradford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update m-list_item__tertiary and fix the empty unordered list it sometimes contains.

A few more general thoughts for beyond this PR probably:

  • What if we put the sidenav on all pages, including the homepage? If not, why not?
  • What if when you hovered over the sidenav it showed a little pencil icon like the edit this page buttton, and when you clicked that icon it brought you to the edit sidenav page?

docs/_includes/footer.html Outdated Show resolved Hide resolved
docs/_includes/sidebar.html Outdated Show resolved Hide resolved
docs/_includes/sidebar.html Outdated Show resolved Hide resolved
@contolini
Copy link
Member Author

* What if we put the sidenav on all pages, including the homepage? If not, why not?
* What if when you hovered over the sidenav it showed a little pencil icon like the edit this page buttton, and when you clicked that icon it brought you to the edit sidenav page?

🤯 🤯 🤯

It's very, very difficult to check a string for emptiness with Liquid.

Shopify/liquid#223 (comment)
Otherwise there's a space between the last word and the final period.
I could just put the last anchor tag on its own line but I don't want to
alienate it and make it feel uncomfortable.
@contolini
Copy link
Member Author

Thanks @anselmbradford. I fixed things and added the side nav to the homepage. Adding an edit button to the side nav is a great idea but beyond the scope of this PR.

@contolini contolini merged commit 243fe67 into master Jun 23, 2020
@contolini contolini deleted the new-ia branch June 23, 2020 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants