Replies: 2 comments
-
|
This text was written in the upcoming changes content in version 4.19. As for the name of the query parameter, the changes already implemented But if we rely on semantics, To sum it up, I don't see any compelling reason to change the parameter name at this point, except to improve semantics. |
Beta Was this translation helpful? Give feedback.
-
I have nothing to add, as I can only rely on my experience using the plugin. The change in the behavior of the SVG import in version 4.19 matches my expectations. I haven't looked under the hood at the moment. My involvement in the development of the plugin is close to zero. If this changes, I can add details. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Thoughts on SVG import in HTML:
The SVG import will take into account the settings of Webpack modules. In other words, the default import behavior fully corresponds to the Webpack options unless the query parameters indicate different behavior.
What I do not know:
Whether the above behavior can be implemented.
How much time it might take.
How the implementation of such behavior might affect performance.
The query parameter name (considering semantics and usability):
replace
Semantics: Clear and direct, it communicates that the img tag will be replaced.
Usability: Simple and intuitive, easy to understand at a glance. Works well for the main action.
substitute
Semantics: Similar to "replace," but has a slightly less common usage in technical contexts. It may imply an alternate replacement rather than the default behavior.
Usability: Less immediate clarity compared to "replace."
transform
Semantics: Suggests a change in the structure or format. Could work if the focus is on converting an img to an svg.
Usability: Useful but may feel more general than specific to replacing the parent and inheriting attributes.
swap
Semantics: Suggests an exchange, which might confuse users since there’s no bidirectional replacement (just img to svg).
Usability: May cause misunderstandings, as “swap” implies a two-way process.
merge
Semantics: Implies a unification or combination of two elements, which fits the idea of inheriting attributes. However, it doesn’t inherently communicate the replacement action.
Usability: Could be misleading unless the merging of attributes is the primary focus.
embed
Semantics: Highlights inserting the SVG, but doesn’t clearly indicate the replacement or inheritance aspect.
integrate
Focuses on the idea of embedding the SVG while preserving or inheriting attributes.
inherit
Highlights the aspect of adopting attributes, making it clear for users that inheritance is a key feature.
adopt
Similar to "Inherit," but slightly less formal, giving a sense of attribute adoption during the process.
convert
tag to an element.
If the emphasis is on the transformation of the
assimilate
A more unique and descriptive term for merging the parent attributes into the SVG while replacing the parent element.
@vralle This is good base for using in new features.
Beta Was this translation helpful? Give feedback.
All reactions