Skip to content

Commit

Permalink
VACMS-14700: Updates UI per Figma
Browse files Browse the repository at this point in the history
  • Loading branch information
omahane authored and swirtSJW committed Nov 19, 2023
1 parent 6e206ab commit ca22eaf
Show file tree
Hide file tree
Showing 11 changed files with 101 additions and 31 deletions.
36 changes: 22 additions & 14 deletions config/sync/core.entity_form_display.node.vba_facility.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- field.field.node.vba_facility.field_alert_type
- field.field.node.vba_facility.field_banner_content
- field.field.node.vba_facility.field_banner_title
- field.field.node.vba_facility.field_banner_types_description
- field.field.node.vba_facility.field_cc_benefit_office_hours_va
- field.field.node.vba_facility.field_cc_benefits_hotline
- field.field.node.vba_facility.field_cc_cant_find_benefits
Expand All @@ -32,9 +33,9 @@ dependencies:
- field.field.node.vba_facility.field_phone_number
- field.field.node.vba_facility.field_prepare_for_visit
- field.field.node.vba_facility.field_shared_vha_location
- field.field.node.vba_facility.field_show_banner
- field.field.node.vba_facility.field_table_of_contents
- field.field.node.vba_facility.field_timezone
- field.field.node.vba_facility.field_show_banner
- node.type.vba_facility
- workflows.workflow.editorial
module:
Expand Down Expand Up @@ -304,17 +305,18 @@ third_party_settings:
group_banner:
children:
- field_show_banner
- field_banner_types_description
- field_alert_type
- field_dismissible_option
- field_banner_title
- field_banner_content
label: Banner
label: 'Banner alert'
region: content
parent_name: ''
weight: 2
format_type: detailswithimage
format_settings:
description: 'This optional segment allows you to add a banner to the VBA facility.'
description: 'This optional segment allows you to add a banner alert to the VBA facility.'
open: '1'
visual_guide_file_name: ''
visual_guide_alt_text: ''
Expand All @@ -341,13 +343,13 @@ content:
third_party_settings: { }
field_alert_type:
type: options_select
weight: 28
weight: 29
region: content
settings: { }
third_party_settings: { }
field_banner_content:
type: text_textarea_with_counter
weight: 31
weight: 32
region: content
settings:
rows: 5
Expand All @@ -364,12 +366,18 @@ content:
hide_guidelines: '1'
field_banner_title:
type: string_textfield
weight: 30
weight: 31
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
field_banner_types_description:
type: markup
weight: 28
region: content
settings: { }
third_party_settings: { }
field_cc_benefit_office_hours_va:
type: entity_field_fetch_widget
weight: 13
Expand Down Expand Up @@ -444,7 +452,7 @@ content:
third_party_settings: { }
field_dismissible_option:
type: options_buttons
weight: 29
weight: 30
region: content
settings: { }
third_party_settings: { }
Expand Down Expand Up @@ -584,6 +592,13 @@ content:
size: 60
placeholder: ''
third_party_settings: { }
field_show_banner:
type: boolean_checkbox
weight: 27
region: content
settings:
display_label: true
third_party_settings: { }
field_table_of_contents:
type: markup
weight: 0
Expand All @@ -596,13 +611,6 @@ content:
region: content
settings: { }
third_party_settings: { }
field_show_banner:
type: boolean_checkbox
weight: 27
region: content
settings:
display_label: true
third_party_settings: { }
flag:
weight: 6
region: content
Expand Down
18 changes: 10 additions & 8 deletions config/sync/core.entity_view_display.node.vba_facility.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- field.field.node.vba_facility.field_alert_type
- field.field.node.vba_facility.field_banner_content
- field.field.node.vba_facility.field_banner_title
- field.field.node.vba_facility.field_banner_types_description
- field.field.node.vba_facility.field_cc_benefit_office_hours_va
- field.field.node.vba_facility.field_cc_benefits_hotline
- field.field.node.vba_facility.field_cc_cant_find_benefits
Expand All @@ -32,9 +33,9 @@ dependencies:
- field.field.node.vba_facility.field_phone_number
- field.field.node.vba_facility.field_prepare_for_visit
- field.field.node.vba_facility.field_shared_vha_location
- field.field.node.vba_facility.field_show_banner
- field.field.node.vba_facility.field_table_of_contents
- field.field.node.vba_facility.field_timezone
- field.field.node.vba_facility.field_show_banner
- node.type.vba_facility
module:
- address
Expand Down Expand Up @@ -515,13 +516,6 @@ content:
third_party_settings: { }
weight: 12
region: content
field_timezone:
type: basic_string
label: above
settings: { }
third_party_settings: { }
weight: 9
region: content
field_show_banner:
type: boolean
label: above
Expand All @@ -532,10 +526,18 @@ content:
third_party_settings: { }
weight: 14
region: content
field_timezone:
type: basic_string
label: above
settings: { }
third_party_settings: { }
weight: 9
region: content
hidden:
breadcrumbs: true
content_moderation_control: true
field_administration: true
field_banner_types_description: true
field_facility_vba_classificatio: true
field_geolocation: true
field_last_saved_by_an_editor: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- field.field.node.vba_facility.field_alert_type
- field.field.node.vba_facility.field_banner_content
- field.field.node.vba_facility.field_banner_title
- field.field.node.vba_facility.field_banner_types_description
- field.field.node.vba_facility.field_cc_benefit_office_hours_va
- field.field.node.vba_facility.field_cc_benefits_hotline
- field.field.node.vba_facility.field_cc_cant_find_benefits
Expand All @@ -33,9 +34,9 @@ dependencies:
- field.field.node.vba_facility.field_phone_number
- field.field.node.vba_facility.field_prepare_for_visit
- field.field.node.vba_facility.field_shared_vha_location
- field.field.node.vba_facility.field_show_banner
- field.field.node.vba_facility.field_table_of_contents
- field.field.node.vba_facility.field_timezone
- field.field.node.vba_facility.field_show_banner
- node.type.vba_facility
module:
- address
Expand Down Expand Up @@ -251,6 +252,7 @@ hidden:
field_alert_type: true
field_banner_content: true
field_banner_title: true
field_banner_types_description: true
field_cc_benefit_office_hours_va: true
field_cc_benefits_hotline: true
field_cc_cant_find_benefits: true
Expand All @@ -266,8 +268,8 @@ hidden:
field_operating_status_facility: true
field_operating_status_more_info: true
field_prepare_for_visit: true
field_table_of_contents: true
field_show_banner: true
field_table_of_contents: true
flag_awaiting_csv: true
flag_awaiting_editor: true
flag_awaiting_redirect: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- field.field.node.vba_facility.field_alert_type
- field.field.node.vba_facility.field_banner_content
- field.field.node.vba_facility.field_banner_title
- field.field.node.vba_facility.field_banner_types_description
- field.field.node.vba_facility.field_cc_benefit_office_hours_va
- field.field.node.vba_facility.field_cc_benefits_hotline
- field.field.node.vba_facility.field_cc_cant_find_benefits
Expand All @@ -33,9 +34,9 @@ dependencies:
- field.field.node.vba_facility.field_phone_number
- field.field.node.vba_facility.field_prepare_for_visit
- field.field.node.vba_facility.field_shared_vha_location
- field.field.node.vba_facility.field_show_banner
- field.field.node.vba_facility.field_table_of_contents
- field.field.node.vba_facility.field_timezone
- field.field.node.vba_facility.field_show_banner
- node.type.vba_facility
module:
- address
Expand Down Expand Up @@ -184,6 +185,7 @@ hidden:
field_alert_type: true
field_banner_content: true
field_banner_title: true
field_banner_types_description: true
field_cc_benefit_office_hours_va: true
field_cc_benefits_hotline: true
field_cc_cant_find_benefits: true
Expand All @@ -203,9 +205,9 @@ hidden:
field_office: true
field_prepare_for_visit: true
field_shared_vha_location: true
field_show_banner: true
field_table_of_contents: true
field_timezone: true
field_show_banner: true
flag_awaiting_csv: true
flag_awaiting_editor: true
flag_awaiting_redirect: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- field.field.node.vba_facility.field_alert_type
- field.field.node.vba_facility.field_banner_content
- field.field.node.vba_facility.field_banner_title
- field.field.node.vba_facility.field_banner_types_description
- field.field.node.vba_facility.field_cc_benefit_office_hours_va
- field.field.node.vba_facility.field_cc_benefits_hotline
- field.field.node.vba_facility.field_cc_cant_find_benefits
Expand All @@ -33,9 +34,9 @@ dependencies:
- field.field.node.vba_facility.field_phone_number
- field.field.node.vba_facility.field_prepare_for_visit
- field.field.node.vba_facility.field_shared_vha_location
- field.field.node.vba_facility.field_show_banner
- field.field.node.vba_facility.field_table_of_contents
- field.field.node.vba_facility.field_timezone
- field.field.node.vba_facility.field_show_banner
- node.type.vba_facility
module:
- user
Expand All @@ -61,6 +62,7 @@ hidden:
field_alert_type: true
field_banner_content: true
field_banner_title: true
field_banner_types_description: true
field_cc_benefit_office_hours_va: true
field_cc_benefits_hotline: true
field_cc_cant_find_benefits: true
Expand All @@ -85,9 +87,9 @@ hidden:
field_phone_number: true
field_prepare_for_visit: true
field_shared_vha_location: true
field_show_banner: true
field_table_of_contents: true
field_timezone: true
field_show_banner: true
flag_awaiting_csv: true
flag_awaiting_editor: true
flag_awaiting_redirect: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ id: node.vba_facility.field_alert_type
field_name: field_alert_type
entity_type: node
bundle: vba_facility
label: 'Banner type'
label: 'Banner alert type'
description: ''
required: false
translatable: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ id: node.vba_facility.field_banner_content
field_name: field_banner_content
entity_type: node
bundle: vba_facility
label: 'Banner content'
label: 'Banner alert message'
description: ''
required: false
translatable: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ id: node.vba_facility.field_banner_title
field_name: field_banner_title
entity_type: node
bundle: vba_facility
label: 'Banner title'
label: 'Banner alert headline'
description: ''
required: false
translatable: false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
uuid: 917a8c24-9096-4700-b88b-6f70c92712b6
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_banner_types_description
- node.type.vba_facility
module:
- markup
- tmgmt_content
third_party_settings:
tmgmt_content:
excluded: false
id: node.vba_facility.field_banner_types_description
field_name: field_banner_types_description
entity_type: node
bundle: vba_facility
label: 'Banner types description'
description: ''
required: false
translatable: false
default_value:
- { }
default_value_callback: ''
settings:
markup:
value: "<p>Two types of Banner alerts are supported:</p>\r\n\r\n<ol>\r\n\t<li><strong>Informational alerts:</strong> These are used to provide helpful information or call attention to an announcement.</li>\r\n\t<li><strong>Warning alertsP</strong> These are used to warn a user and call out negative consequences. Warning alerts are necessary when something has gone wrong.</li>\r\n</ol>\r\n<p>You can read more about these banner types on the site in the <a href=\"\" target=\"_blank\")>VA Design System (opens in a new window)</a>, or learn how to create them in the CMS in the <a href=\"\" target=\"_blank\">Knowledge Base (opens in a new window)</a>.</p>"
format: rich_text
field_type: markup
19 changes: 19 additions & 0 deletions config/sync/field.storage.node.field_banner_types_description.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: dcc7ce28-6582-4a59-97dd-39400f0cdf68
langcode: en
status: true
dependencies:
module:
- markup
- node
id: node.field_banner_types_description
field_name: field_banner_types_description
entity_type: node
type: markup
settings: { }
module: markup
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ public function addStateManagementToBannerFields(FormIdAlterEvent $event) {
$selector = ':input[name="field_show_banner[value]"]';

// Show and require the banner fields when show banner is checked.
$form['field_banner_types_description']['#states'] = [
'visible' => [
[$selector => ['checked' => TRUE]],
],
];

$form['field_alert_type']['widget']['#states'] = [
'required' => [
[$selector => ['checked' => TRUE]],
Expand Down

0 comments on commit ca22eaf

Please sign in to comment.