Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Loving the D8 version of this module.
I have set this issue as major bug as a number of use-cases I have encountered for D8 in the past have depended on the no-markup option and without this in D8 those cannot be converted from D7.
A patch to follow very shortly.
Comment | File | Size | Author |
---|---|---|---|
#6 | fences-no-markup-fix-2676266-6.patch | 5.95 KB | Sam152 |
#6 | interdiff.txt | 6.2 KB | Sam152 |
#5 | d7-fences-none-option.png | 50.9 KB | trevorkjorlien |
#5 | d8-fences-none-option.png | 75.83 KB | trevorkjorlien |
#4 | fences-no-markup-fix-2676266-4.patch | 1.55 KB | chris_hall_hu_cheng |
Comments
Comment #2
chris_hall_hu_cheng CreditAttribution: chris_hall_hu_cheng as a volunteer and commentedThe attached patch allows none to be chosen for markup, which is checked for in the field template.
Comment #3
chris_hall_hu_cheng CreditAttribution: chris_hall_hu_cheng as a volunteer and commentedComment #4
chris_hall_hu_cheng CreditAttribution: chris_hall_hu_cheng as a volunteer and commentedSorry forgot the check on the label markup.
News patch attached.
Comment #5
trevorkjorlien CreditAttribution: trevorkjorlien at Floe design + technologies commentedApplied the patch and the 'None' option appears now.
But in the Drupal 7 version, this 'None' option appeared at the top of the select list without an
optgroup
parent. Maybe it's personal preference, but I think this makes more sense than putting it in the 'Sectioning' group.Comment #6
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedThanks for working on this and your feedback, appreciate both your input and glad to know the module is being used.
I agree that perhaps the option should sit at the top. Adding the item directly to the options list as a special case also allows us to provide a more clear description of what's going on, such as the case of the Drupal 7 version.
Since there is no markup, the classes are irrelevant so I've added some states to hide them when the user selects "none".
I also felt the 'none' string appeared a bit too much and was perhaps prone to human error, so I've introduced a constant for it and calculated if the tag should appear in the preprocess function.
Leaving this as needs review for another maintainer.
Comment #7
benjy CreditAttribution: benjy commentedLooks good.
Comment #8
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedComment #11
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedSorry, commit was mis-credited. Reverted and recommited with credit to Chris.
Thanks everyone for working on this.
Comment #12
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedFYI, tests being added in #2683305: Test more variations of configuration and the expected markup.