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

Different outcomes: format on save and format entire workspace #178

Open
ManuelLeiner opened this issue Dec 15, 2021 · 1 comment
Open

Comments

@ManuelLeiner
Copy link

ManuelLeiner commented Dec 15, 2021

Describe the bug
Sorting the classes of the entire workspace and sorting the classes of a single file (either format on save or command) result in different outcome.

To Reproduce
Steps to reproduce the behavior:

  1. Open command palette and sort entire workspace
    image
  2. Check files for any changes. A small number of our components are now changed.
  3. For example, the classes of our button component gets sorted
    Original: class="inline-flex items-center tracking-wider transition border border-transparent rounded-lg focus:outline-none focus:ring disabled:opacity-25"
    Change: class="inline-flex items-center tracking-wider border border-transparent rounded-lg transition focus:outline-none focus:ring disabled:opacity-25"
  4. Now either format on save or use the other command
    image
  5. The file has been sorted again and is back to the original
    Original: class="inline-flex items-center tracking-wider transition border border-transparent rounded-lg focus:outline-none focus:ring disabled:opacity-25"
  6. The button is no longer marked as changed

Other example:
Format entire workspace:
<div class="py-1 mb-2 text-xs font-bold rounded grid grid-cols-12 bg-grey-300 gap-x-4 text-grey-700" >
Format on save:
<div class="grid grid-cols-12 py-1 mb-2 text-xs font-bold rounded bg-grey-300 gap-x-4 text-grey-700" >

Expected behavior
Both ways of sorting behave the same and do not cancel each other out.

Screenshots
I removed all code from our button but the following and the problem still occurs

Format entire workspace:
image

image

image

image

... and many more

Format on save:
All files will be reverted to the original.

Desktop (please complete the following information):

  • OS: macOS Monterey 12.1
  • Browser: Chrome
  • Version 96.0.4664.110 (Official Build) (x86_64)
@pelletencate
Copy link

I believe this is a known issue. The packaged version of Rustywind is v0.7.1, but Headwind's own implementation matches the behavior of Rustywind v0.6.7 (which I found out the hard way: by testing them all.)

I've manually installed Rustywind v0.6.7 and use it from the command line instead of relying on the one shipped with Headwind.

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

2 participants