Introduce x-hide and x-unless to avoid more javascript in CSP mode #4057
Replies: 3 comments 3 replies
-
I think I'd be more partial to just a modifier on
|
Beta Was this translation helpful? Give feedback.
-
How do these feature ideas evolve into work? :) Does someone need to accept this discussion idea, then turn into an issue/re-label it, or is any PR welcome? |
Beta Was this translation helpful? Give feedback.
-
Hi! Not sure what the progress is on all this, but I wondered whether, as an alternative to new directives or modifiers, we could just add support for (simple?) negated expressions directly in the CSP evaluator. I took the liberty to create a PR along those lines here: #4441 That way, instead of |
Beta Was this translation helpful? Give feedback.
-
Moving things to a
Alpine.data()
directive is already alot of work converting a whole codebase to being CSP compatible.But even these don't work
x-show="!isLeftSidebarOpen"
. ax-hide="isLeftSidebarOpen"
would be so nice, and the negation ofx-if
as well.and it feels so unnecessary to add another getter just to negate a property
i feel like a new alpine attribute like this wouldn't rly "pollute" the library etc, just adds convenience. i understand omitting it when building alpine and without taking CSP into consideration, but i think this is a good enough use case, with more and more people asking for an improved CSP experience :) thanks
Beta Was this translation helpful? Give feedback.
All reactions