[BUG] If multiple Different Tabs have the same title, the link redirects to the first one
Hi, there is a UI bug in the Link of the <Tabs> 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 <Tabs> 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.
Hi @sankalpmukim, thanks for creating this issue and documenting the bug so well. I'm passing this along to our engineering team to investigate.
No need to copy this over, but if you notice any future bugs we collect them in our community discussions.
Thanks for helping improve Mintlify and sharing this feedback!