tailwindcss-nova-ext icon indicating copy to clipboard operation
tailwindcss-nova-ext copied to clipboard

Tailwind completions differ between HTML class attributes and ERB class hash keys

Open jeffreymorganio opened this issue 3 years ago • 2 comments

Hi,

Great extension! Thank you 😊

I've noticed that the Tailwind CSS completions for text- and bg- are quite different when completing classes in an ERB class hash key than they are when completing classes in an HTML element class attribute.

In this screenshot (using the index.html.erb file in the extension's Sample Files folder), the completions for bg-gray are what I would expect:

Screenshot 2022-07-31 at 12 42 47

However, in this screenshot, the completions don't seem to have any particular order and don't list the bg-gray completions first:

Screenshot 2022-07-31 at 12 43 20

Another example is completing m-. Completions are shown for m and for m- when completing in an HTML class attribute:

Screenshot 2022-07-31 at 13 01 44

When completing m- in an ERB class hash key, the completions are shown for m:

Screenshot 2022-07-31 at 13 02 06

but disappear for m-:

Screenshot 2022-07-31 at 13 02 19

Just wondering if this behaviour is a bug or if there is some reason for it?

I'm using Nova 9.4 with version 4.3 of the extension.

jeffreymorganio avatar Jul 31 '22 12:07 jeffreymorganio

This is the same with blade files. for time being I would suggest not using the dash - in your fuzzy search only alphanumeric . I have been using this workaround myself until it gets sorted 👀

EmranMR avatar Jan 26 '23 21:01 EmranMR

Your welcome @jeffreymorganio! I'm happy to hear you are finding the extension useful and I apologize for taking so long to respond.

This is likely related to issue #35. I haven't had time to research how this extension may benefit from recent changes Panic has made to parsing files in Nova. As soon as I have some free time to work on this, I will try to push an update addressing these issues.

Thanks again!

jasonplatts avatar Feb 08 '23 16:02 jasonplatts