Skip to content

Fix code examples for ToolTip component#275

Open
devmount wants to merge 1 commit into
mainfrom
bugs/268-fix-code-examples-for-tool-tip
Open

Fix code examples for ToolTip component#275
devmount wants to merge 1 commit into
mainfrom
bugs/268-fix-code-examples-for-tool-tip

Conversation

@devmount
Copy link
Copy Markdown
Collaborator

@devmount devmount commented May 11, 2026

What changed?

This change improves the demo code examples and enhances the stories for the ToolTip component. Stories are now grouped by slot or property. Component names and HTML attributes are now in dash-case. Reactivity for the default story is kept intact.

Why?

More organized and consistent documentation.

Limitations and Notes

None.

Applicable Issues

Closes #268

Screenshots

This reorganizes stories from this:

image

to this:

image

@devmount devmount self-assigned this May 11, 2026
Copy link
Copy Markdown
Contributor

@davinotdavid davinotdavid left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the code examples, looks great so far!

I have a request for this one if that's ok: I think it would be great to have story (or stories) to showcase the tooltip in context (e.g. while hovering a button or an icon).

I know it is not part of the original issue created but since we are touching these stories though so feel free to push back / punt it into a different issue

@devmount
Copy link
Copy Markdown
Collaborator Author

@davinotdavid That's a great suggestion! I will add a story for contextual usage in this PR.

In general I'm not too happy with our ToolTip implementation. I feel like it would be much more intuitive, if the default slot would contain the element, the Tooltip is shown for...

@davinotdavid
Copy link
Copy Markdown
Contributor

@devmount agreed, every time I use it I struggle a bit to get it going so we could definitely improve it in the future!

@devmount
Copy link
Copy Markdown
Collaborator Author

Thanks for confirming this, Davi! I'll cut a ticket for restructuring the component (breaking change) and just add stories for the current usage for now.

@MelissaAutumn
Copy link
Copy Markdown
Member

Thanks for confirming this, Davi! I'll cut a ticket for restructuring the component (breaking change) and just add stories for the current usage for now.

We should maybe model this off of the label element. There's also some light accessibility issues with tool-tip so would be nice to see it restructured in the future. 😄

Copy link
Copy Markdown
Member

@MelissaAutumn MelissaAutumn left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

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.

Fix code examples for ToolTip component

3 participants