Skip to content

Conversation

NWylynko
Copy link
Contributor

@NWylynko NWylynko commented Jul 10, 2025

Was blocked by https://github.com/clerk/clerk/pull/1359

🔎 Previews:

What does this solve?

Extracts

[Hover me](!ABC)

pulls the content from the _tooltips/ABC.mdx file,

and transforms it in to

<Tooltip>
  <TooltipTrigger>Hover me</TooltipTrigger>
  <TooltipContent>ABC</TooltipContent>
</Tooltip>

This is because mdx is weird and children props get treated differently to standard props. So to ensure that both the title text and the tooltip content are treated as mdx not just a string, we need to embed them in to there own children inside components.

Screenshot 2025-09-15 at 16 31 13

Checklist

  • I have clicked on "Files changed" and performed a thorough self-review
  • All existing checks pass

@NWylynko NWylynko requested a review from a team as a code owner July 10, 2025 04:30
Copy link

vercel bot commented Jul 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
clerk-docs Ready Ready Preview Sep 17, 2025 10:38am

@NWylynko NWylynko changed the base branch from main to nick/include-tooltips July 10, 2025 15:13
Base automatically changed from nick/include-tooltips to main July 10, 2025 17:02
@NWylynko NWylynko marked this pull request as ready for review July 24, 2025 16:57
@alexisintech
Copy link
Member

alexisintech commented Sep 11, 2025

I'm thinking we should the change the syntax from
Hover me

to

Hover me

and then the logic will understand that the ! means to look in the _tooltips folder and find the file that is named ABC.mdx

what are your thoughts on this syntax? also, this is something I can try work on! or maybe we can pair :)

Copy link
Member

@alexisintech alexisintech left a comment

Choose a reason for hiding this comment

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

if there are links in a tooltip, does the link checker accommodate those?

@NWylynko
Copy link
Contributor Author

if there are links in a tooltip, does the link checker accommodate those?

I'll have to check, I'll add a test, I hope its yes, my hunch is no.

@alexisintech alexisintech merged commit d18b363 into main Sep 17, 2025
8 checks passed
@alexisintech alexisintech deleted the nick/embed-tooltips branch September 17, 2025 20:07
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.

2 participants