site-www
site-www copied to clipboard
add hyperlink hover buttons to h4 headings and/or add h4 headings to table of contents
Describe the problem
There are a number of h4 headers in the language tour that would be nice to be able to quickly link to, and easily share a relevant part of the documentation with someone.
For example the section on the initializer list is not in the table of contents, and in order to link to this part of the documentation I did the following:
- right click on the heading
- view page source
- look at what the specific id was for the heading in the html
- manually append this id to the url
I know I have personally done this process before, see: https://stackoverflow.com/a/70470066/3080848
I also know I am not the only person to do this, because I have seen others do it as well, for example: https://stackoverflow.com/a/70635785/3080848
Expected fix
Add links to the h4 subsections in the table of contents. And add the hyperlink buttons that show up when you hover over the headings (like with the h2 and h3 headings).
Additional context
No response
Thanks for the suggestion @mmcdon20!
I'm not sure about adding h4 headings to the TOC as I'm worried it may provide too much information and cause crowding, perhaps limiting the usefulness, especially to the right-side TOC. Perhaps @kwalrath can provide more thoughts there though.
As for adding the hyperlink hover buttons, I can definitely see that being useful, as we occasionally link to h4 headings as well within the docs. It seems this would at least solve the main example issue you raised here.
Thanks again! I'm curious to hear others' thoughts as well :)
As for adding the hyperlink hover buttons, I can definitely see that being useful, as we occasionally link to h4 headings as well within the docs. It seems this would at least solve the main example issue you raised here.
@parlough I would be satisfied even if you only did this.
I agree that hyperlink hover buttons would be really handy.
We considered adding h4s to the TOC, but it makes the TOC harder to scan (and space is limited), so we stuck to two levels.
Following up on Kathy's comment, we have also split the language tour into multiple pages based on this kind of feedback. Closing this issue.