IntellijAlpine icon indicating copy to clipboard operation
IntellijAlpine copied to clipboard

using x-transition to apply CSS classes causes errors to be displayed in IDE

Open geoffbeier opened this issue 1 year ago • 5 comments

When I use x-transition:enter and friends to apply CSS classes, as described by the transition documentation:

            <div x-show="dropdownOpen"
                 class="absolute right-0 z-10 mt-12 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="profile-menu-button" tabindex="-1"
                 x-transition:enter="transition ease-out duration-100"
                 x-transition:enter-start="transform opacity-0 scale-95"
                 x-transition:enter-end="transform opacity-100 scale-100"
                 x-transition:leave="transition ease-in duration-75"
                 x-transition:leave-start="transform opacity-100 scale-100"
                 x-transition:leave-end="transform opacity-0 scale-95"
            >

the IDE gives me error messages saying:

Namespace 'x-transition' is not bound

for each instance of x-transition. These attributes work as expected when I view my site in a browser.

geoffbeier avatar Jul 19 '23 22:07 geoffbeier

Odd. When I paste that into my editor and hover over the x-transition line, I see XML Namespace Prefix "Alpine.js" and don't get any errors. Could it be that some other plugin you have installed is trying to hook into XML prefixes, too, and is causing it to not register?

inxilpro avatar Aug 15 '23 15:08 inxilpro

That seemed plausible, given that this is a django project and pycharm bundles extensions that inspect and offer completions for django's templates (which use the .html extension also). But I tested in a static HTML file that doesn't use any django templating at all:

CleanShot 2023-08-25 at 14 14 02@2x

and see the same thing. Oddly, it autocompletes these attributes even as it flags errors.

The only non-bundled extensions I'm using are:

  • Alpine.js support
  • CSV editor
  • Dash
  • IdeaVim
  • Monokai Pro Theme

geoffbeier avatar Aug 25 '23 18:08 geoffbeier

Can you try again with one of the 0.6.x builds that should be live shortly?

inxilpro avatar Jan 02 '24 18:01 inxilpro

Still seeing this using IDEA 2024.1.4 with plugin version 0.6.5. Screenshot 2024-08-05 at 14 06 53

xirkus avatar Aug 05 '24 20:08 xirkus

Same problem🥲, Webstrom 2024.1.4 with plugin version 0.6.5

image

zwying0814 avatar Aug 21 '24 06:08 zwying0814