Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tooltips to <Text truncate> elements #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WebFreak001
Copy link

@WebFreak001 WebFreak001 commented Dec 29, 2023

So that text can be fully read in small spaces anyway.

New truncateTooltip property can be used to control how the tooltip looks and if it should be shown at all.

Sample locations how this could look in cinny with slight modifications:

image

image

image

image

So that text can be fully read in small spaces anyway.

New `truncateTooltip` property can be used to control how the tooltip
looks and if it should be shown at all.
@WebFreak001 WebFreak001 changed the title Add tooltips to <Text truncate> elements feat: add tooltips to <Text truncate> elements Dec 29, 2023
@ajbura
Copy link
Member

ajbura commented Dec 30, 2023

Hey @WebFreak001 , folds provide basic atom components i.e a Text only care about text and a Tooltip only about provide UI for tooltip. Combining two atom component is anti pattern for this repo. If Cinny needs such functionality it can use folds Text and Tooltip components and make its own TextWithTooltip component.

@WebFreak001
Copy link
Author

truncated text should always have a way to show the full text somehow, as a basic accessibility feature. So I'd argue this is a part of a Text atom and makes sense this way.

The alternative would be generating a plain title, which isn't stylable and has some limitations such as not being able to show icons, etc.

@WebFreak001
Copy link
Author

bump

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