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

Fix: Tooltip positions #235

Merged
merged 1 commit into from
Oct 31, 2022
Merged

Fix: Tooltip positions #235

merged 1 commit into from
Oct 31, 2022

Conversation

Pr0dt0s
Copy link
Contributor

@Pr0dt0s Pr0dt0s commented Oct 18, 2022

Replaced the string interpolation so that tailwind can capture the classnames correctly, fixes #234

Replaced the string interpolation so that tailwind
can capture the classnames correctly
@netlify
Copy link

netlify bot commented Oct 18, 2022

Deploy Preview for react-daisyui ready!

Name Link
🔨 Latest commit 0bc08ab
🔍 Latest deploy log https://app.netlify.com/sites/react-daisyui/deploys/634e0adc81b6fc0008bb845c
😎 Deploy Preview https://deploy-preview-235--react-daisyui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@Klaas058
Copy link
Contributor

Hi @Pr0dt0s, thank you for the PR.

I've tested your fix locally and it works.
Also found out that my testing mentioned in #234 was flawed because I didn't restart my next app after rebuilding react-daisyui.

But I don't know if this is the fix for us.
I did some testing and in my testing when I upgraded the tailwind-merge dev dependency package from ^1.2.0 to ^1.6.2 the latest, the string interpolation does work.

Can you test/confirm this?

@benjitrosch
Copy link
Collaborator

Like @Klaas058 said, if updating tailwind-merge fixes this, then that would be preferable.

@daisyui daisyui deleted a comment from netlify bot Oct 22, 2022
@daisyui daisyui deleted a comment from netlify bot Oct 22, 2022
@Klaas058
Copy link
Contributor

I don't know what I did in my testing to get a false positive but upgrading tailwind-merge does not fix the issue.

This solution looks acceptable for now.
Though if anyone knows why some string interpolated cases do work and others don't, please share it :)

@Pr0dt0s
Copy link
Contributor Author

Pr0dt0s commented Oct 29, 2022

Hey @Klaas058, yeah I coudn´t understand how updating a run time library would affect tailwind´s compile time process. And I still dont know why other interpolations work, like tooltip-${color} in this very same component, my guess is that tailwind is picking those classnames up somewhere in the daisyui files and not in react-daisyui, but I havent had the time to try and pinpoint their location.

Note. Not all of the other class string interpolations work.

Copy link
Collaborator

@benjitrosch benjitrosch left a comment

Choose a reason for hiding this comment

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

Approved for now so we can release a fix, but hopefully we can revisit string interpolation in the future. Thanks for finding this @Pr0dt0s!

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.

Tooltip positional classes not working
3 participants