Skip to content

Commit

Permalink
VACMS-10626: Drupalize new homepage components (#11114)
Browse files Browse the repository at this point in the history
* VACMS-10626: Add new benefits promo block type.

* VACMS-10626: Add new home page hero entityqueue.

* VAMCS-10626: Add owner field to benefit promo block.

* VACMS-10626: Use select form widget for owner field.

* VACMS-10626: Add other search tools menu.

* VACMS-10626: Add popular on va.gov menu.

* VACMS-10626: Add news promo custom block and related fields.

* VACMS-10626: Add feature toggle for new homepage version.

* VACMS-10626: Add homepage news spotlight entityqueue.

* VACMS-10626: Add content model test changes.

* VACMS-10626: Add menus test updates.

* VACMS-10626: Add custom block fields to behat tests.

* VACMS-10626: Update custom block fields behat test from spec tool output.

* VACMS-10626: Update form display for news promo block.

* VACMS-10626: Swap out link teaser for cta paragraph on news promo block.

* VACMS-10626: Remove field_owner from new block types.

* VACMS-10626: Add field_administration section field to new blocks.

* VACMS-10626: Update guidance and character count formatting for new blocks.

* VACMS-10626: Add image field to news promo block.

* VACMS-10626: Replace alert block cta paragraph ref field with individual fields for better control.

* VACMS-10626: Update behat spect tool test to reflect new content model changes.

Co-authored-by: Daniel Sasser <[email protected]>
  • Loading branch information
dsasser and dsasser authored Oct 13, 2022
1 parent 6231760 commit cc406ae
Show file tree
Hide file tree
Showing 30 changed files with 1,245 additions and 279 deletions.
8 changes: 8 additions & 0 deletions config/sync/block_content.type.benefit_promo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
uuid: 26ebbaef-909a-4b3f-bdcf-b996eb8ca5a2
langcode: en
status: true
dependencies: { }
id: benefit_promo
label: 'Benefit Promo'
revision: 1
description: 'A call to action with a title, description, CTA label and link.'
8 changes: 8 additions & 0 deletions config/sync/block_content.type.news_promo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
uuid: 8366569b-90ea-44d0-b444-421c27486102
langcode: en
status: true
dependencies: { }
id: news_promo
label: 'News Promo'
revision: 1
description: 'Promote a news link with a title and description.'
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
uuid: dc8c65f9-4223-4e21-b201-a979b27118ae
langcode: en
status: true
dependencies:
config:
- block_content.type.benefit_promo
- field.field.block_content.benefit_promo.field_administration
- field.field.block_content.benefit_promo.field_promo_cta
- field.field.block_content.benefit_promo.field_promo_headline
- field.field.block_content.benefit_promo.field_promo_text
module:
- content_moderation
- paragraphs
- textfield_counter
id: block_content.benefit_promo.default
targetEntityType: block_content
bundle: benefit_promo
mode: default
content:
field_administration:
type: options_select
weight: 4
region: content
settings: { }
third_party_settings: { }
field_promo_cta:
type: entity_reference_paragraphs
weight: 3
region: content
settings:
title: 'Call to Action Link'
title_plural: 'Call to Action Links'
edit_mode: open
add_mode: button
form_display_mode: default
default_paragraph_type: button
third_party_settings: { }
field_promo_headline:
type: string_textfield_with_counter
weight: 1
region: content
settings:
size: 100
placeholder: ''
use_field_maxlength: true
maxlength: 0
counter_position: after
js_prevent_submit: true
count_html_characters: true
textcount_status_message: '<span class="remaining_count">@remaining_count</span> characters remaining'
third_party_settings: { }
field_promo_text:
type: string_textarea_with_counter
weight: 2
region: content
settings:
rows: 5
placeholder: ''
maxlength: 512
counter_position: after
js_prevent_submit: false
count_html_characters: true
textcount_status_message: '<span class="remaining_count">@remaining_count</span> characters remaining'
third_party_settings: { }
info:
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
moderation_state:
type: moderation_state_default
weight: 5
region: content
settings: { }
third_party_settings: { }
hidden: { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
uuid: c9e89373-ad1e-4d92-98c5-5ef003aaa3fc
langcode: en
status: true
dependencies:
config:
- block_content.type.news_promo
- field.field.block_content.news_promo.field_administration
- field.field.block_content.news_promo.field_image
- field.field.block_content.news_promo.field_link
- field.field.block_content.news_promo.field_link_label
- field.field.block_content.news_promo.field_promo_headline
- field.field.block_content.news_promo.field_promo_text
module:
- content_moderation
- link
- media_library
- textfield_counter
id: block_content.news_promo.default
targetEntityType: block_content
bundle: news_promo
mode: default
content:
field_administration:
type: options_select
weight: 6
region: content
settings: { }
third_party_settings: { }
field_image:
type: media_library_widget
weight: 1
region: content
settings:
media_types: { }
third_party_settings: { }
field_link:
type: link_default
weight: 4
region: content
settings:
placeholder_url: ''
placeholder_title: ''
third_party_settings: { }
field_link_label:
type: options_select
weight: 5
region: content
settings: { }
third_party_settings: { }
field_promo_headline:
type: string_textfield_with_counter
weight: 2
region: content
settings:
size: 100
placeholder: ''
use_field_maxlength: true
maxlength: 0
counter_position: after
js_prevent_submit: true
count_html_characters: true
textcount_status_message: '<span class="remaining_count">@remaining_count</span> characters remaining'
third_party_settings: { }
field_promo_text:
type: string_textarea_with_counter
weight: 3
region: content
settings:
rows: 5
placeholder: ''
maxlength: 512
counter_position: after
js_prevent_submit: false
count_html_characters: true
textcount_status_message: '<span class="remaining_count">@remaining_count</span> characters remaining'
third_party_settings: { }
info:
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
moderation_state:
type: moderation_state_default
weight: 7
region: content
settings: { }
third_party_settings: { }
hidden: { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
uuid: 306b3750-3ba3-41f5-bbe4-83cd3210eec5
langcode: en
status: true
dependencies:
config:
- block_content.type.benefit_promo
- field.field.block_content.benefit_promo.field_administration
- field.field.block_content.benefit_promo.field_promo_cta
- field.field.block_content.benefit_promo.field_promo_headline
- field.field.block_content.benefit_promo.field_promo_text
module:
- entity_reference_revisions
id: block_content.benefit_promo.default
targetEntityType: block_content
bundle: benefit_promo
mode: default
content:
field_administration:
type: entity_reference_label
label: above
settings:
link: true
third_party_settings: { }
weight: 3
region: content
field_promo_cta:
type: entity_reference_revisions_entity_view
label: above
settings:
view_mode: default
link: ''
third_party_settings: { }
weight: 2
region: content
field_promo_headline:
type: string
label: above
settings:
link_to_entity: false
third_party_settings: { }
weight: 0
region: content
field_promo_text:
type: basic_string
label: above
settings: { }
third_party_settings: { }
weight: 1
region: content
hidden:
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
uuid: 6e3601ca-3106-4a2b-b452-a6446313e3ca
langcode: en
status: true
dependencies:
config:
- block_content.type.news_promo
- field.field.block_content.news_promo.field_administration
- field.field.block_content.news_promo.field_image
- field.field.block_content.news_promo.field_link
- field.field.block_content.news_promo.field_link_label
- field.field.block_content.news_promo.field_promo_headline
- field.field.block_content.news_promo.field_promo_text
- image.style.large
module:
- link
- media
- options
id: block_content.news_promo.default
targetEntityType: block_content
bundle: news_promo
mode: default
content:
field_administration:
type: entity_reference_label
label: above
settings:
link: true
third_party_settings: { }
weight: 4
region: content
field_image:
type: media_thumbnail
label: above
settings:
image_link: ''
image_style: large
image_loading:
attribute: lazy
third_party_settings: { }
weight: 3
region: content
field_link:
type: link
label: above
settings:
trim_length: 80
url_only: false
url_plain: false
rel: ''
target: ''
third_party_settings: { }
weight: 6
region: content
field_link_label:
type: list_default
label: above
settings: { }
third_party_settings: { }
weight: 5
region: content
field_promo_headline:
type: string
label: above
settings:
link_to_entity: false
third_party_settings: { }
weight: 0
region: content
field_promo_text:
type: basic_string
label: above
settings: { }
third_party_settings: { }
weight: 1
region: content
hidden:
search_api_excerpt: true
26 changes: 26 additions & 0 deletions config/sync/entityqueue.entity_queue.home_page_hero.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
uuid: 45229e5d-bd7c-4dab-9838-0b05322e9e31
langcode: en
status: true
dependencies:
module:
- block_content
id: home_page_hero
label: 'Home page hero'
handler: simple
handler_configuration: { }
entity_settings:
target_type: block_content
handler: 'default:block_content'
handler_settings:
target_bundles:
benefit_promo: benefit_promo
sort:
field: _none
direction: ASC
auto_create: false
auto_create_bundle: ''
queue_settings:
min_size: 1
max_size: 1
act_as_queue: false
reverse: false
26 changes: 26 additions & 0 deletions config/sync/entityqueue.entity_queue.home_page_news_spotlight.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
uuid: 94a2b406-5f2d-4c83-9cd6-3b20a9e7c98f
langcode: en
status: true
dependencies:
module:
- block_content
id: home_page_news_spotlight
label: 'Home page news spotlight'
handler: simple
handler_configuration: { }
entity_settings:
target_type: block_content
handler: 'default:block_content'
handler_settings:
target_bundles:
news_promo: news_promo
sort:
field: _none
direction: ASC
auto_create: false
auto_create_bundle: ''
queue_settings:
min_size: 1
max_size: 1
act_as_queue: false
reverse: false
1 change: 1 addition & 0 deletions config/sync/feature_toggle.features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ features:
feature_all_hub_side_navs: FEATURE_ALL_HUB_SIDE_NAVS
feature_single_value_field_link: FEATURE_SINGLE_VALUE_FIELD_LINK
feature_health_connect_number: FEATURE_HEALTH_CONNECT_NUMBER
feature_homepage_v2: FEATURE_HOMEPAGE_V2
Loading

0 comments on commit cc406ae

Please sign in to comment.