Add more options to define the UI style form

Created on 10 July 2023, over 1 year ago
Updated 20 July 2023, over 1 year ago

Instead of "- None -" (which translate to no class), I would like the possibility to define the default value for my style. As a fallback (or as another option), it would be great that we can choose the label being used instead of "- None - ".
Also, I would like to make the field as required so it is not possible to submit with "- None -" being selected.

My suggestion is to add 3 new keys in the plugin definition:
- default_value: string, default to ''
- none_label: string, default to '' (which translate to - None - in the UI)
- required: boolean, default to false

Feature request
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇫🇷France vbouchet

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @vbouchet
  • 🇫🇷France Grimreaper France 🇫🇷

    Hi,

    As discussed on Slack with @pdureau, we would like to avoid to change the plugin definition.

    As this is something you need for Paragraphs only and that some behaviors may depend on the paragraph type, it would be better for that to be in config and so in ui_styles_paragraph, in the config of the behavior plugin.

  • Status changed to Closed: won't fix over 1 year ago
  • 🇫🇷France vbouchet

    Thanks for following-up and providing guidance. I am closing this request and will raise a new one in ui_styles_paragraph.

Production build 0.71.5 2024