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

@headlessui/tailwindcss does not work with latest version 1.6.7 #1825

Closed
bodograumann opened this issue Sep 6, 2022 · 5 comments
Closed

Comments

@bodograumann
Copy link

I am using @headlessui/vue@1.6.7 and @headlessui/tailwindcss@0.1.0

In that version the code that adds the data-headlessui-state attribute to the dom is commented out:
https://github.com/tailwindlabs/headlessui/blame/0bdd4b472e6b8f2af092f0a839d00b9077bfb923/packages/@headlessui-vue/src/utils/render.ts#L95-L108

(I checked and it is the same for @headlessui/react@1.6.7)

So the variants generated by the tailwindcss plugin are not applied. :-( Took me quite a while to find this out.

Was that done on purpose? In that case a big fat warning should be displayed in the readme.

@RobinMalfait
Copy link
Collaborator

RobinMalfait commented Sep 6, 2022

Hey! Thank you for your question!
Much appreciated! 🙏

This is because we didn't release the feature yet. We did release the @headlessui/tailwindcss package, but never documented nor let the people know about it (via Twitter, release notes, ...) so from that perspective it's not officially released yet.

If this code used to work before for you, then the only reason why it worked is because you probably used the insiders build before, where it is available.

As the readme states: https://github.com/tailwindlabs/headlessui#installing-the-insiders-version

Note: The insiders build doesn't follow semver and therefore doesn't guarantee that the APIs will be the same once they are released.

So I don't think a "big fat warning" should be necessary here, for an unreleased feature that is not available yet.

The reason we commented that code out is because we already implemented it but weren't ready for a 1.7 release yet and wanted to get some bugfixes out (e.g.: 1.6.3 — 1.6.7). The code never worked in any of the released versions, hence why this is not a breaking change at all.

If you want to be sure about what is released and what isn't, then you can checkout the releases on GitHub or look at the CHANGELOG file.

Fwiw, we are currently working on the documentation related to this and will be releasing Headless UI v1.7 this week.

@bodograumann
Copy link
Author

Thank you for taking the time to give such an extensive answer.

I could have sworn, I had read some blog post about the new feature, but cannot find that now.
Maybe it was only the GitHub release of @headlessui/tailwindcss@0.1.0 and the respective PR.
Anyway I still think a note in the package’s readme, that it requires a certain unreleased peer dependency, should have been included. Not sure how I could have known otherwise.

Looking forward to 1.7 then.

@aariacarterweir
Copy link

It's literally documented as being available:
https://headlessui.com/react/popover
Screen Shot 2022-09-07 at 3 26 16 pm

@RobinMalfait
Copy link
Collaborator

Hey! This is now documented because we released v1.7 and updated docs yesterday, after the original question was posted 👍

@aariacarterweir
Copy link

aariacarterweir commented Sep 7, 2022 via email

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

No branches or pull requests

3 participants