Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9a257a1
[GOVCMSCT2-121] Added fact fact related fields and configuration and …
joshua-salsadigital Jul 25, 2025
006540b
Added config missign files.
joshua-salsadigital Jul 25, 2025
c9996b7
Fixed config related issue.
joshua-salsadigital Jul 25, 2025
bb9b364
[GOVCMSCT2-121] Fixed behat test.
joshua-salsadigital Jul 25, 2025
cf7d57f
[GOVCMSCT2-121] Updated machine name to civictheme_fast_fact_card.
joshua-salsadigital Jul 30, 2025
af9ecdc
[GOVCMSCT2-121] Added post update hook for civictheme_fast_fact_card.
joshua-salsadigital Jul 30, 2025
61dc9cc
[GOVCMSCT2-121] Fixed lint issue.
joshua-salsadigital Jul 30, 2025
ac0c3a1
[GOVCMSCT2-121] Fixed lint issue.
joshua-salsadigital Jul 30, 2025
29e985d
Merge branch 'develop' into feature/GOVCMSCT2-121
joshua-salsadigital Aug 14, 2025
76a1c3b
CivicTheme implementation to display a Fast Fact card. and bumped the…
joshua-salsadigital Aug 14, 2025
5c7b4f5
Updated behat test.
joshua-salsadigital Aug 14, 2025
6e76c02
Fixed Failing test.
joshua-salsadigital Aug 15, 2025
c8d8a55
Merge branch 'develop' into feature/GOVCMSCT2-121
joshua-salsadigital Aug 25, 2025
8b56da4
Merge branch 'develop' into feature/GOVCMSCT2-121
joshua-salsadigital Sep 3, 2025
5d08d07
Add Quant Cloud migration configuration
stooit Sep 14, 2025
15bd089
Add Quant Cloud migration configuration
stooit Sep 25, 2025
07daef1
Merge branch 'develop' into feature/GOVCMSCT2-121
joshua-salsadigital Oct 3, 2025
f966a90
Fixed quant merge conflict - diff-e65288356485a0927532b70464ad2d038d…
joshua-salsadigital Oct 3, 2025
406439c
Merge branch 'develop' into feature/GOVCMSCT2-121
richardgaunt Oct 8, 2025
a022720
Merge branch 'develop' into feature/GOVCMSCT2-121
joshua-salsadigital Oct 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"@civictheme/uikit": "github:civictheme/uikit#921eef60baf3dc4bd1aef23beb5c429d199e49b8"
"@civictheme/uikit": "github:civictheme/uikit#8570291656b635e11300e95a55edcb0124b706cd"
},
"scripts": {
"uikit-change": "node scripts/civictheme-uikit-version-manager/index.mjs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Feature: Event reference card render
And I should see 2 ".ct-event-card__location" elements
And I should see 2 ".ct-event-card__image" elements
And I should see 2 ".ct-event-card__title" elements
And I should see 2 ".ct-event-card__title__link" elements
And I should see 2 ".ct-event-card__title-link" elements
And I should see 2 ".ct-event-card__summary" elements
And I should see 2 ".ct-event-card__location" elements
And I should see the text "[TEST] Referenced Event 1"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@p1 @civictheme @civictheme_card @civictheme_fast_fact_card
Feature: Fast fact card fields

@api
Scenario: Fields appear as expected
Given I am logged in as a user with the "Site Administrator" role
When I visit "node/add/civictheme_page"
And I fill in "Title" with "[TEST] Page fields"
When I press "Add Manual list"
And I press "Add Fast fact card"

Then I should see an "[name='field_c_n_components[0][subform][field_c_p_list_items][0][subform][field_c_p_title][0][value]']" element
And I should see an "[name='field_c_n_components[0][subform][field_c_p_list_items][0][subform][field_c_p_title][0][value]'].required" element
And I should not see an "[name='field_c_n_components[0][subform][field_c_p_list_items][0][subform][field_c_p_title][0][value]'][disabled]" element

And I should see an "[name='field_c_n_components[0][subform][field_c_p_list_items][0][subform][field_c_p_icon][media_library_selection]']" element

And I should see an "[name='field_c_n_components[0][subform][field_c_p_list_items][0][subform][field_c_p_summary][0][value]']" element
And I should not see an "[name='field_c_n_components[0][subform][field_c_p_list_items][0][subform][field_c_p_summary][0][value]'].required" element
And I should not see an "[name='field_c_n_components[0][subform][field_c_p_list_items][0][subform][field_c_p_summary][0][value]'][disabled]" element

And I should see an "[name='field_c_n_components[0][subform][field_c_p_list_items][0][subform][field_c_p_link][0][uri]']" element
And I should not see an "[name='field_c_n_components[0][subform][field_c_p_list_items][0][subform][field_c_p_link][0][uri]'].required" element
And I should not see an "[name='field_c_n_components[0][subform][field_c_p_list_items][0][subform][field_c_p_link][0][uri]'][disabled]" element

And I should see an "[name='field_c_n_components[0][subform][field_c_p_list_items][0][subform][field_c_p_theme]']" element
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Feature: Navigation reference card render
And I should see 2 ".ct-navigation-card__content" elements
And I should see 2 ".ct-navigation-card__image" elements
And I should see 2 ".ct-navigation-card__title" elements
And I should see 2 ".ct-navigation-card__title__link" elements
And I should see 2 ".ct-navigation-card__title-link" elements
And I should see 2 ".ct-navigation-card__summary" elements
And I should see the text "[TEST] Referenced Page 1"
And I should see the text "Summary 1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Feature: Promo reference card render
And I should see 2 ".ct-promo-card__content" elements
And I should see 2 ".ct-promo-card__image" elements
And I should see 2 ".ct-promo-card__title" elements
And I should see 2 ".ct-promo-card__title__link" elements
And I should see 2 ".ct-promo-card__title-link" elements
And I should see 2 ".ct-promo-card__summary" elements
And I should see the text "[TEST] Referenced Page 1"
And I should see the text "Summary 1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Feature: Navigation reference card render
And I should see 1 ".ct-snippet.ct-theme-dark" elements
And I should see 2 ".ct-snippet__title" elements
And I should see 2 ".ct-snippet__summary" elements
And I should see 2 ".ct-snippet__title__link" elements
And I should see 2 ".ct-snippet__title-link" elements
And I should see 2 ".ct-snippet__tags" elements
And I should see the text "[TEST] Referenced Page 1"
And I should see the text "Summary 1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ Feature: subject reference card render
And I should see 2 ".ct-subject-card__content" elements
And I should see 2 ".ct-subject-card__image" elements
And I should see 2 ".ct-subject-card__title" elements
And I should see 2 ".ct-subject-card__title__link" elements
And I should see 2 ".ct-subject-card__title-link" elements
And I should see the text "[TEST] Referenced Page 1"
And I should see the text "[TEST] Referenced Page 2"
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ Feature: Subject reference card render
And I should see 2 ".ct-subject-card__content" elements
And I should see 2 ".ct-subject-card__image" elements
And I should see 2 ".ct-subject-card__title" elements
And I should see 2 ".ct-subject-card__title__link" elements
And I should see 2 ".ct-subject-card__title-link" elements
And I should see the text "[TEST] Referenced Page 1"
And I should see the text "[TEST] Referenced Page 2"
8 changes: 8 additions & 0 deletions web/themes/contrib/civictheme/civictheme.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ config_devel:
- core.entity_form_display.paragraph.civictheme_event_card.default
- core.entity_form_display.paragraph.civictheme_event_card_ref.default
- core.entity_form_display.paragraph.civictheme_iframe.default
- core.entity_form_display.paragraph.civictheme_fast_fact_card.default
- core.entity_form_display.paragraph.civictheme_manual_list.default
- core.entity_form_display.paragraph.civictheme_map.default
- core.entity_form_display.paragraph.civictheme_message.default
Expand Down Expand Up @@ -216,6 +217,7 @@ config_devel:
- core.entity_view_display.paragraph.civictheme_event_card.default
- core.entity_view_display.paragraph.civictheme_event_card_ref.default
- core.entity_view_display.paragraph.civictheme_iframe.default
- core.entity_view_display.paragraph.civictheme_fast_fact_card.default
- core.entity_view_display.paragraph.civictheme_manual_list.default
- core.entity_view_display.paragraph.civictheme_map.default
- core.entity_view_display.paragraph.civictheme_message.default
Expand Down Expand Up @@ -380,6 +382,11 @@ config_devel:
- field.field.paragraph.civictheme_iframe.field_c_p_url
- field.field.paragraph.civictheme_iframe.field_c_p_vertical_spacing
- field.field.paragraph.civictheme_iframe.field_c_p_width
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_icon
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_link
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_summary
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_theme
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_title
- field.field.paragraph.civictheme_manual_list.field_c_p_background
- field.field.paragraph.civictheme_manual_list.field_c_p_content
- field.field.paragraph.civictheme_manual_list.field_c_p_list_column_count
Expand Down Expand Up @@ -604,6 +611,7 @@ config_devel:
- paragraphs.paragraphs_type.civictheme_event_card
- paragraphs.paragraphs_type.civictheme_event_card_ref
- paragraphs.paragraphs_type.civictheme_iframe
- paragraphs.paragraphs_type.civictheme_fast_fact_card
- paragraphs.paragraphs_type.civictheme_manual_list
- paragraphs.paragraphs_type.civictheme_map
- paragraphs.paragraphs_type.civictheme_message
Expand Down
49 changes: 49 additions & 0 deletions web/themes/contrib/civictheme/civictheme.post_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -959,3 +959,52 @@ function civictheme_post_update_update_field_c_p_background_description(): strin

return (string) new TranslatableMarkup('Updated field description for field_c_p_background.');
}

/**
* Add civictheme_fast_fact_card paragraph type and enable it for manual list.
*
* @SuppressWarnings(PHPMD.StaticAccess)
*/
function civictheme_post_update_add_fast_fact_card_paragraph_type(): string {
$new_configs = [
// Paragraph type definition.
'paragraphs.paragraphs_type.civictheme_fast_fact_card' => 'paragraphs_type',
'field.field.paragraph.civictheme_fast_fact_card.field_c_p_icon' => 'field_config',
'field.field.paragraph.civictheme_fast_fact_card.field_c_p_link' => 'field_config',
'field.field.paragraph.civictheme_fast_fact_card.field_c_p_summary' => 'field_config',
'field.field.paragraph.civictheme_fast_fact_card.field_c_p_theme' => 'field_config',
'field.field.paragraph.civictheme_fast_fact_card.field_c_p_title' => 'field_config',
'core.entity_form_display.paragraph.civictheme_fast_fact_card.default' => 'entity_form_display',
'core.entity_view_display.paragraph.civictheme_fast_fact_card.default' => 'entity_view_display',
];

$config_path = \Drupal::service('extension.list.theme')->getPath('civictheme') . '/config/install';
\Drupal::classResolver(CivicthemeUpdateHelper::class)->createConfigs($new_configs, $config_path);

// Enable civictheme_fast_fact_card for civictheme_manual_list.
$field_config_name = 'field.field.paragraph.civictheme_manual_list.field_c_p_list_items';
$field_config = \Drupal::configFactory()->getEditable($field_config_name);

if (!$field_config->isNew()) {
$handler_settings = $field_config->get('settings.handler_settings') ?: [];
// Ensure target_bundles exists.
if (!isset($handler_settings['target_bundles'])) {
$handler_settings['target_bundles'] = [];
}
$handler_settings['target_bundles']['civictheme_fast_fact_card'] = 'civictheme_fast_fact_card';

// Ensure target_bundles_drag_drop exists.
if (!isset($handler_settings['target_bundles_drag_drop'])) {
$handler_settings['target_bundles_drag_drop'] = [];
}
$handler_settings['target_bundles_drag_drop']['civictheme_fast_fact_card'] = [
'weight' => -54,
'enabled' => TRUE,
];

$field_config->set('settings.handler_settings', $handler_settings);
$field_config->save();
}

return (string) new TranslatableMarkup('Added civictheme_fast_fact_card paragraph type and enabled it for manual list.');
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_icon
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_link
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_summary
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_theme
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_title
- paragraphs.paragraphs_type.civictheme_fast_fact_card
module:
- link
- media_library
id: paragraph.civictheme_fast_fact_card.default
targetEntityType: paragraph
bundle: civictheme_fast_fact_card
mode: default
content:
field_c_p_icon:
type: media_library_widget
weight: 2
region: content
settings:
media_types: { }
third_party_settings: { }
field_c_p_link:
type: link_default
weight: 4
region: content
settings:
placeholder_url: ''
placeholder_title: ''
third_party_settings: { }
field_c_p_summary:
type: string_textarea
weight: 3
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
field_c_p_theme:
type: options_select
weight: 5
region: content
settings: { }
third_party_settings: { }
field_c_p_title:
type: string_textfield
weight: 1
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
hidden:
created: true
status: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_icon
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_link
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_summary
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_theme
- field.field.paragraph.civictheme_fast_fact_card.field_c_p_title
- paragraphs.paragraphs_type.civictheme_fast_fact_card
module:
- link
- options
id: paragraph.civictheme_fast_fact_card.default
targetEntityType: paragraph
bundle: civictheme_fast_fact_card
mode: default
content:
field_c_p_icon:
type: entity_reference_label
label: above
settings:
link: true
third_party_settings: { }
weight: 2
region: content
field_c_p_link:
type: link
label: above
settings:
trim_length: 80
url_only: false
url_plain: false
rel: ''
target: ''
third_party_settings: { }
weight: 4
region: content
field_c_p_summary:
type: basic_string
label: above
settings: { }
third_party_settings: { }
weight: 3
region: content
field_c_p_theme:
type: list_default
label: above
settings: { }
third_party_settings: { }
weight: 5
region: content
field_c_p_title:
type: string
label: above
settings:
link_to_entity: false
third_party_settings: { }
weight: 1
region: content
hidden: { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.field_c_p_icon
- media.type.civictheme_icon
- paragraphs.paragraphs_type.civictheme_fast_fact_card
id: paragraph.civictheme_fast_fact_card.field_c_p_icon
field_name: field_c_p_icon
entity_type: paragraph
bundle: civictheme_fast_fact_card
label: Icon
description: ''
required: true
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:media'
handler_settings:
target_bundles:
civictheme_icon: civictheme_icon
sort:
field: _none
direction: ASC
auto_create: false
auto_create_bundle: ''
field_type: entity_reference
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.field_c_p_link
- paragraphs.paragraphs_type.civictheme_fast_fact_card
module:
- link
id: paragraph.civictheme_fast_fact_card.field_c_p_link
field_name: field_c_p_link
entity_type: paragraph
bundle: civictheme_fast_fact_card
label: Link
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
title: 0
link_type: 17
field_type: link
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.field_c_p_summary
- paragraphs.paragraphs_type.civictheme_fast_fact_card
id: paragraph.civictheme_fast_fact_card.field_c_p_summary
field_name: field_c_p_summary
entity_type: paragraph
bundle: civictheme_fast_fact_card
label: Summary
description: 'Limited to the number of characters configured in the theme settings. Any characters past the character limit will not show for users.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string_long
Loading