Browse Source

Issue #3083372 by volkerk, chr.fritsch, daniel.bosen: Paragraph preview does not respect focal point settings

tags/3.4.6
Christian Fritsch GitHub 5 months ago
parent
commit
f664bd5252
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 6 deletions
  1. +8
    -6
      config/optional/image.style.paragraph_preview_thumbnail.yml
  2. +25
    -0
      config/update/thunder_update_8308.yml
  3. +14
    -0
      thunder.install
  4. +8
    -0
      updates_checklist.yml

+ 8
- 6
config/optional/image.style.paragraph_preview_thumbnail.yml View File

@@ -1,14 +1,16 @@
langcode: en
status: true
dependencies: { }
dependencies:
module:
- focal_point
name: paragraph_preview_thumbnail
label: 'Paragraph Preview Thumbnail'
effects:
701f3d12-4741-47a1-8a88-7a96487c9be1:
uuid: 701f3d12-4741-47a1-8a88-7a96487c9be1
id: image_scale_and_crop
weight: 1
be3418f6-9257-40ca-a6ed-20d73765b010:
uuid: be3418f6-9257-40ca-a6ed-20d73765b010
id: focal_point_scale_and_crop
weight: 2
data:
width: 150
height: 90
anchor: center-center
crop_type: focal_point

+ 25
- 0
config/update/thunder_update_8308.yml View File

@@ -0,0 +1,25 @@
image.style.paragraph_preview_thumbnail:
expected_config:
effects:
701f3d12-4741-47a1-8a88-7a96487c9be1:
data:
anchor: center-center
height: 90
width: 150
id: image_scale_and_crop
uuid: 701f3d12-4741-47a1-8a88-7a96487c9be1
weight: 1
update_actions:
change:
effects:
be3418f6-9257-40ca-a6ed-20d73765b010:
data:
crop_type: focal_point
height: 90
width: 150
id: focal_point_scale_and_crop
uuid: be3418f6-9257-40ca-a6ed-20d73765b010
weight: 2
delete:
effects:
701f3d12-4741-47a1-8a88-7a96487c9be1: {}

+ 14
- 0
thunder.install View File

@@ -235,3 +235,17 @@ function thunder_update_8307() {
// Output logged messages to related channel of update execution.
return $updateHelper->logger()->output();
}

/**
* Let paragraph preview image style use the focal point.
*/
function thunder_update_8308() {
/** @var \Drupal\update_helper\Updater $updateHelper */
$updateHelper = \Drupal::service('update_helper.updater');

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

// Output logged messages to related channel of update execution.
return $updateHelper->logger()->output();
}

+ 8
- 0
updates_checklist.yml View File

@@ -51,3 +51,11 @@ v4.5:
thunder_update_8307:
'#title': 'Update and reconfigure entity browser widget.'
'#description': '<p>The entity browser configuration in paragraphs has changed. We do not use the inline entity forms field widget anymore, and use the rendered entity instead. We recommend to manually check all paragraphs, that use the inline entity form field widget for media entities. Make sure those widgets are changed to rendered entity.</p>'
v4.6:
'#title': 'Update to version v4.6'
'#description': '<h3>These are the new features for this release:</h3>'
thunder_update_8308:
'#title': 'Let paragraph preview image style use the focal point.'
'#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>'

Loading…
Cancel
Save