Skip to content

Commit 7960edc

Browse files
authored
Merge branch 'develop' into feature/DIGITAL-99-robo-standards
2 parents 45ea975 + a251b4b commit 7960edc

38 files changed

+180
-263
lines changed

config/sync/core.entity_view_display.media.video.default.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mode: default
1414
content:
1515
field_media_oembed_video:
1616
type: oembed
17-
label: visually_hidden
17+
label: hidden
1818
settings:
1919
max_width: 0
2020
max_height: 0

config/sync/editor.editor.html.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ settings:
1616
- code
1717
- link
1818
- heading
19-
- blockQuote
2019
- bulletedList
2120
- numberedList
2221
- drupalMedia
@@ -50,10 +49,16 @@ settings:
5049
-
5150
label: 'USA button link (outlined)'
5251
element: '<a class="usa-button usa-button--outline">'
52+
-
53+
label: Checklist
54+
element: '<ul class="dg-checklist">'
55+
-
56+
label: 'Checklist (no top border)'
57+
element: '<ul class="dg-checklist dg-checklist--no-border">'
5358
linkit_extension:
5459
linkit_enabled: true
5560
linkit_profile: default
5661
media_media:
57-
allow_view_mode_override: true
62+
allow_view_mode_override: false
5863
image_upload:
5964
status: false

config/sync/editor.editor.html_embedded_content.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ settings:
1616
- code
1717
- link
1818
- heading
19-
- blockQuote
2019
- bulletedList
2120
- numberedList
2221
- sourceEditing

config/sync/filter.format.html.yml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ uuid: 5d18c973-9aef-4dfe-94ba-cb2f2d596598
22
langcode: en
33
status: true
44
dependencies:
5-
config:
6-
- core.entity_view_mode.media.full
7-
- core.entity_view_mode.media.media_library
85
module:
96
- auto_heading_ids
7+
- dg_fields
108
- editor
119
- embedded_content
1210
- linkit
@@ -19,94 +17,97 @@ filters:
1917
id: editor_file_reference
2018
provider: editor
2119
status: false
22-
weight: -43
20+
weight: -41
2321
settings: { }
2422
embedded_content:
2523
id: embedded_content
2624
provider: embedded_content
2725
status: true
28-
weight: -48
26+
weight: -49
2927
settings: { }
3028
filter_align:
3129
id: filter_align
3230
provider: filter
3331
status: true
34-
weight: -42
32+
weight: -47
3533
settings: { }
3634
filter_autop:
3735
id: filter_autop
3836
provider: filter
39-
status: true
40-
weight: -50
37+
status: false
38+
weight: -45
39+
settings: { }
40+
filter_breaks:
41+
id: filter_breaks
42+
provider: dg_fields
43+
status: false
44+
weight: -36
4145
settings: { }
4246
filter_caption:
4347
id: filter_caption
4448
provider: filter
4549
status: false
46-
weight: -41
50+
weight: -40
4751
settings: { }
4852
filter_html:
4953
id: filter_html
5054
provider: filter
5155
status: false
52-
weight: -45
56+
weight: -43
5357
settings:
54-
allowed_html: '<span class="highlight-text"> <div class="box"> <a class="usa-button usa-button--outline">'
58+
allowed_html: '<span class="highlight-text"> <div class="box"> <a class="usa-button usa-button--outline"> <ul class="dg-checklist dg-checklist--no-border">'
5559
filter_html_help: true
5660
filter_html_nofollow: false
5761
filter_html_escape:
5862
id: filter_html_escape
5963
provider: filter
6064
status: false
61-
weight: -44
65+
weight: -42
6266
settings: { }
6367
filter_html_image_secure:
6468
id: filter_html_image_secure
6569
provider: filter
6670
status: false
67-
weight: -40
71+
weight: -39
6872
settings: { }
6973
filter_htmlcorrector:
7074
id: filter_htmlcorrector
7175
provider: filter
7276
status: false
73-
weight: -39
77+
weight: -38
7478
settings: { }
7579
filter_image_lazy_load:
7680
id: filter_image_lazy_load
7781
provider: filter
7882
status: false
79-
weight: -38
83+
weight: -37
8084
settings: { }
8185
filter_url:
8286
id: filter_url
8387
provider: filter
8488
status: false
85-
weight: -46
89+
weight: -44
8690
settings:
8791
filter_url_length: 72
8892
heading_id_filter:
8993
id: heading_id_filter
9094
provider: auto_heading_ids
9195
status: true
92-
weight: 10
96+
weight: -46
9397
settings: { }
9498
linkit:
9599
id: linkit
96100
provider: linkit
97101
status: true
98-
weight: -49
102+
weight: -50
99103
settings:
100104
title: true
101105
media_embed:
102106
id: media_embed
103107
provider: media
104108
status: true
105-
weight: -47
109+
weight: -48
106110
settings:
107111
default_view_mode: default
108-
allowed_view_modes:
109-
default: default
110-
full: full
111-
media_library: media_library
112+
allowed_view_modes: { }
112113
allowed_media_types: { }

