Skip to content

Add expanded boolean attribute to tailwind plugin #7152

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

Merged
merged 9 commits into from
Oct 15, 2024

Conversation

neefrehman
Copy link
Contributor

After testing out the new Disclosure components, I see that the tailwind plugin does not support styling the expanded state, leaving me to style using data-[expanded]. This PR adds expanded top the list of boolean states.

Closes

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

After testing out the new `Disclosure` components, I see that the tailwind plugin does not support styling the `expanded` state, leaving me to style using `data-[expanded]`. This PR adds `expanded` top the list of boolean states.
Copy link
Member

@reidbarber reidbarber 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 adding this!

You'll need to sign the CLA and close/re-open this for the build to pass.

Also, it would be great if you could add this to the snapshot tests at packages/tailwindcss-react-aria-components/src/index.test.js. If you're having issues with that then no worries, we can add it. Beat me to it :)

@neefrehman neefrehman closed this Oct 7, 2024
@neefrehman neefrehman reopened this Oct 7, 2024
@neefrehman
Copy link
Contributor Author

@reidbarber thanks! Just done those

@neefrehman neefrehman marked this pull request as ready for review October 7, 2024 17:05
@neefrehman neefrehman requested a review from reidbarber October 7, 2024 17:05
@neefrehman
Copy link
Contributor Author

Actually @reidbarber I think I'll need some help with the tests after all, if thats ok? I'm not fully understanding the failures

@reidbarber
Copy link
Member

@neefrehman I'll take a closer look. The tests seem to pass for me locally. It's likely a whitespace issue or something similar.

Copy link
Member

@reidbarber reidbarber left a comment

Choose a reason for hiding this comment

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

Should be a quick fix

@neefrehman neefrehman requested a review from reidbarber October 12, 2024 09:07
Copy link
Member

@reidbarber reidbarber left a comment

Choose a reason for hiding this comment

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

Thanks!!

@reidbarber reidbarber added this pull request to the merge queue Oct 15, 2024
Merged via the queue into adobe:main with commit e22e960 Oct 15, 2024
29 checks passed
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.

3 participants