- Issue created by @Anybody
- π©πͺGermany Anybody Porta Westfalica
@larowlan if you're fine with the proposal, we'll start implementing this as submodule via MR.
Yes, please make this feature happen. Adding attributes to link fields is horrible on frontend.
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Element class formatter does this too I think
I'm happy with a sub-module, but we'd have to be mindful about how we merge values from the formatter with user supplied values.
Perhaps we need options 'overrride user options' or 'user options override defaults'
- π©πͺGermany Anybody Porta Westfalica
Thanks for the feedback @larowlan that's wonderful news!
Yes I think one of the key benefits is to have that control in one module. For the beginning, I'd say we should simply merge and unify them, not overriding anything. For the future we should then see, if there are cases where overriding into one or the other direction makes sense as an option? (YAGNI)
It's planned to start here soon! :)
- Merge request !23Draft: Resolve #3486997 "Add link attributes formatter" β (Open) created by Anybody
- Assigned to lrwebks
- Status changed to Needs work
4 months ago 11:46am 20 February 2025 - π©πͺGermany lrwebks Porta Westfalica
The formatter is in place and works as expected (as far as I'm aware). If a value is set in the formatter, it overrides any value from the field widget, but keeps the widget value if it is not set in the formatter. I also added a note regarding that in the formatter settings, so that there will be no confusion as to why a setting provided via field widget is not taking effect in the actual view (that confusion would definitely happen to me a lot :|).
So, it is off to βNeeds Reviewβ now.
- Assigned to Grevil
- Status changed to Needs review
about 1 month ago 3:13pm 30 April 2025 - π©πͺGermany Grevil
Great work! Code wise this looks great :)
Two things, I think this would be really nice as a small (but helpful) addition:
- Show the widget setting as ghost text on the related formatter setting input field (if empty).
- Show whether a setting is overriden in the summary.
But I am unsure, whether this is easily implemented.
- π©πͺGermany Grevil
@larowlan, what do you think about this? Should we use the current approach, or should we enhance this as stated above?
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Hey @grevil I'm focusing on 11.2.0 issues this week but will make a note to come back here next week after the alpha window
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
I'm still not convinced this module is the right place for this, there are already several solutions for this (such as element class formatter).
I _could_ see the benefit in having it in this module _if_ the formatter made use of the attribute plugins - but at present it is a hard-coded list.
So in order to be useful, I think it should be dynamic (based on the plugins) rather than a fixed list. But even then I'm still not sure this is something we should be doing - as I believe there are other modules that already do this well/better.
- π©πͺGermany Grevil
Thanks for the feedback @larowlan! We'll discuss this internally and come back to you!