-
Notifications
You must be signed in to change notification settings - Fork 191
Description
Hi, there is a UI bug in the Link of the component.
The problem
If the documentation contains multiple tabs with the same title, it links to the first instance
The biggest issue is confusion for the end-user when they click on a Tab to view it and view something else instead.
Example / Reproduction steps
I noticed this when I was using modelcontextprotocol.io (code at github.com/modelcontextprotocol/modelcontextprotocol)
On this page, https://modelcontextprotocol.io/docs/concepts/transports , You will find multiple usages of the <Tabs>
component. Out of these, 3 sets of have the exact 4 children titles, but different content.
- https://github.com/modelcontextprotocol/modelcontextprotocol/blob/58444cb7489de1ab3c6efd66311b8ea5fed560bd/docs/docs/concepts/transports.mdx?plain=1#L65
- https://github.com/modelcontextprotocol/modelcontextprotocol/blob/58444cb7489de1ab3c6efd66311b8ea5fed560bd/docs/docs/concepts/transports.mdx?plain=1#L152
- https://github.com/modelcontextprotocol/modelcontextprotocol/blob/58444cb7489de1ab3c6efd66311b8ea5fed560bd/docs/docs/concepts/transports.mdx?plain=1#L328
You click on any of the above 3 links (on the actual website link above), it takes you to the same first tab of "Typescript (Server)"
I get the simplicity of this design, but I think the Tab component can simply accept an optional id
property that explicitly sets the link for that Tab instance.
Lastly, I couldn't find a better place to open this issue, so if there is one that is more suitable than this one, please let me know, I will copy/paste this there.