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

Documentation: introduce clickable copy to clipboard headers for all pages and a hx-tags #729

Merged
merged 19 commits into from
Sep 9, 2023

Conversation

jheinath
Copy link
Contributor

@jheinath jheinath commented Aug 26, 2023

Hey there,

related to issue #469 a small PR to implement the feature for the complete documentation:

Index page now looks like this.

image

When clicking on a h1 to h4 this small tooltip is shown for 1 sec.

image

The url to the specific hx is then copied to the clipboard. When entering the url in the browser the page is shown and in case of a copied link from a h2-h4 its scrolled to that header.

image

The same applies to all posts/pages.

Please kindly take a look and give your feedback! Thanks!

BR
Julian

@jheinath jheinath closed this Aug 26, 2023
@jheinath jheinath reopened this Aug 26, 2023
Copy link
Member

@dtchepak dtchepak left a comment

Choose a reason for hiding this comment

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

This is really cool! Thanks so much for taking the time to do this! I've left a question on whether we can avoid having to make the markdown changes and just leave the style.css and script changes.

The build error is due to a change in build environments that should be fixed if you rebase on to main.

docs/help/_posts/2010-01-01-getting-started.markdown Outdated Show resolved Hide resolved
@jheinath jheinath requested a review from dtchepak August 28, 2023 12:42
docs/index.md Outdated Show resolved Hide resolved
@dtchepak
Copy link
Member

dtchepak commented Sep 3, 2023

Looking really good, thanks! Just a minor typo then I'll squash and merge 👍

Copy link
Member

@dtchepak dtchepak left a comment

Choose a reason for hiding this comment

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

Thanks for this!

@dtchepak dtchepak merged commit 0a223b9 into nsubstitute:main Sep 9, 2023
1 check passed
dtchepak added a commit to dtchepak/NSubstitute that referenced this pull request Sep 9, 2023
@dtchepak
Copy link
Member

dtchepak commented Sep 11, 2023

@jheinath This change is now live! Thanks for the contribution! ❤️

I have a feature request if you get time to look at it: clicking the headings auto-copies to clipboard, but if people don't have a clipboard manager this might wipe out something they wanted to keep. It might be handy to have a "copy to clipboard" link appear on hover that will do this, otherwise just clicking the heading to jump to the anchor is probably sufficient (people can copy the url from the address bar).

@jheinath jheinath deleted the nsub-docs-urls-to-clipboard branch September 11, 2023 15:27
@jheinath
Copy link
Contributor Author

@dtchepak your welcome!

I will have a look into it and open another PR.

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.

None yet

2 participants