Early Bird Registration for DrupalCon Atlanta is now open! By registering during our Early Bird Registration window, you’ll save $100. This window ends on 19 January 2025 and will go by quickly, so don’t wait!
Problem/Motivation
When providing a block reference as a paragraph field it would be nice to control how/if the block configuration form displays. This allow content authors to select a block to reference, but not have control over any block settings.
Proposed resolution
Add a field setting to the block_field widget.
Remaining tasks
Code, test
User interface changes
Additional form display option.
API changes
None
Data model changes
Addition of 'configuration_form' to config schema.
Comment | File | Size | Author |
---|---|---|---|
#14 | 2877520-14.patch | 6.85 KB | fenstrat |
#2 | block_field_form_display_options.png | 20.06 KB | fenstrat |
Comments
Comment #2
fenstratAttached patch adds a 'Configuration form' setting to form display. Didn't go with a boolean (hidden/shown) to allow future flexibility (e.g. a setting which only allowed the overriding of block title).
Getting a odd test exception locally, will see how it goes with the testbot.
Comment #3
fenstratComment #5
acbramley CreditAttribution: acbramley at PreviousNext for Transport for NSW commentedI don't think this kind of test is necessary. We just want to test that the configuration option (configuration_form = hidden) hides the configuration on the edit form. In that case you would just be checking that the edit form doesn't contain the config options?
I also find the do while quite confusing especially with the dynamic $contains assertion.
Comment #6
fenstrat@acbramley Agreed on all accounts, however that have been a decent refactoring of the test, instead went with with working off of what was there. Will change the dynamic $contains assert and work on the failing test when I get a moment.
Comment #7
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented@fenstrat @acbramley If you need commit access to the repository, just ask.
Comment #8
acbramley CreditAttribution: acbramley at PreviousNext for Transport for NSW commented@fenstrat understood, no need to refactor the existing test though just adjust your own ones :)
@jrockowitz if you're happy with that, that'd be great!
Comment #9
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented@acbramley I am ecstatic to get you involved. My ongoing work on the Webform module has forced me to neglect all my other Drupal projects.
Comment #10
fenstrat@jrockowitz no worries. If it frees you up more on Webform happy to help out :) If you could give @acbramley and I commit access we'll see where we can help out, cheers!
Comment #11
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedDone!
Feel free to also list Previous/Next as a 'Supporting organization" on the Block field's project page.
Comment #12
finneSo what is the work that needs doing now:
The patch code seems fine, but the test code could be separated to simplify anything new we want to test (the config form visible or not)
Is that a good description of the current status of this issue?
Comment #13
fenstrat@finne yep, that's a good summary :) Sorry, this slipped off my radar, taking a look at this now.
Comment #14
fenstratAttached:
testConfigurationFormOptions()
method.Comment #15
acbramley CreditAttribution: acbramley at PreviousNext for Transport for NSW commentedNice!
Comment #17
fenstratCheers! Thanks everyone.
Comment #18
fenstratComment #20
dennis cohn CreditAttribution: dennis cohn at ezCompany, iO commentedWhen I set my configuration form to hidden in my form display, my default field settings won't be applied to the block field.
I also can't edit my default settings anymore in the field setting.
Anyone else has this issue too?
Comment #21
acbramley CreditAttribution: acbramley at PreviousNext for Transport for NSW commented@Dennis Cohn please create a new bug report and add steps to reproduce there :)