base-ui icon indicating copy to clipboard operation
base-ui copied to clipboard

[docs] Headings should be linkable

Open atomiks opened this issue 11 months ago • 5 comments

Docs feedback

It's not possible to click headings to link to subsections of a page. Headings should have <a> tags around them with id hashes.

atomiks avatar Dec 19 '24 10:12 atomiks

You can click the quick nav link

colmtuite avatar Dec 19 '24 11:12 colmtuite

You can click the quick nav link

I forgot that was possible, doesn't seem easily discoverable + doesn't work on narrow viewports/mobile?

atomiks avatar Dec 19 '24 11:12 atomiks

Still feel like the headers should be linkable IMO, also, would be fairly easy to add no? I could make a quick PR for it

imMatheus avatar Dec 19 '24 15:12 imMatheus

I noticed this and forgot to mention it. The most common use-case for me is to click on the header and share a link with someone. I am already looking at the title, finding it again in the table of content seems like an overkill.

mnajdova avatar Dec 19 '24 18:12 mnajdova

The most common use-case for me is to click on the header and share a link with someone

This is also a big use-case for me, e.g. adding links to GH comments while doing support on-the-go

I think API docs generally have this, examples of some docs I looked at recently:

Radix docs:

https://github.com/user-attachments/assets/45611ec1-8910-4218-8ae2-1fc7e6d84de4

Ariakit docs:

The subcomponents in the anatomy are links so that counts? I like that individual props are linkable too

https://github.com/user-attachments/assets/10ba19db-e943-4c0d-ac95-1c0b614444c3

RA docs:

The links exist but they are invisible on mobile...

https://github.com/user-attachments/assets/a693b71a-dab0-44e6-91f5-6fce3d80a08b

Fastify:

https://github.com/user-attachments/assets/755cade7-9f7c-4292-a576-15ba971a8201

mj12albert avatar Jan 08 '25 08:01 mj12albert