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

chore: clean up pagination and sidebar navigation #1020

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

Conversation

holdenhewett
Copy link

@holdenhewett holdenhewett commented Nov 1, 2024

Issue

While browsing the docs I noticed the pagination functionality wasn't working exactly how I thought it should be on some pages. Specifically, on the API Gateway page, I noticed the pagination_next button skipped over the child page Get started - Deliver and secure APIs in production and went directly to the Device Gateway Overview page instead.

This presents an accessibility issue for those that use assistive technology to read the docs—especially screen readers and keyboard navigation—where those users may not visually see that the pagination buttons aren't taking them to the actual next page of a particular section.

I dove into the code a bit and saw in the sidebars.js#L427-L44 file that the guides/ directory is set to autogenerated, meaning the hard-coded pagination_prev and pagination_next values are unnecessary on all pages in the guides/ directory.

While I was there, I noticed some of the sidebar_position values were not in the proper sequential order, so I updated those, too.

Action taken

  • Removed pagination_prev and pagination_next values on all pages in the guides/ directory
  • On integrations/index, updated pagination_next from null to integrations/1password/index
  • On network-edge/index, updated pagination_next from domains-and-tcp-addresses to network-edge/cloud-endpoints
  • Nit: Updated the sequential order of the sidebar_position values for all pages in the guides/ directory.

Result

All the pages in the guides/ directory, the integrations/index page, and the network-edge/index page now have the expected flow for their pagination buttons.

This also improves the accessibility of the docs for those using assistive technology, as the pages now go to the actual next page in the docs instead of skipping over content.

Testing and validation

I tested changes while using a local dev server using pnpm run start.

I verified the changes built successfully by running pnpm run build.

All changes were made on a WSL2 Ubuntu instance on Win11.

Copy link

vercel bot commented Nov 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ngrok-docs ✅ Ready (Inspect) Visit Preview Nov 5, 2024 5:19am

@joelhans
Copy link
Contributor

joelhans commented Nov 4, 2024

Thanks for this, @holdenhewett! We recently pushed a major architectural shift to the guides, so it's not surprising that things aren't perfectly aligned any more.

I'm happy to review this, but @DevMandy is the functional owner of the guides section, so I'd like her to have eyes on this too.

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