- Issue created by @Anybody
- Merge request !40Issue #3504256 by anybody, thomas.frobieter: Provide list_string field values and defaults programmatically → (Merged) created by Anybody
- 🇩🇪Germany Anybody Porta Westfalica
@lrwebks one more thing: On the settings page the settings should be grouped in open details as follows
DROWL Media Settings [=Page title]
- DROWL Media defaults
-- Slide
-- Slideshow
-- [No other entity types needed yet, so for now only these two]So we have room for future settings!
- 🇩🇪Germany Anybody Porta Westfalica
GREAT work @lrwebks I'm impressed!!! 🚀🎉
Left some comments!
Maybe @thomas.frobieter can take a short look at the namings used, if it's all fine? - 🇩🇪Germany lrwebks Porta Westfalica
@thomas.frobieter: Is this “Default” option redundant now? If it was just there to programmatically use a “default” styling that is consistent across the whole page, then it is no longer needed, as the new settings form does exactly that (but better :P). Or is this a regular setting just as the “Yes” and “No” options and has to stay?
- 🇩🇪Germany Anybody Porta Westfalica
@lrwebks I agree it would make sense to remove that unclear "Default" and instead choose one of them as install / update hook default!
Let's see what @thomas.frobieter thinks.@thomas.frobieter please define the default then.
I think the "default" value will use the value set in the Slick optionset. If this is the case - and I have no idea what else is supposed to happen - we should leave it as it is.
- 🇩🇪Germany Anybody Porta Westfalica
Could someone please verify this in code?
And if it's the case, we should either add a description to explain that or improve the value label. Currently it's not clear enough / confusing!
@lrwebks any helping description in the media entity form already? Maybe @thomas.frobieter can take a short look at the namings used, if it's all fine?
The names look good (:
- 🇩🇪Germany lrwebks Porta Westfalica
The description of the fields in question indeed provides a link "Change default value" which leads to a slick optionset edit form. So we could just rename it to something more obvious like "Inherit from Optionset", so that everyone is in the know.
- 🇩🇪Germany Anybody Porta Westfalica
Okay, please
- Use "Slick Optionset default" as value instead of "Default"
- Add a useful description. sth. like: "Slick default uses the Slick defaults configured in the Slick Optionset. These defaults *can be changed here*" (link)
Feel free to further improve!
- 🇩🇪Germany Anybody Porta Westfalica
Merging, go for final testing @thomas.frobieter - if all is fine, please set this fixed and tag a new release.
- field_image_animation needs a "none" value (which should be the default in the global settings)
- The overlay_display fields missing the "no overlay" value
That's it!
@anybody we had considered adding ‘Standard’ to the fields in the media entity, have you discarded this? As I said, it's just a bonus for me. But if it's easy, I'd be happy to do it.
- 🇩🇪Germany Anybody Porta Westfalica
@thomas.frobieter who should implement #20? I'll assign @lrwebks for now, feel free to pick it up yourself.
- Merge request !41Fixes related to issue #3504256 by lrwebks, anybody, thomas.frobieter: Provide list_string field values and defaults programmatically → (Open) created by lrwebks
- 🇩🇪Germany lrwebks Porta Westfalica
I have added the
none
value to theimage_animation
field now in a new branch, but as far as I'm aware, there seems to be no option named “no overlay” for theoverlay_display
field, even without our new changes. @thomas.frobieter, could you clarify? - 🇩🇪Germany lrwebks Porta Westfalica
Found it: @thomas.frobieter, I think you meant the
overlay_position
fields? They do have a “no overlay” option, which is already present in the default settings form. @thomas.frobieter, I think you meant the overlay_position fields? They do have a “no overlay” option, which is already present in the default settings form.
Right, this is correct now. One last thing: the animation select now has two "None" options:
<select data-drupal-selector="edit-field-image-animation" aria-describedby="edit-field-image-animation--description" id="edit-field-image-animation" name="field_image_animation" class="form-select form-element form-element--type-select" data-once="field-group-tab-validation field-group-tabs-validation"> <option value="_none">- Nicht festgelegt/ausgewählt -</option> <option value="none">Keine</option> <option value="ken-burns">Ken-Burns-Effekt</option> </select>
Lets stick with Drupals default "_none" option here. In the version I tested, I only had:
<select data-drupal-selector="edit-field-image-animation" aria-describedby="edit-field-image-animation--description" id="edit-field-image-animation" name="field_image_animation" class="form-select form-element form-element--type-select" data-once="field-group-tab-validation field-group-tabs-validation"> <option value="ken-burns">Ken-Burns-Effekt</option> </select>
- 🇩🇪Germany lrwebks Porta Westfalica
Okay, we're using the built-in default empty option now, just like the actual field in the slide config form does.
Heads-up why I am using this line here:
'#empty_value' => '_none',
If I do not provide a specific value for the empty option, it will disappear forever once the form is saved with a different value (e.g., “Ken Burns Effect”). But since we need it to stay, so I just passed its own default value to it.