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

Add labels for debugging #4

Open
itsMapleLeaf opened this issue Mar 5, 2021 · 0 comments
Open

Add labels for debugging #4

itsMapleLeaf opened this issue Mar 5, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@itsMapleLeaf
Copy link
Contributor

Having the full class string on elements is usually fine, but since we're in compile land, some debugging labels would be really helpful. A few ways to accomplish this, in order of preference

  • A data attribute data-tw-component="FileName"
    Easiest way to go, keeps the class name logic as is with a completely additive attribute

  • Appending to the className tw-FileName bg-blue-500 text-white
    Also completely doable, might introduce some additional clutter on the class name though

  • Using labels + apply for everything
    I'm already iffy on using apply for everything, could introduce unnecessary overhead in the cases where apply is already being used. That, and the labels proposal hasn't happened yet, and changes in that will require changes in the transformer. In short, lack of stability here

Additionally, only do this in dev, and not in prod. Maybe make it configurable, but I don't see a need? Someone might have a problem with it at some point, so maybe

@itsMapleLeaf itsMapleLeaf added the enhancement New feature or request label Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant