diff --git a/config/sync/core.entity_view_display.node.document.highlighted.yml b/config/sync/core.entity_view_display.node.document.highlighted.yml new file mode 100644 index 0000000000..66ef808670 --- /dev/null +++ b/config/sync/core.entity_view_display.node.document.highlighted.yml @@ -0,0 +1,137 @@ +uuid: 5fbb7f17-0be8-4c70-8a5c-ceb806015a8f +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.highlighted + - field.field.node.document.body + - field.field.node.document.field_comments + - field.field.node.document.field_document_logo + - field.field.node.document.field_document_publication_date + - field.field.node.document.field_document_spatial_coverage + - field.field.node.document.field_file + - field.field.node.document.field_keywords + - field.field.node.document.field_licence + - field.field.node.document.field_shared_in + - field.field.node.document.field_short_title + - field.field.node.document.field_site_featured + - field.field.node.document.field_state + - field.field.node.document.field_topic + - field.field.node.document.field_type + - field.field.node.document.og_audience + - node.type.document + - responsive_image.styles.highlighted_content + module: + - field_delimiter + - field_formatter_range + - field_group + - joinup_html_stripper + - layout_builder + - responsive_image + - template_suggestion + - user +third_party_settings: + field_group: + group_categorisation: + children: + - field_document_publication_date + - field_licence + - field_short_title + - field_type + parent_name: '' + weight: 5 + format_type: html_element + format_settings: + id: '' + classes: '' + element: div + show_label: true + label_element: h3 + attributes: '' + effect: none + speed: fast + label: Categorisation + region: hidden + group_attachment: + children: + - field_file + parent_name: '' + weight: 7 + format_type: html_element + format_settings: + id: '' + classes: '' + element: div + show_label: true + label_element: h3 + attributes: '' + effect: none + speed: fast + label: Attachment + region: hidden + layout_builder: + allow_custom: false + enabled: false +_core: + default_config_hash: IBVftmfYLkfapLokxuyLrv1me4toJj5yidZu0ixGxQM +id: node.document.highlighted +targetEntityType: node +bundle: document +mode: highlighted +content: + body: + label: hidden + type: joinup_html_stripper_stripped + weight: 2 + settings: + trim_length: 200 + third_party_settings: + template_suggestion: + template_suggestion: '' + region: content + field_document_logo: + type: responsive_image + weight: 0 + region: content + label: hidden + settings: + responsive_image_style: highlighted_content + image_link: '' + third_party_settings: + template_suggestion: + template_suggestion: '' + field_topic: + type: entity_reference_label + weight: 1 + region: content + label: hidden + settings: + link: true + third_party_settings: + field_delimiter: + delimiter: '' + field_formatter_range: + order: 0 + limit: 2 + offset: 0 + template_suggestion: + template_suggestion: '' +hidden: + field_comments: true + field_document_publication_date: true + field_document_spatial_coverage: true + field_file: true + field_keywords: true + field_licence: true + field_shared_in: true + field_short_title: true + field_site_featured: true + field_state: true + field_type: true + langcode: true + links: true + og_audience: true + published_at: true + read_more: true + report: true + share_link: true diff --git a/config/sync/core.entity_view_display.node.event.highlighted.yml b/config/sync/core.entity_view_display.node.event.highlighted.yml index f6d4961202..fc54593a34 100644 --- a/config/sync/core.entity_view_display.node.event.highlighted.yml +++ b/config/sync/core.entity_view_display.node.event.highlighted.yml @@ -27,9 +27,13 @@ dependencies: - field.field.node.event.field_topic - field.field.node.event.og_audience - node.type.event + - responsive_image.styles.highlighted_content module: - - joinup_core + - field_delimiter + - field_formatter_range + - joinup_html_stripper - layout_builder + - responsive_image - template_suggestion - user third_party_settings: @@ -41,29 +45,50 @@ targetEntityType: node bundle: event mode: highlighted content: - field_event_date: + body: + type: joinup_html_stripper_stripped + weight: 2 + region: content + label: hidden + settings: + trim_length: 200 + third_party_settings: + template_suggestion: + template_suggestion: '' + field_event_logo: + type: responsive_image weight: 0 + region: content label: hidden settings: - timezone_override: '' - separator: to - default_format: d/m/Y - day_diff_format: d - month_diff_format: d/m - year_diff_format: d/m/Y + responsive_image_style: highlighted_content + image_link: '' third_party_settings: template_suggestion: template_suggestion: '' - type: daterange_condensed + field_topic: + type: entity_reference_label + weight: 1 region: content + label: hidden + settings: + link: true + third_party_settings: + field_delimiter: + delimiter: '' + field_formatter_range: + order: 0 + limit: 2 + offset: 0 + template_suggestion: + template_suggestion: '' hidden: - body: true field_attachment: true field_comments: true field_event_agenda: true field_event_contact_email: true field_event_coordinates: true - field_event_logo: true + field_event_date: true field_event_online_location: true field_event_spatial_coverage: true field_event_web_url: true @@ -76,7 +101,6 @@ hidden: field_short_title: true field_site_featured: true field_state: true - field_topic: true langcode: true links: true og_audience: true diff --git a/config/sync/core.entity_view_display.node.event.highlighted_event.yml b/config/sync/core.entity_view_display.node.event.highlighted_event.yml new file mode 100644 index 0000000000..dfd008cb06 --- /dev/null +++ b/config/sync/core.entity_view_display.node.event.highlighted_event.yml @@ -0,0 +1,86 @@ +uuid: c8a8b7b3-2996-4276-81e9-f8ca6a274733 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.highlighted_event + - field.field.node.event.body + - field.field.node.event.field_attachment + - field.field.node.event.field_comments + - field.field.node.event.field_event_agenda + - field.field.node.event.field_event_contact_email + - field.field.node.event.field_event_coordinates + - field.field.node.event.field_event_date + - field.field.node.event.field_event_logo + - field.field.node.event.field_event_online_location + - field.field.node.event.field_event_spatial_coverage + - field.field.node.event.field_event_web_url + - field.field.node.event.field_keywords + - field.field.node.event.field_location + - field.field.node.event.field_organisation + - field.field.node.event.field_organisation_type + - field.field.node.event.field_scope + - field.field.node.event.field_shared_in + - field.field.node.event.field_short_title + - field.field.node.event.field_site_featured + - field.field.node.event.field_state + - field.field.node.event.field_topic + - field.field.node.event.og_audience + - node.type.event + module: + - joinup_core + - layout_builder + - template_suggestion + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.event.highlighted_event +targetEntityType: node +bundle: event +mode: highlighted_event +content: + field_event_date: + weight: 0 + label: hidden + settings: + timezone_override: '' + separator: to + default_format: d/m/Y + day_diff_format: d + month_diff_format: d/m + year_diff_format: d/m/Y + third_party_settings: + template_suggestion: + template_suggestion: '' + type: daterange_condensed + region: content +hidden: + body: true + field_attachment: true + field_comments: true + field_event_agenda: true + field_event_contact_email: true + field_event_coordinates: true + field_event_logo: true + field_event_online_location: true + field_event_spatial_coverage: true + field_event_web_url: true + field_keywords: true + field_location: true + field_organisation: true + field_organisation_type: true + field_scope: true + field_shared_in: true + field_short_title: true + field_site_featured: true + field_state: true + field_topic: true + langcode: true + links: true + og_audience: true + published_at: true + read_more: true + report: true + share_link: true diff --git a/config/sync/core.entity_view_display.node.news.highlighted.yml b/config/sync/core.entity_view_display.node.news.highlighted.yml new file mode 100644 index 0000000000..ebfb4a0c3c --- /dev/null +++ b/config/sync/core.entity_view_display.node.news.highlighted.yml @@ -0,0 +1,113 @@ +uuid: 31b72862-7d67-46f5-8bb4-798fe4a2818c +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.highlighted + - field.field.node.news.body + - field.field.node.news.field_attachment + - field.field.node.news.field_comments + - field.field.node.news.field_keywords + - field.field.node.news.field_news_headline + - field.field.node.news.field_news_logo + - field.field.node.news.field_news_referenced_solution + - field.field.node.news.field_news_source_url + - field.field.node.news.field_news_spatial_coverage + - field.field.node.news.field_shared_in + - field.field.node.news.field_site_featured + - field.field.node.news.field_state + - field.field.node.news.field_topic + - field.field.node.news.og_audience + - node.type.news + - responsive_image.styles.highlighted_content + module: + - field_delimiter + - field_formatter_range + - field_group + - joinup_html_stripper + - layout_builder + - responsive_image + - template_suggestion + - user +third_party_settings: + field_group: + group_references: + children: + - field_news_source_url + parent_name: '' + weight: 19 + format_type: html_element + format_settings: + id: '' + classes: '' + element: div + show_label: true + label_element: h3 + attributes: '' + effect: none + speed: fast + label: References + region: hidden + layout_builder: + allow_custom: false + enabled: false +id: node.news.highlighted +targetEntityType: node +bundle: news +mode: highlighted +content: + body: + label: hidden + type: joinup_html_stripper_stripped + weight: 2 + settings: + trim_length: 200 + third_party_settings: + template_suggestion: + template_suggestion: '' + region: content + field_news_logo: + type: responsive_image + weight: 0 + region: content + label: hidden + settings: + responsive_image_style: highlighted_content + image_link: content + third_party_settings: + template_suggestion: + template_suggestion: '' + field_topic: + type: entity_reference_label + weight: 1 + region: content + label: hidden + settings: + link: true + third_party_settings: + field_delimiter: + delimiter: '' + field_formatter_range: + order: 0 + limit: 2 + offset: 0 + template_suggestion: + template_suggestion: '' +hidden: + field_attachment: true + field_comments: true + field_keywords: true + field_news_headline: true + field_news_referenced_solution: true + field_news_source_url: true + field_news_spatial_coverage: true + field_shared_in: true + field_site_featured: true + field_state: true + langcode: true + links: true + og_audience: true + published_at: true + read_more: true + report: true + share_link: true diff --git a/config/sync/core.entity_view_display.rdf_entity.solution.highlighted.yml b/config/sync/core.entity_view_display.rdf_entity.solution.highlighted.yml index 91de51cfd7..74bc9a7c31 100644 --- a/config/sync/core.entity_view_display.rdf_entity.solution.highlighted.yml +++ b/config/sync/core.entity_view_display.rdf_entity.solution.highlighted.yml @@ -46,14 +46,14 @@ dependencies: - field.field.rdf_entity.solution.field_status - field.field.rdf_entity.solution.field_topic - rdf_entity.rdfentity.solution - - responsive_image.styles.highlighted_solution + - responsive_image.styles.highlighted_content module: - field_delimiter - field_formatter_range - field_group + - joinup_html_stripper - layout_builder - responsive_image - - smart_trim - template_suggestion - user third_party_settings: @@ -83,33 +83,22 @@ bundle: solution mode: highlighted content: field_is_description: - type: smart_trim - weight: 3 - region: content label: hidden + type: joinup_html_stripper_stripped + weight: 2 settings: trim_length: 200 - trim_type: chars - trim_suffix: '' - wrap_class: trimmed - more_text: More - more_class: more-link - trim_options: - text: true - trim_zero: false - wrap_output: false - more_link: false - summary_handler: full third_party_settings: template_suggestion: template_suggestion: '' + region: content field_is_logo: type: responsive_image weight: 0 region: content label: hidden settings: - responsive_image_style: highlighted_solution + responsive_image_style: highlighted_content image_link: content third_party_settings: template_suggestion: diff --git a/config/sync/core.entity_view_mode.node.highlighted_event.yml b/config/sync/core.entity_view_mode.node.highlighted_event.yml new file mode 100644 index 0000000000..eb158adab9 --- /dev/null +++ b/config/sync/core.entity_view_mode.node.highlighted_event.yml @@ -0,0 +1,10 @@ +uuid: f0f4ebec-5d74-4af5-8676-7c741149ec6d +langcode: en +status: true +dependencies: + module: + - node +id: node.highlighted_event +label: 'Highlighted event' +targetEntityType: node +cache: true diff --git a/config/sync/entityqueue.entity_queue.highlighted_solution.yml b/config/sync/entityqueue.entity_queue.highlighted_content.yml similarity index 53% rename from config/sync/entityqueue.entity_queue.highlighted_solution.yml rename to config/sync/entityqueue.entity_queue.highlighted_content.yml index 3b3a5d60f6..aa33fe70db 100644 --- a/config/sync/entityqueue.entity_queue.highlighted_solution.yml +++ b/config/sync/entityqueue.entity_queue.highlighted_content.yml @@ -1,23 +1,25 @@ -uuid: c40d0c80-bf7c-4f00-831e-b77871742309 +uuid: d51790d4-39e1-4b51-b2f3-9f9621ff06e6 langcode: en status: true dependencies: module: - - rdf_entity -id: highlighted_solution -label: 'Highlighted solution' + - node +id: highlighted_content +label: 'Highlighted content' handler: simple handler_configuration: { } entity_settings: - target_type: rdf_entity - handler: 'default:rdf_entity' + target_type: node + handler: 'default:node' handler_settings: target_bundles: - solution: solution + document: document + event: event + news: news sort: field: _none auto_create: false - auto_create_bundle: '' + auto_create_bundle: event queue_settings: min_size: 1 max_size: 1 diff --git a/config/sync/page_manager.page_variant.homepage-layout_builder-0.yml b/config/sync/page_manager.page_variant.homepage-layout_builder-0.yml index 4a422cc7f2..fb4f561dae 100644 --- a/config/sync/page_manager.page_variant.homepage-layout_builder-0.yml +++ b/config/sync/page_manager.page_variant.homepage-layout_builder-0.yml @@ -31,18 +31,18 @@ variant_settings: context_mapping: { } additional: { } weight: 0 - 204e8ccb-280d-4ee4-b598-74b9f96d6496: - uuid: 204e8ccb-280d-4ee4-b598-74b9f96d6496 + 7807ee72-f98e-46bb-80d9-fe1d2b6cd8de: + uuid: 7807ee72-f98e-46bb-80d9-fe1d2b6cd8de region: second configuration: - id: 'entityqueue_block:highlighted_solution' - label: 'Highlighted solution' + id: 'entityqueue_block:highlighted_content' + label: 'Highlighted content' provider: entityqueue_block label_display: visible view_mode: highlighted context_mapping: { } additional: { } - weight: 0 + weight: 1 third_party_settings: { } - layout_id: joinup_layout_twocol_60_40 @@ -70,7 +70,7 @@ variant_settings: label: 'Highlighted event' provider: entityqueue_block label_display: visible - view_mode: highlighted + view_mode: highlighted_event context_mapping: { } additional: { } weight: 0 diff --git a/config/sync/responsive_image.styles.highlighted_solution.yml b/config/sync/responsive_image.styles.highlighted_content.yml similarity index 97% rename from config/sync/responsive_image.styles.highlighted_solution.yml rename to config/sync/responsive_image.styles.highlighted_content.yml index 7cc3d325a9..11351d344b 100644 --- a/config/sync/responsive_image.styles.highlighted_solution.yml +++ b/config/sync/responsive_image.styles.highlighted_content.yml @@ -20,8 +20,8 @@ dependencies: - image.style.xxl_col_5_2x theme: - ventuno -id: highlighted_solution -label: 'Highlighted solution' +id: highlighted_content +label: 'Highlighted content' image_style_mappings: - breakpoint_id: ventuno.xl diff --git a/config/sync/user.role.moderator.yml b/config/sync/user.role.moderator.yml index c1fbd7b97c..3604caae0e 100644 --- a/config/sync/user.role.moderator.yml +++ b/config/sync/user.role.moderator.yml @@ -232,8 +232,8 @@ permissions: - 'update any simple_block block content' - 'update collection_settings meta-entity' - 'update discover_topics entityqueue' + - 'update highlighted_content entityqueue' - 'update highlighted_event entityqueue' - - 'update highlighted_solution entityqueue' - 'update paragraph content iframe' - 'update paragraph content json_map' - 'update site alerts' diff --git a/config/sync/views.view.curated_content_listings.yml b/config/sync/views.view.curated_content_listings.yml index 8da28174ca..c164d123a6 100644 --- a/config/sync/views.view.curated_content_listings.yml +++ b/config/sync/views.view.curated_content_listings.yml @@ -24,8 +24,8 @@ display: options: permissions: - 'update discover_topics entityqueue' + - 'update highlighted_content entityqueue' - 'update highlighted_event entityqueue' - - 'update highlighted_solution entityqueue' - 'update spotlight entityqueue' operator: or cache: diff --git a/tests/behat.yml.dist b/tests/behat.yml.dist index edaab95926..21c9383cb9 100644 --- a/tests/behat.yml.dist +++ b/tests/behat.yml.dist @@ -100,8 +100,8 @@ default: region_map: Administration toolbar: '#toolbar-administration' Comment: '.comments-section' - Content listing field filter form: '.field--name-field-content-listing' Contact information inline form: '#edit-field-ar-contact-information-wrapper' + Content listing field filter form: '.field--name-field-content-listing' Content: '.section--content-middle, main .layout-content' Cookie consent banner: '#cookie-consent-banner' Discover topics block: '.block-views-blockdiscover-topics-block' @@ -112,14 +112,14 @@ default: Hamburger menu: 'nav.joinup-navbar ul.navbar-nav ul.accordion-list' Header menu: '#block-joinup-theme-main-menu' Header: '.section--featured, .section-header' + Highlighted content: '.block-entityqueue--highlighted-content' Highlighted event: '.block-entityqueue--highlighted-event' - Highlighted solution: '.block-entityqueue--highlighted-solution' In the spotlight: '.block-views-blockin-the-spotlight-block' Left sidebar: '.section--sidebar-left' Main solution vertical tab: '#edit-group-main' Management solution vertical tab: '#edit-group-management' - Members admin form header: '#edit-header' Members admin form actions: '#edit-action' + Members admin form header: '#edit-header' Modal buttons: '.ui-dialog-buttonpane' Modal content: '#drupal-modal' Modal title: '.ui-dialog-title' diff --git a/tests/features/homepage.feature b/tests/features/homepage.feature index a489c49ee2..aef9365e7e 100644 --- a/tests/features/homepage.feature +++ b/tests/features/homepage.feature @@ -90,25 +90,34 @@ Feature: Homepage | 3 | alan.jpg | HR, Statistics and Analysis | Microgravity | Conventional studies investigating the effects of reduced gravity on muscle mass and function have used a ground control group that is not directly comparable to the space experimental group. | @terms - Scenario: A solution can be highlighted on the homepage - Given solution: - | title | Mercury poisoning | - | state | validated | - | description | Mercury poisoning is a type of metal poisoning due to exposure to mercury. | - | logo | logo.png | - | solution type | Interoperability Specification, Networking Service | - | topic | Demography, EU and European Policies, HR | - | state | validated | - And the "Highlighted solution" content listing contains: - | type | label | - | solution | Mercury poisoning | + Scenario Outline: Community content be highlighted on the homepage + Given collection: + | title | Clash of documents | + | state | validated | + And content: + | title | collection | topic | state | logo | body | + | Microgravity | Clash of documents | HR, E-justice | validated | alan.jpg | Conventional studies investigating the effects of reduced gravity on muscle mass and function have used a ground control group that is not directly comparable to the space experimental group. | + | Aliens | Clash of documents | Statistics and Analysis, E-justice | validated | alan.jpg | Conventional studies investigating the effects of reduced gravity on muscle mass and function have used a ground control group that is not directly comparable to the space experimental group. | + | Groundforce | Clash of documents | Statistics and Analysis, E-justice | proposed | alan.jpg | Conventional studies investigating the effects of reduced gravity on muscle mass and function have used a ground control group that is not directly comparable to the space experimental group. | + And the "Highlighted content" content listing contains: + | type | label | + | | Aliens | When I am on the homepage - Then I should see "Mercury poisoning" as the highlighted solution - And I should see the link "More solutions" - When I click "More solutions" + Then I should see "Aliens" as the Highlighted content + And I should see the link "Related content" + When I click "Related content" Then I should be on the advanced search page - And the "Solution" content checkbox item should be selected + And the