config/sync/responsive_image.styles.digital_gov_responsive_images.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,18 @@ dependencies:
66
- image.style.dg_large_scale_to_1200_convert_to_webp
77
- image.style.dg_medium_800_max_convert_to_webp
88
- image.style.dg_small
9-
theme:
10-
- digital_gov
119
id: digital_gov_responsive_images
12-
label: 'Digital.gov Responsive Images'
10+
label: 'Digital.gov Responsive Image: Default'
1311
image_style_mappings:
1412
-
15-
image_mapping_type: image_style
16-
image_mapping: dg_large_scale_to_1200_convert_to_webp
17-
breakpoint_id: digital_gov.large
13+
image_mapping_type: sizes
14+
image_mapping:
15+
sizes: '(max-width: 600px) 40vw, 100vw'
16+
sizes_image_styles:
17+
- dg_large_scale_to_1200_convert_to_webp
18+
- dg_medium_800_max_convert_to_webp
19+
- dg_small
20+
breakpoint_id: responsive_image.viewport_sizing
1821
multiplier: 1x
19-
-
20-
image_mapping_type: image_style
21-
image_mapping: dg_medium_800_max_convert_to_webp
22-
breakpoint_id: digital_gov.medium
23-
multiplier: 1x
24-
-
25-
image_mapping_type: image_style
26-
image_mapping: dg_small
27-
breakpoint_id: digital_gov.small
28-
multiplier: 1x
29-
breakpoint_group: digital_gov
22+
breakpoint_group: responsive_image
3023
fallback_image_style: dg_small

web/modules/custom/default_content_config/content/node/fd186b65-70b7-499a-a9be-050562561209.yml

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

web/modules/custom/dg_fields/dg_fields.module

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* Primary module hooks for Digital.gov Fields module.
66
*/
77

8+
use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
9+
use Drupal\Core\Entity\EntityInterface;
810
use Drupal\Core\Form\FormStateInterface;
911

1012
/**
@@ -23,3 +25,28 @@ function dg_fields_form_node_form_alter(array &$form, FormStateInterface $form_s
2325
);
2426
}
2527
}
28+
29+
/**
30+
* Implements hook_entity_view_alter().
31+
*/
32+
function dg_fields_entity_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display): void {
33+
if ($display->getTargetBundle() === 'video' && ($build['#embed'] ?? FALSE)) {
34+
// Media wants to proxy the URL to the video, we should use the direct URL
35+
// so the player works when exported by Tome.
36+
$videoURL = $entity->get('field_media_oembed_video')->first()->getValue()['value'];
37+
// Youtube blocks iframe-ing unless the URL is to /embed/.
38+
$videoURL = str_replace("youtube.com/watch?v=", "youtube.com/embed/", $videoURL);
39+
$build["field_media_oembed_video"][0]["#attributes"]['src'] = $videoURL;
40+
41+
if (str_contains($videoURL, 'youtube.com/embed/')) {
42+
// Customize the HTML for YouTube iframes.
43+
unset(
44+
$build["field_media_oembed_video"][0]["#attributes"]["height"],
45+
$build["field_media_oembed_video"][0]["#attributes"]["width"]
46+
);
47+
$build["field_media_oembed_video"][0]["#attributes"]["style"] = "position: absolute; top: 0; left: 0; width: 100%; height: 100%;";
48+
$build["field_media_oembed_video"][0]["#attributes"]["allowfullscreen"] = "";
49+
$build["field_media_oembed_video"][0]["#attributes"]["frameborder"] = 0;
50+
}
51+
}
52+
}

web/modules/custom/ec_shortcodes/ec_shortcodes.module

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
*/
1111
function ec_shortcodes_theme($existing, $type, $theme, $path) {
1212
return [
13-
'ec_shortcodes_button' => [
14-
'variables' => [
15-
'url' => NULL,
16-
'text' => NULL,
17-
],
18-
],
1913
'ec_shortcodes_accordion' => [
2014
'variables' => [
2115
'kicker' => NULL,
@@ -42,15 +36,11 @@ function ec_shortcodes_theme($existing, $type, $theme, $path) {
4236
],
4337
'ec_shortcodes_card_quote' => [
4438
'variables' => [
39+
'dark' => NULL,
4540
'text' => NULL,
4641
'cite' => NULL,
4742
],
4843
],
49-
'ec_shortcodes_checklist' => [
50-
'variables' => [
51-
'checklist' => NULL,
52-
],
53-
],
5444
'ec_shortcodes_do_dont_table' => [
5545
'variables' => [
5646
'caption' => NULL,

web/modules/custom/ec_shortcodes/src/Plugin/EmbeddedContent/ECShortcodesButton.php

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)