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

feat(docs): add header links #2882

Merged
merged 2 commits into from
Sep 24, 2024
Merged

feat(docs): add header links #2882

merged 2 commits into from
Sep 24, 2024

Conversation

BlairCurrey
Copy link
Contributor

Changes proposed in this pull request

  • adds header links to docs headings. makes it easier to get link to specific sections by clicking on it (currently have to manually form the url). Style should be unchanged, other than underlining on hover.
Screen.Recording.2024-08-22.at.12.43.38.AM.mov

Context

I wanted to link to a specific section and found it annoying to do so without this.

Checklist

  • Related issues linked using fixes #number
  • Tests added/updated
  • Documentation added
  • Make sure that all checks pass
  • Bruno collection updated

@github-actions github-actions bot added the pkg: documentation Changes in the documentation package. label Aug 22, 2024
Copy link

netlify bot commented Aug 22, 2024

Deploy Preview for brilliant-pasca-3e80ec ready!

Name Link
🔨 Latest commit cae2974
🔍 Latest deploy log https://app.netlify.com/sites/brilliant-pasca-3e80ec/deploys/66e988c670762d0008dd24bb
😎 Deploy Preview https://deploy-preview-2882--brilliant-pasca-3e80ec.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 configuration.

@JoblersTune
Copy link
Collaborator

@blair, thanks. I'm gonna wait for the doc updates to be in before addressing this because all our links are changing. But it's a good suggestion. So I'll pick it up when our new docs structure is good to go.

@JoblersTune JoblersTune added the do not merge Do not merge PRs with these label label Aug 26, 2024
@melissahenderson
Copy link
Contributor

@BlairCurrey @JoblersTune Exchange rates, webhook, fees, IdP... these all have their own page in the new doc structure. We might not need this issue, but def leave it open until the new structure is live just in case.

@JoblersTune
Copy link
Collaborator

@BlairCurrey @JoblersTune Exchange rates, webhook, fees, IdP... these all have their own page in the new doc structure. We might not need this issue, but def leave it open until the new structure is live just in case.

@melissahenderson I believe this is less about any specific item and more about an approach. I think what Blair is suggesting here is that we should make it easy to link directly to any heading on a page, not just the page itself. Once the docs are updated I'm happy to dive in and check it out.

@mkurapov
Copy link
Contributor

@melissahenderson @BlairCurrey @JoblersTune

Should we add this to the new set of docs?

@melissahenderson
Copy link
Contributor

Was the issue originally because the page was in mobile view, so the page's table of contents didn't appear on the right side of the screen?

Screenshot 2024-09-13 at 12 38 17 PM

@BlairCurrey Would you have had this issue if the page's table of contents was more apparent?

Screenshot 2024-09-13 at 12 41 44 PM

@JoblersTune JoblersTune removed the do not merge Do not merge PRs with these label label Sep 16, 2024
@JoblersTune
Copy link
Collaborator

I'm gonna take a proper look at this today

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for this @BlairCurrey. It's great. Can we maybe just edit the styling a bit because otherwise we have an underline on top of our highlight underlines and it looks odd.

How about this instead?

/* Heading styles */
.sl-markdown-content :is(h1, h2, h3, h4, h5, h6) > a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.sl-markdown-content :is(h1, h2, h3, h4, h5, h6) > a:hover {
  color: var(--sl-color-accent-high);
}

Copy link
Contributor Author

@BlairCurrey BlairCurrey Sep 17, 2024

Choose a reason for hiding this comment

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

makes sense. updated.

@BlairCurrey
Copy link
Contributor Author

BlairCurrey commented Sep 17, 2024

Was the issue originally because the page was in mobile view, so the page's table of contents didn't appear on the right side of the screen?

@melissahenderson I do not recall if I was in mobile view (or just smaller viewport on desktop).

I didn't think to use the outline in any case. And actually in a smaller viewport I didn't realize where it was. I see how the outline can be used to the same effect. Personally I'm just used to the convention of the headers being links - it feels like a more direct way to get the link when reading/scanning the document.

@JoblersTune
Copy link
Collaborator

Great, thanks.

Any idea why the auth tests are failing?

@BlairCurrey
Copy link
Contributor Author

Great, thanks.

Any idea why the auth tests are failing?

Something intermittent... tests timed out for some reason. Fine now after re-running.

@BlairCurrey BlairCurrey merged commit 00e9bb3 into main Sep 24, 2024
30 of 42 checks passed
@BlairCurrey BlairCurrey deleted the bc/docs-add-header-links branch September 24, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: documentation Changes in the documentation package.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants