Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chris_hall_hu_cheng created an issue. See original summary.

chris_hall_hu_cheng’s picture

chris_hall_hu_cheng’s picture

Status: Active » Needs review
chris_hall_hu_cheng’s picture

trevorkjorlien’s picture

Applied 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.

Sam152’s picture

Thanks 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.

benjy’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

Sam152’s picture

  • Sam152 committed 2c714b1 on 8.x-2.x
    Issue #2676266 by chris_hall_hu_cheng, Sam152, trevorkjorlien, benjy:...

  • Sam152 committed 46e0b89 on 8.x-2.x authored by chris_hall_hu_cheng
    Issue #2676266 by chris_hall_hu_cheng, Sam152, trevorkjorlien, benjy:...
  • Sam152 committed 70028c1 on 8.x-2.x
    Revert "Issue #2676266 by chris_hall_hu_cheng, Sam152, trevorkjorlien,...
Sam152’s picture

Status: Reviewed & tested by the community » Fixed

Sorry, commit was mis-credited. Reverted and recommited with credit to Chris.

Thanks everyone for working on this.

Sam152’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.