Enhancing URL Command Generation for Improved Usability #339
Replies: 2 comments 1 reply
-
You shouldn’t be generating commands using the middleware from controller actions. That’s a misuse of the software and not a good idea. The HMAC taghelper is separate from the img taghelper so you should be using it as a base for your own taghelper to generate srcset commands. |
Beta Was this translation helpful? Give feedback.
-
I think you may have missed the point.
IMHO even setting
Example above is not ideal, because command names are hardcoded, but it's just an illustration. What I'm saying, is that having only img taghelpers built-in limits many standard use cases and users shouldn't have to create custom implementations or overrides for standard scenarios. |
Beta Was this translation helpful? Give feedback.
-
When not using TagHelper, adding commands to URLs is a straightforward process. However, this ease diminishes when HMAC is involved. In documentation, there is only limited guidance on this issue:
In practice, this process can be quite unintuitive and challenging, especially when working with a custom HMAC implementation.
In my opinion, there's a clear need for improved utilities to simplify URL generation, especially when HMAC is involved.
Example use cases:
srcset
attribute for<source>
tag (part of HTML<picture>
).Beta Was this translation helpful? Give feedback.
All reactions