From d8cdfc18c3e19434fe7992fbfebd7fc1abf4a2c0 Mon Sep 17 00:00:00 2001 From: cathybaptista <161740096+cathybaptista@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:27:13 -0500 Subject: [PATCH 01/10] DIGITAL-60: Change glossary link to entity reference, should not trigger any js for now. --- ...ntity_form_display.node.guides.default.yml | 7 ++++++ ...ntity_view_display.node.guides.default.yml | 8 +++++++ ...entity_view_display.node.guides.teaser.yml | 2 ++ ...d.field.node.guides.field_hcd_glossary.yml | 23 +++++++++++++++++++ .../field.storage.node.field_hcd_glossary.yml | 20 ++++++++++++++++ .../templates/node/node--guides.html.twig | 4 ++++ 6 files changed, 64 insertions(+) create mode 100644 config/sync/field.field.node.guides.field_hcd_glossary.yml create mode 100644 config/sync/field.storage.node.field_hcd_glossary.yml diff --git a/config/sync/core.entity_form_display.node.guides.default.yml b/config/sync/core.entity_form_display.node.guides.default.yml index 9fff09ea..bc50c75b 100644 --- a/config/sync/core.entity_form_display.node.guides.default.yml +++ b/config/sync/core.entity_form_display.node.guides.default.yml @@ -7,6 +7,7 @@ dependencies: - field.field.node.guides.field_deck - field.field.node.guides.field_featured_image - field.field.node.guides.field_guide_weight + - field.field.node.guides.field_hcd_glossary - field.field.node.guides.field_kicker - field.field.node.guides.field_page_weight - field.field.node.guides.field_primary_image @@ -69,6 +70,12 @@ content: settings: placeholder: '' third_party_settings: { } + field_hcd_glossary: + type: options_select + weight: 51 + region: content + settings: { } + third_party_settings: { } field_kicker: type: string_textfield weight: 1 diff --git a/config/sync/core.entity_view_display.node.guides.default.yml b/config/sync/core.entity_view_display.node.guides.default.yml index 073c2e67..21aaaed8 100644 --- a/config/sync/core.entity_view_display.node.guides.default.yml +++ b/config/sync/core.entity_view_display.node.guides.default.yml @@ -7,6 +7,7 @@ dependencies: - field.field.node.guides.field_deck - field.field.node.guides.field_featured_image - field.field.node.guides.field_guide_weight + - field.field.node.guides.field_hcd_glossary - field.field.node.guides.field_kicker - field.field.node.guides.field_page_weight - field.field.node.guides.field_primary_image @@ -59,6 +60,13 @@ content: third_party_settings: { } weight: 127 region: content + field_hcd_glossary: + type: entity_reference_entity_id + label: hidden + settings: { } + third_party_settings: { } + weight: 128 + region: content field_kicker: type: string label: above diff --git a/config/sync/core.entity_view_display.node.guides.teaser.yml b/config/sync/core.entity_view_display.node.guides.teaser.yml index c8354e34..9c3fad1e 100644 --- a/config/sync/core.entity_view_display.node.guides.teaser.yml +++ b/config/sync/core.entity_view_display.node.guides.teaser.yml @@ -8,6 +8,7 @@ dependencies: - field.field.node.guides.field_deck - field.field.node.guides.field_featured_image - field.field.node.guides.field_guide_weight + - field.field.node.guides.field_hcd_glossary - field.field.node.guides.field_kicker - field.field.node.guides.field_page_weight - field.field.node.guides.field_primary_image @@ -45,6 +46,7 @@ hidden: field_deck: true field_featured_image: true field_guide_weight: true + field_hcd_glossary: true field_kicker: true field_page_weight: true field_primary_image: true diff --git a/config/sync/field.field.node.guides.field_hcd_glossary.yml b/config/sync/field.field.node.guides.field_hcd_glossary.yml new file mode 100644 index 00000000..420afd7a --- /dev/null +++ b/config/sync/field.field.node.guides.field_hcd_glossary.yml @@ -0,0 +1,23 @@ +uuid: 051af63b-df7a-49f4-8609-9600eb7ec67f +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_hcd_glossary + - node.type.guides +id: node.guides.field_hcd_glossary +field_name: field_hcd_glossary +entity_type: node +bundle: guides +label: 'HCD Glossary' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_vocabulary' + handler_settings: + target_bundles: null + auto_create: false +field_type: entity_reference diff --git a/config/sync/field.storage.node.field_hcd_glossary.yml b/config/sync/field.storage.node.field_hcd_glossary.yml new file mode 100644 index 00000000..4cc9a8f2 --- /dev/null +++ b/config/sync/field.storage.node.field_hcd_glossary.yml @@ -0,0 +1,20 @@ +uuid: 582cdc00-7855-441f-b6f4-6b0efe4f403d +langcode: en +status: true +dependencies: + module: + - node + - taxonomy +id: node.field_hcd_glossary +field_name: field_hcd_glossary +entity_type: node +type: entity_reference +settings: + target_type: taxonomy_vocabulary +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/web/themes/custom/digital_gov/templates/node/node--guides.html.twig b/web/themes/custom/digital_gov/templates/node/node--guides.html.twig index 0ab44277..033a8e8a 100644 --- a/web/themes/custom/digital_gov/templates/node/node--guides.html.twig +++ b/web/themes/custom/digital_gov/templates/node/node--guides.html.twig @@ -75,6 +75,10 @@ {{ $guideData = index $.Site.Data.guidenav (.Params.guide) }} {% endif %} #} + {# this sets up the button to call the JS to show the glossary #} + {% if content.field_hcd_glossary['#title'] is not null %} + + {% endif %} {% if guideData.showInPageNav %}
Human-centered design (HCD) is a qualitative research method that helps groups solve problems and seek solutions that prioritize customer needs over a system’s needs. It’s also a design and management framework to develop solutions to problems by involving the human perspective in all steps of the problem-solving process.
HCD involves four phases of sequential work: discovery, design, delivery, and measurement. HCD is also cyclical. Once a design solution is launched, you should measure its effectiveness against initial and intended aims, and continually tweak it to improve the solution over time. HCD recognizes that people and their needs are dynamic and changing, and so solutions must also adapt to changing needs.
' + format: html + summary: '' + field_deck: + - + value: 'Everything you need to know to get started with our human-centered design series
' + format: single_inline_html + field_guide_weight: + - + value: 5 + field_hcd_glossary: + - + target_id: hcd_glossary + field_page_weight: + - + value: 0 + field_primary_image: + - + entity: b2f35ae8-423f-428b-865d-e420313e7a81 + field_summary: + - + value: 'Everything you need to know to get started with our human-centered design series
' + format: single_inline_html + field_summary_box: + - + value: false From 330894aa80ba97c5f18a56b118c9f53f0437e74e Mon Sep 17 00:00:00 2001 From: cathybaptista <161740096+cathybaptista@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:18:02 -0500 Subject: [PATCH 03/10] DIGITAL-61: Glossary button should be in header, not content. --- .../custom/digital_gov/templates/node/node--guides.html.twig | 3 --- .../templates/partials/guides/guide-header.html.twig | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/web/themes/custom/digital_gov/templates/node/node--guides.html.twig b/web/themes/custom/digital_gov/templates/node/node--guides.html.twig index 033a8e8a..81b8d9a5 100644 --- a/web/themes/custom/digital_gov/templates/node/node--guides.html.twig +++ b/web/themes/custom/digital_gov/templates/node/node--guides.html.twig @@ -76,9 +76,6 @@ {% endif %} #} {# this sets up the button to call the JS to show the glossary #} - {% if content.field_hcd_glossary['#title'] is not null %} - - {% endif %} {% if guideData.showInPageNav %}