Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed default none option to card 1xn. #365

Merged
merged 2 commits into from
Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@
},
"drupal/lb_direct_add": {
"3157440 - Make first option a label not link": "https://www.drupal.org/files/issues/2020-09-09/make-first-option-a-label-not-link-3157440_3_reroll_updated_against_tag_8.x-1.2.patch"
},
"drupal/fvm": {
"3188401 - Add widget to override none option inside view mode select list ": "https://www.drupal.org/files/issues/2020-12-16/allow-user-to-custmise-none-option-from-select-3188401-3.patch"
}
},
"installer-paths": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- field.field.block_content.cards.field_title
- field.field.block_content.cards.view_mode_selection
module:
- fvm
- paragraphs_previewer
id: block_content.cards.default
targetEntityType: block_content
Expand Down Expand Up @@ -49,11 +50,19 @@ content:
size: 60
placeholder: ''
third_party_settings: { }
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
view_mode_selection:
type: options_select
type: fvm_options_select
region: content
weight: 26
settings: { }
third_party_settings: { }
settings:
default_option: 'Cards Grid (1xn)'
third_party_settings: { }
hidden:
field_link: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
core.entity_form_display.block_content.cards.default:
expected_config:
content:
view_mode_selection:
type: options_select
update_actions:
change:
content:
view_mode_selection:
type: fvm_options_select
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

/**
* @file
* Contains update hook.
*/

/**
* Update cards view mode field widget.
*/
function ezcontent_block_cards_update_8001() {
/** @var \Drupal\update_helper\Updater $updateHelper */
$updateHelper = \Drupal::service('update_helper.updater');

// Execute configuration update definitions with logging of success.
$updateHelper->executeUpdate('ezcontent_block_cards', 'ezcontent_block_cards_update_8001');

// Output logged messages to related channel of update execution.
return $updateHelper->logger()->output();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
8.x-1.0:
'#title': 'Update to version 8.x-1.0'
'#description': '<h3>These are the new features for this release:</h3>'
ezcontent_block_cards_update_8001:
'#title': 'Update cards view mode field widget.'
'#description': '<p>This configuration update will update site configuration to newly provided configuration</p>'
'#description_successful': '<p>Configuration is successfully updated.</p>'
'#description_failed': '<p><strong>Update of configuration has failed.</strong><p>'
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ dependencies:
- field.field.paragraph.card_list.field_card
- field.field.paragraph.card_list.field_link
- field.field.paragraph.card_list.field_title
- field.field.paragraph.card_list.layout_selection
- field.field.paragraph.card_list.view_mode_selection
- paragraphs.paragraphs_type.card_list
module:
- fvm
- paragraphs_previewer
id: paragraph.card_list.default
targetEntityType: paragraph
Expand Down Expand Up @@ -41,14 +43,21 @@ content:
third_party_settings: { }
type: string_textfield
region: content
translation:
weight: 10
region: content
settings: { }
third_party_settings: { }
view_mode_selection:
type: options_select
type: fvm_options_select
region: content
weight: 2
settings: { }
settings:
default_option: 'Cards Grid (1xn)'
third_party_settings: { }
hidden:
created: true
field_link: true
layout_selection: true
status: true
uid: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
core.entity_form_display.paragraph.card_list.default:
expected_config:
content:
view_mode_selection:
type: options_select
update_actions:
change:
content:
view_mode_selection:
type: fvm_options_select
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,17 @@ function ezcontent_card_list_update_8001() {
// Output logged messages to related channel of update execution.
return $updateHelper->logger()->output();
}

/**
* Update cards view mode field widget.
*/
function ezcontent_card_list_update_8002() {
/** @var \Drupal\update_helper\Updater $updateHelper */
$updateHelper = \Drupal::service('update_helper.updater');

// Execute configuration update definitions with logging of success.
$updateHelper->executeUpdate('ezcontent_card_list', 'ezcontent_card_list_update_8002');

// Output logged messages to related channel of update execution.
return $updateHelper->logger()->output();
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@
'#description': '<p>This configuration update will update site configuration to newly provided configuration</p>'
'#description_successful': '<p>Configuration is successfully updated.</p>'
'#description_failed': '<p><strong>Update of configuration has failed.</strong><p>'

ezcontent_card_list_update_8002:
'#title': 'Update cards view mode field widget.'
'#description': '<p>This configuration update will update site configuration to newly provided configuration</p>'
'#description_successful': '<p>Configuration is successfully updated.</p>'
'#description_failed': '<p><strong>Update of configuration has failed.</strong><p>'
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
- paragraphs.paragraphs_type.gallery
module:
- entity_browser
- fvm
- link
- text
id: paragraph.gallery.default
Expand Down Expand Up @@ -59,11 +60,17 @@ content:
third_party_settings: { }
type: string_textfield
region: content
translation:
weight: 10
region: content
settings: { }
third_party_settings: { }
view_mode_selection:
type: options_select
type: fvm_options_select
region: content
weight: 4
settings: { }
settings:
default_option: Default
third_party_settings: { }
hidden:
created: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
core.entity_form_display.paragraph.gallery.default:
expected_config:
content:
view_mode_selection:
type: options_select
update_actions:
change:
content:
view_mode_selection:
type: fvm_options_select
region: content
weight: 4
settings:
default_option: Default
third_party_settings: { }
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,17 @@ function ezcontent_gallery_update_8001() {
// Output logged messages to related channel of update execution.
return $updateHelper->logger()->output();
}

/**
* Update view mode widget.
*/
function ezcontent_gallery_update_8002() {
/** @var \Drupal\update_helper\Updater $updateHelper */
$updateHelper = \Drupal::service('update_helper.updater');

// Execute configuration update definitions with logging of success.
$updateHelper->executeUpdate('ezcontent_gallery', 'ezcontent_gallery_update_8002');

// Output logged messages to related channel of update execution.
return $updateHelper->logger()->output();
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@
'#description': '<p>This configuration update will update site configuration to newly provided configuration</p>'
'#description_successful': '<p>Configuration is successfully updated.</p>'
'#description_failed': '<p><strong>Update of configuration has failed.</strong><p>'

ezcontent_gallery_update_8002:
'#title': 'Update view mode widget.'
'#description': '<p>This configuration update will update site configuration to newly provided configuration</p>'
'#description_successful': '<p>Configuration is successfully updated.</p>'
'#description_failed': '<p><strong>Update of configuration has failed.</strong><p>'