- Issue created by @andresgmh
- Status changed to Needs review
about 1 year ago 9:36pm 26 October 2023 - last update
about 1 year ago 2 pass - Status changed to RTBC
about 1 year ago 3:30pm 31 October 2023 - Status changed to Needs work
about 1 year ago 10:52pm 7 December 2023 - πΊπΈUnited States joegraduate Arizona, USA
A couple of nitpicks with patch #2:
-
+++ b/config/schema/manage_display.schema.yml @@ -4,6 +4,9 @@ field.formatter.settings.title: + tag_css_classes:
I don't think this new setting name needs the
tag_
prefix. -
+++ b/src/Plugin/Field/FieldFormatter/TitleFormatter.php @@ -70,7 +79,8 @@ class TitleFormatter extends StringFormatter { + $item['#prefix'] = ($tag_css_classes !== '') ? "<$tag class='$tag_css_classes'>" : "<$tag>";
Would probably be better to use
!empty()
here.
-
- Status changed to Needs review
about 1 year ago 11:01pm 7 December 2023 - last update
about 1 year ago 2 pass - πΊπΈUnited States joegraduate Arizona, USA
Updated patch that addresses items in #6.
- First commit to issue fork.
- last update
11 months ago 2 pass - πΊπ¦Ukraine AstonVictor
Created a new MR.
Added changes as a mr and updated the
settingsSummary()
method in order not to show the summary for classes if the field is empty. - π¬π§United Kingdom adamps
Thanks for the contributions. For sure I can see that some sites would wish for this feature I even have a feeling that someone requested it before although I can't find the issue now.
This module aims to get the formatters added to Drupal Core. When developing the formatters I aimed to copy the Core formatters as closely as possible. Core mostly doesn't add a lot of extra configuration options, so I expect they wouldn't accept the option in this feature request. Hence it seems like we shouldn't add it here. What does anyone else think?
Perhaps can use this https://www.drupal.org/project/field_formatter_class β ?
- Status changed to Postponed: needs info
11 months ago 7:58am 22 January 2024 - Status changed to Fixed
3 months ago 6:54am 3 October 2024 - πΊπ¦Ukraine AstonVictor
Merged the MR for adding CSSS class to the title.
thanks all - π¬π§United Kingdom adamps
OK, but in #11 I said "Core mostly doesn't add a lot of extra configuration options, so I expect they wouldn't accept the option in this feature request. Hence it seems like we shouldn't add it here." π
There is a Core issue β¨ Add a Title Formatter Active that seems quite close to commit now. We would then remove the TitleFormatter from this module, with an update hook to fix existing sites. At this point classes would be lost on any site that had used them. So I feel we should revert this change to avoid confusion.
Does that make sense??
-
astonvictor β
committed 8665b105 on 3.x
Resolve #3380114 "Css classes configuration"
-
astonvictor β
committed 8665b105 on 3.x
- πΊπ¦Ukraine AstonVictor
thanks @adamps
I reverted all my changes. let's wait for the Drupal update.
- π¬π§United Kingdom adamps
Great thanks. To help future readers, I feel it's better to make it clear that we won't fix it here.
If you have enthusiasm for improving this module, then a really useful job would be to review the core issue and help get it in. The eventual goal for this module is to make it obsoleteπ.