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

Improve the table-of-contents #1057

Merged
merged 3 commits into from Aug 15, 2022

Conversation

wallrj
Copy link
Member

@wallrj wallrj commented Aug 13, 2022

Preview: https://deploy-preview-1057--cert-manager-website.netlify.app/docs/tutorials/getting-started-with-cert-manager-on-google-kubernetes-engine-using-lets-encrypt-for-ingress-ssl/

  • Made it so that the TOC items do not wrap and overflow the container column (which I think looks neater, given that the right hand column is so narrow).
  • Made it possible to filter out the headings above level 2 (including the level-3 headings made the menu look too noisy)
  • Removed some (I think) unnecessary HTML wrapper elements and CSS classes.

New:
image

Current:
image

/cc @PatrickHeneise

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
@jetstack-bot
Copy link
Contributor

@wallrj: GitHub didn't allow me to request PR reviews from the following users: PatrickHeneise.

Note that only cert-manager members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

  • Made it so that the TOC items do not wrap and overflow the container column (which I think looks neater, given that the right hand column is so narrow).
  • Made it possible to filter out the headings above level 2 (including the level-3 headings made the menu look too noisy)
  • Removed some (I think) unnecessary HTML wrapper elements and CSS classes.

image

/cc @PatrickHeneise

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jetstack-bot jetstack-bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 13, 2022
@netlify
Copy link

netlify bot commented Aug 13, 2022

Deploy Preview for cert-manager-website ready!

Name Link
🔨 Latest commit 8af8906
🔍 Latest deploy log https://app.netlify.com/sites/cert-manager-website/deploys/62f7d059443e780008c563ab
😎 Deploy Preview https://deploy-preview-1057--cert-manager-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@wallrj wallrj requested a review from SgtCoDFish August 15, 2022 08:23
@wallrj
Copy link
Member Author

wallrj commented Aug 15, 2022

I'm also inclined to remove the react-scroll component, since it doesn't seem to work properly anyway: wallrj/website@toc-improvements...wallrj:website:remove-react-scroll

  • Doesn't currently hightlight the in-view section, because we don't set the active-class
  • Even then, it doesn't highlight the heading consistently as you scroll up and down
  • The back - forward button navigation doesn't always seem to work.

I can remove it in a followup PR if others agree.
Or replace it with something simpler which does at least reliably highlight the TOC entry for the in-view section. Maybe https://github.com/makotot/GhostUI

@SgtCoDFish SgtCoDFish removed their request for review August 15, 2022 08:57
@SgtCoDFish
Copy link
Member

I don't currently have the bandwidth to review cert-manager PRs, sorry. I've removed myself as a reviewer 👍

@wallrj wallrj requested a review from jahrlin August 15, 2022 08:58
@jahrlin
Copy link
Contributor

jahrlin commented Aug 15, 2022

I'm also inclined to remove the react-scroll component, since it doesn't seem to work properly anyway: wallrj/website@toc-improvements...wallrj:website:remove-react-scroll

  • Doesn't currently hightlight the in-view section, because we don't set the active-class
  • Even then, it doesn't highlight the heading consistently as you scroll up and down
  • The back - forward button navigation doesn't always seem to work.

I can remove it in a followup PR if others agree. Or replace it with something simpler which does at least reliably highlight the TOC entry for the in-view section. Maybe https://github.com/makotot/GhostUI

I'm a big +1 to remove it, stuff like that interferes with native behaviour and is an accessibility problem.

Copy link
Contributor

@jahrlin jahrlin left a comment

Choose a reason for hiding this comment

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

Nice, this is great. Tested in a few different viewports and I really like it.

Much cleaner visually and much cleaner code.

/lgtm
/approve

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 15, 2022
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jahrlin, wallrj

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot merged commit 6852e75 into cert-manager:master Aug 15, 2022
@wallrj wallrj deleted the toc-improvements branch August 15, 2022 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants