-
-
Notifications
You must be signed in to change notification settings - Fork 546
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
[5.x] Refactor Form and SVG tags to use :attr
prefix instead of $knownTagParams
#9576
[5.x] Refactor Form and SVG tags to use :attr
prefix instead of $knownTagParams
#9576
Conversation
# Conflicts: # src/Tags/Svg.php # tests/Fieldtypes/IconTest.php # tests/Tags/SvgTagTest.php
I just ran into this. A couple of notes.
|
Feels a little fiddly - out of curiosity whats the logic behind this? Is it a security thing? And just confirm will this affect all tags that use |
The upgrade guide explains exactly who/what this affects under each heading. We hope people will read those too and not just the headings.
Any tags that output html attributes.
The glide tag never supported classes. There's no change there. It does support
It's to avoid ambiguity between tag parameters that control behavior and params that just output html attributes. For example, if the glide tag did support html attributes (it could easily be added), how would we tell the difference between you wanting to control the width of the resized image vs. the width attribute on the img tag?
The place where we actually ran into this was in this PR where we add a
Having the
It sounds tedious, but have you actually attempted it yet? In Peak, there are only 4 {{ svg }} tags. |
I understand the change. And it makes sense. And a major version bump is the right time for this of course. However...
Well, it's a starter kit so pretty lean in that regard. In my most recent projects I have up to 30 SVG tags. Considering I probably need to update 20+ sites, I can guarantee you it'll be tedious. If it is what it is, it is what it is.
Sure, me too, but this is just feedback hoping to improve the language. Perhaps the changes could be listed out per tag that it applies to. That way you get the tag name in the heading. I'm thinking this could avoid frustration. |
@jasonvarga thanks for explaining - for some reason I thought glide batch had it but have completely hallucinated it 😂 understand the logic around it changing (and thanks for looking into it in the other threads referenced etc) |
FYI this has been completely reverted in 5.0.0.alpha-2. You don't need to change anything. |
Noticed, cool 😃. I'll make it a good practice to do it from now one however. |
This PR closes #9430