From 854f4e83e0dcf7c73e3b6829e292fccaa83fe331 Mon Sep 17 00:00:00 2001 From: nJim Date: Thu, 5 Oct 2023 00:47:26 -0400 Subject: [PATCH 01/91] fix (YALB-1579): fixing theme form errors --- .../modules/custom/ys_themes/ys_themes.module | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/ys_themes.module b/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/ys_themes.module index ecbe62fc91..50598818e1 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/ys_themes.module +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/ys_themes.module @@ -258,10 +258,14 @@ function ys_themes_preprocess_form_element(array &$variables) { // Sets various values related to current element as well as global theme // to twig for cleaner twig templates. - $variables['label']['color_theme'] = $allOptions[$elementName]['values'][$value]['color_theme']; - $variables['label']['color_theme_2'] = $allOptions[$elementName]['values'][$value]['color_theme_2']; - $variables['label']['current_global_theme'] = $globalTheme; - $variables['label']['value'] = $value; + if (isset($allOptions[$elementName]['values'][$value]['color_theme'])) { + $variables['label']['#context']['color_theme'] = $allOptions[$elementName]['values'][$value]['color_theme']; + } + if (isset($allOptions[$elementName]['values'][$value]['color_theme_2'])) { + $variables['label']['#context']['color_theme_2'] = $allOptions[$elementName]['values'][$value]['color_theme_2']; + } + $variables['label']['#context']['current_global_theme'] = $globalTheme; + $variables['label']['#context']['value'] = $value; } } } From 7dc480b7ef483a09aa3f56fc8a8156e95ad4eee0 Mon Sep 17 00:00:00 2001 From: nJim Date: Thu, 5 Oct 2023 09:24:32 -0400 Subject: [PATCH 02/91] fix (YALB-1577): fix time format on condenced events --- .../core.entity_view_display.node.event.condensed.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.node.event.condensed.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.node.event.condensed.yml index ad3e2ea0fb..58ad79c2d5 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.node.event.condensed.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.node.event.condensed.yml @@ -54,15 +54,11 @@ bundle: event mode: condensed content: field_event_date: - type: smartdate_default + type: smartdate_plain label: hidden settings: timezone_override: '' - format_type: medium - format: html_datetime - force_chronological: false - add_classes: false - time_wrapper: true + separator: '-' third_party_settings: { } weight: 0 region: content From 0877512ed6195a420365d281a7edfa24a7f34ea4 Mon Sep 17 00:00:00 2001 From: nJim Date: Thu, 5 Oct 2023 09:42:22 -0400 Subject: [PATCH 03/91] chore: add default values for theme settings --- .../config/sync/ys_themes.theme_settings.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/profiles/custom/yalesites_profile/config/sync/ys_themes.theme_settings.yml b/web/profiles/custom/yalesites_profile/config/sync/ys_themes.theme_settings.yml index 09d799da8e..05ae06fbbb 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/ys_themes.theme_settings.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/ys_themes.theme_settings.yml @@ -3,4 +3,6 @@ nav_type: basic header_theme: one footer_theme: one global_theme: one -button_theme: two +button_theme: one +header_accent: one +footer_accent: one From 449677a0f8af66740876329dd2ec68e4b3698aa5 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Fri, 6 Oct 2023 14:30:24 -0700 Subject: [PATCH 04/91] feat(YALB-1563): WIP Header settings form --- .../custom/yalesites_profile/composer.json | 2 +- .../ys_alert/src/Form/AlertSettings.php | 2 +- .../ys_core/src/Form/FooterSettingsForm.php | 8 +- .../ys_core/src/Form/HeaderSettingsForm.php | 156 ++++++++++++++++++ .../ys_core/src/Form/SiteSettingsForm.php | 2 +- .../custom/ys_core/ys_core.links.menu.yml | 7 + .../custom/ys_core/ys_core.routing.yml | 8 + 7 files changed, 178 insertions(+), 7 deletions(-) create mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php diff --git a/web/profiles/custom/yalesites_profile/composer.json b/web/profiles/custom/yalesites_profile/composer.json index e3a700b65a..bd98b394fa 100644 --- a/web/profiles/custom/yalesites_profile/composer.json +++ b/web/profiles/custom/yalesites_profile/composer.json @@ -49,7 +49,7 @@ "drupal/layout_builder_restrictions": "^2.17", "drupal/layout_builder_restrictions_by_role": "^1.0@alpha", "drupal/libraries": "^4.0", - "drupal/linkit": "^6.0@RC", + "drupal/linkit": "6.0.1", "drupal/mailchimp_transactional": "^1.0", "drupal/mailsystem": "^4.3", "drupal/markup": "^1.0@beta", diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/src/Form/AlertSettings.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/src/Form/AlertSettings.php index 2c2c654a10..0a964ef99b 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/src/Form/AlertSettings.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/src/Form/AlertSettings.php @@ -185,7 +185,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#autocomplete_route_name' => 'linkit.autocomplete', '#default_value' => $config->get('alert.link_url'), '#autocomplete_route_parameters' => [ - 'linkit_profile_id' => 'default', + 'linkit_profile' => 'default', ], ]; diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/FooterSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/FooterSettingsForm.php index 5fa29bc92e..d67a617ce7 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/FooterSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/FooterSettingsForm.php @@ -170,7 +170,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#description' => $this->t('Type the URL or autocomplete for internal paths.'), '#autocomplete_route_name' => 'linkit.autocomplete', '#autocomplete_route_parameters' => [ - 'linkit_profile_id' => 'default', + 'linkit_profile' => 'default', ], ], @@ -200,7 +200,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#description' => $this->t('Type the URL or autocomplete for internal paths.'), '#autocomplete_route_name' => 'linkit.autocomplete', '#autocomplete_route_parameters' => [ - 'linkit_profile_id' => 'default', + 'linkit_profile' => 'default', ], '#default_value' => ($footerConfig->get('content.school_logo_url')) ? $footerConfig->get('content.school_logo_url') : '/', ]; @@ -236,7 +236,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#description' => $this->t('Type the URL or autocomplete for internal paths.'), '#autocomplete_route_name' => 'linkit.autocomplete', '#autocomplete_route_parameters' => [ - 'linkit_profile_id' => 'default', + 'linkit_profile' => 'default', ], ], 'link_title' => [ @@ -256,7 +256,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#description' => $this->t('Type the URL or autocomplete for internal paths.'), '#autocomplete_route_name' => 'linkit.autocomplete', '#autocomplete_route_parameters' => [ - 'linkit_profile_id' => 'default', + 'linkit_profile' => 'default', ], ], 'link_title' => [ diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php new file mode 100644 index 0000000000..6005185d21 --- /dev/null +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php @@ -0,0 +1,156 @@ +cacheRender = $cache_render; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container) { + return new static( + $container->get('config.factory'), + $container->get('cache.render'), + ); + } + + /** + * Settings configuration form. + * + * @param array $form + * Form array. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * Form state. + * + * @return array + * Form array to render. + */ + public function buildForm(array $form, FormStateInterface $form_state) { + + $form = parent::buildForm($form, $form_state); + $headerConfig = $this->config('ys_core.header_settings'); + + $form['#attached']['library'][] = 'ys_core/footer_settings_form'; + + $form['header_variation'] = [ + '#type' => 'radios', + '#options' => [ + 'basic' => $this->t('Basic') . 'Basic footer icon showing a small Yale logo, and gray placeholders for copyright and social media icons.', + 'mega' => $this->t('Mega') . 'Mega footer icon with gray placeholders for more information than the basic footer.', + ], + '#title' => $this->t('Header type'), + '#default_value' => ($headerConfig->get('header_variation')) ? $headerConfig->get('footer_variation') : 'basic', + '#attributes' => [ + 'class' => [ + 'footer-variation-radios', + ], + ], + ]; + + $form['desc_basic_container'] = [ + '#type' => 'container', + '#title' => $this->t('Basic'), + '#states' => [ + 'visible' => [ + ':input[name="header_variation"]' => ['value' => 'basic'], + ], + ], + ]; + + $form['desc_mega_container'] = [ + '#type' => 'container', + '#title' => $this->t('Mega'), + '#states' => [ + 'visible' => [ + ':input[name="header_variation"]' => ['value' => 'mega'], + ], + ], + ]; + + $form['desc_basic_container']['desc_basic'] = [ + '#type' => 'markup', + '#prefix' => '

Basic

', + '#markup' => '

' . $this->t('The basic header of your website contains TKTKTK only social media icons and Yale branding.') . '

', + ]; + + $form['desc_mega_container']['desc_mega'] = [ + '#type' => 'markup', + '#prefix' => '

Mega Header

', + '#markup' => '

' . $this->t('The mega header of your website TKTKTK can be customized to suit your organizational needs. You can upload icons for various organizational identities and other platforms that your organization uses. You can also add a customizable text area with general information, contact information, or a physical address. Additionally, you can add up to 8 links in a two-column format.') . '

', + ]; + + return $form; + } + + /** + * Submit form action. + * + * @param array $form + * Form array. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * Form state. + */ + public function submitForm(array &$form, FormStateInterface $form_state) { + + // Footer settings config. + $headerConfig = $this->config('ys_core.header_settings'); + + $headerConfig->set('header_variation', $form_state->getValue('header_variation')); + + $headerConfig->save(); + + $this->cacheRender->invalidateAll(); + return parent::submitForm($form, $form_state); + } + + /** + * {@inheritdoc} + */ + protected function getEditableConfigNames() { + return [ + 'ys_core.header_settings', + ]; + } + +} diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php index 010ca52b41..2b3ea073d8 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php @@ -137,7 +137,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#default_value' => $siteConfig->get('page')['front'], '#required' => TRUE, '#autocomplete_route_parameters' => [ - 'linkit_profile_id' => 'default', + 'linkit_profile' => 'default', ], ]; diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.links.menu.yml b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.links.menu.yml index d522415283..a0d38ba699 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.links.menu.yml +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.links.menu.yml @@ -26,6 +26,13 @@ ys_core.admin_site_settings: route_name: ys_core.admin_site_settings title: "Site Settings" weight: 10 +# Header settings form. +ys_core.admin_header_settings: + description: "Header settings." + parent: ys_core.admin_yalesites + route_name: ys_core.admin_header_settings + title: "Header Settings" + weight: 15 # Footer settings form. ys_core.admin_footer_settings: description: "Footer settings." diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.routing.yml b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.routing.yml index 58cbd5a08d..6b5b2a0730 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.routing.yml +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.routing.yml @@ -14,6 +14,14 @@ ys_core.admin_site_settings: _title: 'Site Settings' requirements: _permission: 'yalesites manage settings' +# Header settings form. +ys_core.admin_header_settings: + path: '/admin/yalesites/header' + defaults: + _form: 'Drupal\ys_core\Form\HeaderSettingsForm' + _title: 'Header Settings' + requirements: + _permission: 'yalesites manage settings' # Footer settings form. ys_core.admin_footer_settings: path: '/admin/yalesites/footer' From 3db4f94defa5d07db177bf7db84158bff50857bf Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Fri, 6 Oct 2023 17:12:17 -0700 Subject: [PATCH 05/91] refactor(YALB-1563): Refactor to allow styles and JS to be used on both header and footer settings forms --- ...gs-form.css => header-footer-settings.css} | 38 +++++++++---------- .../images/preview-icons/header-basic.svg | 15 ++++++++ .../images/preview-icons/header-mega.svg | 24 ++++++++++++ ...-settings.js => header-footer-settings.js} | 12 ++++-- .../ys_core/src/Form/FooterSettingsForm.php | 5 ++- .../ys_core/src/Form/HeaderSettingsForm.php | 19 +++++++--- .../custom/ys_core/ys_core.libraries.yml | 6 +-- 7 files changed, 86 insertions(+), 33 deletions(-) rename web/profiles/custom/yalesites_profile/modules/custom/ys_core/css/{footer-settings-form.css => header-footer-settings.css} (67%) create mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/header-basic.svg create mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/header-mega.svg rename web/profiles/custom/yalesites_profile/modules/custom/ys_core/js/{footer-settings.js => header-footer-settings.js} (78%) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/css/footer-settings-form.css b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/css/header-footer-settings.css similarity index 67% rename from web/profiles/custom/yalesites_profile/modules/custom/ys_core/css/footer-settings-form.css rename to web/profiles/custom/yalesites_profile/modules/custom/ys_core/css/header-footer-settings.css index 01b37bff33..c669edb84e 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/css/footer-settings-form.css +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/css/header-footer-settings.css @@ -7,27 +7,27 @@ } } -.ys-core-footer-settings-form +.ys-core-header-footer-settings .claro-details.form-disabled .claro-details__summary { background-color: #6f6f6f !important; } -.ys-core-footer-settings-form .form-element { +.ys-core-header-footer-settings .form-element { width: 100%; } -.ys-core-footer-settings-form .preview-icon { +.ys-core-header-footer-settings .preview-icon { width: 190px; height: 137px; } -.ys-core-footer-settings-form .claro-details.form-disabled { +.ys-core-header-footer-settings .claro-details.form-disabled { pointer-events: none; user-select: none; } -.ys-core-footer-settings-form +.ys-core-header-footer-settings .claro-details.form-disabled .claro-details__summary::after { background-image: url("../images/icons/disabled-details.svg"); @@ -45,15 +45,16 @@ width: 2rem; } -.footer-variation-radios .form-radios { +.variation-radios .form-radios { display: flex; + margin-top: 1rem; } -.footer-variation-radios .form-type--radio:first-child { +.variation-radios .form-type--radio:first-child { margin-left: 0; } -.form-item--footer-variation.form-type--radio input { +.variation-radios .form-type--radio input { border: 0; clip: rect(0 0 0 0); height: 1px; @@ -64,7 +65,7 @@ width: 1px; } -.form-item--footer-variation.form-type--radio label { +.variation-radios .form-type--radio label { display: flex; flex-direction: column; align-items: center; @@ -74,20 +75,17 @@ padding: 0.5rem; } -.form-item--footer-variation input[checked="checked"] + label, -.form-item--footer-variation input[checked="checked"] + label:hover, -.form-item--footer-variation +.variation-radios .form-type--radio input:focus + label { + outline: 2px solid var(--wool); +} + +.variation-radios .form-type--radio input[checked="checked"] + label, +.variation-radios .form-type--radio input[checked="checked"] + label:hover, +.variation-radios + .form-type--radio .form-boolean--type-radio:hover input[checked="checked"] + label { background-color: var(--darkest-gray); color: var(--color-background-primary) !important; } - -.form-item--footer-variation.form-type--radio input:focus + label { - outline: 2px solid var(--wool); -} - -#edit-footer-variation { - margin-top: 1rem; -} diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/header-basic.svg b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/header-basic.svg new file mode 100644 index 0000000000..cb04d46d3c --- /dev/null +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/header-basic.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/header-mega.svg b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/header-mega.svg new file mode 100644 index 0000000000..9fc151acb5 --- /dev/null +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/header-mega.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/js/footer-settings.js b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/js/header-footer-settings.js similarity index 78% rename from web/profiles/custom/yalesites_profile/modules/custom/ys_core/js/footer-settings.js rename to web/profiles/custom/yalesites_profile/modules/custom/ys_core/js/header-footer-settings.js index edb637c504..a87e07d56a 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/js/footer-settings.js +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/js/header-footer-settings.js @@ -1,5 +1,5 @@ ((Drupal) => { - Drupal.behaviors.ysCoreFooterSettings = { + Drupal.behaviors.ysCoreHeaderFooterSettings = { attach: function() { // eslint-disable-line // Function to handle radio input checked behavior based on radio element selection. function handleRadioInputs(radioGroup) { @@ -31,10 +31,16 @@ } // Store radio input groups in an array - const radioGroups = ['input[name="footer_variation"]']; + const headerRadioGroups = ['input[name="header_variation"]']; + const footerRadioGroups = ['input[name="footer_variation"]']; // Apply the function to each radio input group - radioGroups.forEach((group) => { + headerRadioGroups.forEach((group) => { + handleRadioInputs(group); + }); + + // Apply the function to each radio input group + footerRadioGroups.forEach((group) => { handleRadioInputs(group); }); }, diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/FooterSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/FooterSettingsForm.php index d67a617ce7..741b95edfd 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/FooterSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/FooterSettingsForm.php @@ -62,7 +62,8 @@ public function buildForm(array $form, FormStateInterface $form_state) { $socialConfig = $this->config('ys_core.social_links'); $footerConfig = $this->config('ys_core.footer_settings'); - $form['#attached']['library'][] = 'ys_core/footer_settings_form'; + $form['#attached']['library'][] = 'ys_core/header_footer_settings'; + $form['#attributes']['class'][] = 'ys-core-header-footer-settings'; $form['footer_variation'] = [ '#type' => 'radios', @@ -74,7 +75,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#default_value' => ($footerConfig->get('footer_variation')) ? $footerConfig->get('footer_variation') : 'basic', '#attributes' => [ 'class' => [ - 'footer-variation-radios', + 'variation-radios', ], ], ]; diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php index 6005185d21..c24d679dd0 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php @@ -71,19 +71,21 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form = parent::buildForm($form, $form_state); $headerConfig = $this->config('ys_core.header_settings'); - $form['#attached']['library'][] = 'ys_core/footer_settings_form'; + $form['#attached']['library'][] = 'ys_core/header_footer_settings'; + $form['#attributes']['class'][] = 'ys-core-header-footer-settings'; $form['header_variation'] = [ '#type' => 'radios', '#options' => [ - 'basic' => $this->t('Basic') . 'Basic footer icon showing a small Yale logo, and gray placeholders for copyright and social media icons.', - 'mega' => $this->t('Mega') . 'Mega footer icon with gray placeholders for more information than the basic footer.', + 'basic' => $this->t('Basic') . 'Basic header icon showing a site title and a simplified navigation.', + 'mega' => $this->t('Mega') . 'Mega header icon showing a site title and a flyout style mega menu.', + 'focus' => $this->t('Focus') . 'TKTKTK', ], - '#title' => $this->t('Header type'), + '#title' => $this->t('Header variation'), '#default_value' => ($headerConfig->get('header_variation')) ? $headerConfig->get('footer_variation') : 'basic', '#attributes' => [ 'class' => [ - 'footer-variation-radios', + 'variation-radios', ], ], ]; @@ -120,6 +122,13 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#markup' => '

' . $this->t('The mega header of your website TKTKTK can be customized to suit your organizational needs. You can upload icons for various organizational identities and other platforms that your organization uses. You can also add a customizable text area with general information, contact information, or a physical address. Additionally, you can add up to 8 links in a two-column format.') . '

', ]; + $form['enable_search_form'] = [ + '#type' => 'checkbox', + '#description' => $this->t('Enable the search form located in the utility navigation area.'), + '#title' => $this->t('Enable search form'), + // '#default_value' => $yaleConfig->get('search')['enable_search_form'], + ]; + return $form; } diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.libraries.yml b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.libraries.yml index 4d17465dec..149c9fb7a2 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.libraries.yml +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.libraries.yml @@ -10,9 +10,9 @@ taxonomy_form: siteimprove: js: https://siteimproveanalytics.com/js/siteanalyze_66356571.js: { type: external, attributes: { async: true } } -footer_settings_form: +header_footer_settings: css: theme: - css/footer-settings-form.css: {} + css/header-footer-settings.css: {} js: - js/footer-settings.js: {} + js/header-footer-settings.js: {} From 78686c9c234cde91554247312081894688dc685f Mon Sep 17 00:00:00 2001 From: nJim Date: Sat, 7 Oct 2023 01:05:17 -0400 Subject: [PATCH 06/91] fix (YALB-863): set default callbacks for all dials --- ...block_content.content_spotlight.field_style_position.yml | 4 ++-- ...lock_content.content_spotlight.field_style_variation.yml | 4 ++-- ...ld.block_content.content_spotlight.field_style_width.yml | 4 ++-- ...eld.field.block_content.divider.field_style_position.yml | 6 ++---- .../field.field.block_content.divider.field_style_width.yml | 6 ++---- ....field.block_content.grand_hero.field_style_position.yml | 4 ++-- ...field.block_content.grand_hero.field_style_variation.yml | 4 ++-- ...eld.block_content.wrapped_image.field_style_position.yml | 4 ++-- ...ld.block_content.wrapped_image.field_style_variation.yml | 4 ++-- 9 files changed, 18 insertions(+), 22 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_style_position.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_style_position.yml index fb3a189c10..e07bc72a37 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_style_position.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_style_position.yml @@ -13,9 +13,9 @@ entity_type: block_content bundle: content_spotlight label: 'Image Position' description: '' -required: false +required: true translatable: true default_value: { } -default_value_callback: '' +default_value_callback: ys_themes_default_value_function settings: { } field_type: list_string diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_style_variation.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_style_variation.yml index 7d5e665807..e8cd6700d8 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_style_variation.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_style_variation.yml @@ -13,9 +13,9 @@ entity_type: block_content bundle: content_spotlight label: Focus description: '' -required: false +required: true translatable: true default_value: { } -default_value_callback: '' +default_value_callback: ys_themes_default_value_function settings: { } field_type: list_string diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_style_width.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_style_width.yml index 37b28b3812..38f4e56e31 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_style_width.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_style_width.yml @@ -13,9 +13,9 @@ entity_type: block_content bundle: content_spotlight label: 'Image Size' description: '' -required: false +required: true translatable: false default_value: { } -default_value_callback: '' +default_value_callback: ys_themes_default_value_function settings: { } field_type: list_string diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.divider.field_style_position.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.divider.field_style_position.yml index d18e611f49..fb5996bb4f 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.divider.field_style_position.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.divider.field_style_position.yml @@ -15,9 +15,7 @@ label: 'Divider Position' description: '' required: true translatable: true -default_value: - - - value: left -default_value_callback: '' +default_value: { } +default_value_callback: ys_themes_default_value_function settings: { } field_type: list_string diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.divider.field_style_width.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.divider.field_style_width.yml index bef7143d4c..85e9b1d7a2 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.divider.field_style_width.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.divider.field_style_width.yml @@ -15,9 +15,7 @@ label: 'Divider Width' description: '' required: true translatable: true -default_value: - - - value: 100% -default_value_callback: '' +default_value: { } +default_value_callback: ys_themes_default_value_function settings: { } field_type: list_string diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_style_position.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_style_position.yml index 140c80abd1..e0a7bd02e0 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_style_position.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_style_position.yml @@ -13,9 +13,9 @@ entity_type: block_content bundle: grand_hero label: 'Overlay Position' description: '' -required: false +required: true translatable: true default_value: { } -default_value_callback: '' +default_value_callback: ys_themes_default_value_function settings: { } field_type: list_string diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_style_variation.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_style_variation.yml index 059a628c9f..c60d7d44ac 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_style_variation.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_style_variation.yml @@ -13,9 +13,9 @@ entity_type: block_content bundle: grand_hero label: 'Media Size' description: '' -required: false +required: true translatable: true default_value: { } -default_value_callback: '' +default_value_callback: ys_themes_default_value_function settings: { } field_type: list_string diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_style_position.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_style_position.yml index f19edb8f6c..f3923cbac1 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_style_position.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_style_position.yml @@ -13,9 +13,9 @@ entity_type: block_content bundle: wrapped_image label: Position description: '' -required: false +required: true translatable: true default_value: { } -default_value_callback: '' +default_value_callback: ys_themes_default_value_function settings: { } field_type: list_string diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_style_variation.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_style_variation.yml index b37de3190d..63bba84e34 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_style_variation.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_style_variation.yml @@ -13,9 +13,9 @@ entity_type: block_content bundle: wrapped_image label: Style description: '' -required: false +required: true translatable: true default_value: { } -default_value_callback: '' +default_value_callback: ys_themes_default_value_function settings: { } field_type: list_string From 77838ce55249e9205eb3fce9037d3599dd8f2bc1 Mon Sep 17 00:00:00 2001 From: Vincent Massaro Date: Tue, 10 Oct 2023 11:24:44 -0400 Subject: [PATCH 07/91] chore(YALB-1565): set ga cookie_domain to subdomain scope (#451) --- .../yalesites_profile/config/sync/google_analytics.settings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/profiles/custom/yalesites_profile/config/sync/google_analytics.settings.yml b/web/profiles/custom/yalesites_profile/config/sync/google_analytics.settings.yml index 3434b3a348..0a1a70c3c0 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/google_analytics.settings.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/google_analytics.settings.yml @@ -1,7 +1,7 @@ _core: default_config_hash: dwMYPgAnj9KBO77SLEv9Z42NDJAbuxe0uU9eGC8qw3M account: '' -domain_mode: 0 +domain_mode: 1 cross_domains: '' visibility: request_path_mode: 0 From 0d0b2f29f43b83e52ef863ca73c457a4c5d8c7b6 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Wed, 11 Oct 2023 17:25:52 -0700 Subject: [PATCH 08/91] feat(YALB-1674): Add more items to the header settings form and start working on config --- .../install/ys_core.header_settings.yml | 6 + .../ys_core/src/Form/HeaderSettingsForm.php | 109 +++++++++++++++++- 2 files changed, 110 insertions(+), 5 deletions(-) create mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_core/config/install/ys_core.header_settings.yml diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/config/install/ys_core.header_settings.yml b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/config/install/ys_core.header_settings.yml new file mode 100644 index 0000000000..f301f4e8f4 --- /dev/null +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/config/install/ys_core.header_settings.yml @@ -0,0 +1,6 @@ +header_variation: 'basic' +nav_position: 'left' +focus_header_image: '' +site_name_image: '' +search: + enable_search_form: 1 diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php index c24d679dd0..822584828e 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php @@ -6,6 +6,7 @@ use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Session\AccountProxy; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -29,6 +30,13 @@ public function getFormId() { */ protected $cacheRender; + /** + * Current user session. + * + * @var \Drupal\Core\Session\AccountProxy + */ + protected $currentUserSession; + /** * Constructs the object. * @@ -36,13 +44,17 @@ public function getFormId() { * The factory for configuration objects. * @param \Drupal\Core\Path\CacheBackendInterface $cache_render * The Cache backend interface. + * @param \Drupal\Core\Session\AccountProxy $currentUserSession + * The current user session. */ public function __construct( ConfigFactoryInterface $config_factory, CacheBackendInterface $cache_render, + AccountProxy $current_user_session, ) { parent::__construct($config_factory); $this->cacheRender = $cache_render; + $this->currentUserSession = $current_user_session; } /** @@ -52,6 +64,7 @@ public static function create(ContainerInterface $container) { return new static( $container->get('config.factory'), $container->get('cache.render'), + $container->get('current_user'), ); } @@ -70,6 +83,11 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form = parent::buildForm($form, $form_state); $headerConfig = $this->config('ys_core.header_settings'); + $allowSecretItems = FALSE; + + if ($this->currentUserSession->getAccount()->id() == 1 || in_array('platform_admin', $this->currentUserSession->getAccount()->getRoles())) { + $allowSecretItems = TRUE; + } $form['#attached']['library'][] = 'ys_core/header_footer_settings'; $form['#attributes']['class'][] = 'ys-core-header-footer-settings'; @@ -82,7 +100,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { 'focus' => $this->t('Focus') . 'TKTKTK', ], '#title' => $this->t('Header variation'), - '#default_value' => ($headerConfig->get('header_variation')) ? $headerConfig->get('footer_variation') : 'basic', + '#default_value' => ($headerConfig->get('header_variation')) ? $headerConfig->get('header_variation') : 'basic', '#attributes' => [ 'class' => [ 'variation-radios', @@ -110,23 +128,102 @@ public function buildForm(array $form, FormStateInterface $form_state) { ], ]; + $form['desc_focus_container'] = [ + '#type' => 'container', + '#title' => $this->t('Focus'), + '#states' => [ + 'visible' => [ + ':input[name="header_variation"]' => ['value' => 'focus'], + ], + ], + ]; + + if ($allowSecretItems) { + $form['all_headers'] = [ + '#type' => 'details', + '#title' => $this->t('All Headers'), + ]; + } + + $form['basic_and_mega_header'] = [ + '#type' => 'details', + '#title' => $this->t('Basic & Mega'), + '#states' => [ + 'disabled' => [ + ':input[name="header_variation"]' => [ + 'value' => 'focus', + ], + ], + ], + ]; + + $form['focus_header'] = [ + '#type' => 'details', + '#title' => $this->t('Focus'), + '#states' => [ + 'enabled' => [ + ':input[name="header_variation"]' => [ + 'value' => 'focus', + ], + ], + ], + ]; + $form['desc_basic_container']['desc_basic'] = [ '#type' => 'markup', '#prefix' => '

Basic

', - '#markup' => '

' . $this->t('The basic header of your website contains TKTKTK only social media icons and Yale branding.') . '

', + '#markup' => '

' . $this->t('The basic header of your website contains...') . '

', ]; $form['desc_mega_container']['desc_mega'] = [ '#type' => 'markup', '#prefix' => '

Mega Header

', - '#markup' => '

' . $this->t('The mega header of your website TKTKTK can be customized to suit your organizational needs. You can upload icons for various organizational identities and other platforms that your organization uses. You can also add a customizable text area with general information, contact information, or a physical address. Additionally, you can add up to 8 links in a two-column format.') . '

', + '#markup' => '

' . $this->t('The mega header of your website can ...') . '

', + ]; + + $form['desc_focus_container']['desc_focus'] = [ + '#type' => 'markup', + '#prefix' => '

Focus Header

', + '#markup' => '

' . $this->t('Focus header shows a full-width image on the homepage...') . '

', ]; - $form['enable_search_form'] = [ + if ($allowSecretItems) { + $form['all_headers']['site_name_image'] = [ + '#type' => 'file', + //'#upload_location' => 'public://header-logos', + '#multiple' => FALSE, + '#description' => $this->t('Allowed extensions: svg'), + // '#upload_validators' => [ + // 'file_validate_is_image' => [], + // 'file_validate_extensions' => ['svg'], + // ], + '#title' => $this->t('Site Name Image'), + //'#default_value' => ($yaleConfig->get('custom_favicon')) ? $yaleConfig->get('custom_favicon') : NULL, + // '#theme' => 'image_widget', + // '#preview_image_style' => 'favicon_16x16', + // '#use_favicon_preview' => TRUE, + ]; + } + + $form['basic_and_mega_header']['enable_search_form'] = [ '#type' => 'checkbox', '#description' => $this->t('Enable the search form located in the utility navigation area.'), '#title' => $this->t('Enable search form'), - // '#default_value' => $yaleConfig->get('search')['enable_search_form'], + '#default_value' => $headerConfig->get('search.enable_search_form'), + '#states' => [ + 'invisible' => [ + ':input[name="header_variation"]' => ['value' => 'focus'], + ], + ], + ]; + + $form['focus_header']['focus_header_image'] = [ + '#type' => 'media_library', + '#allowed_bundles' => ['image'], + '#title' => $this->t('Homepage Header image'), + '#required' => FALSE, + '#default_value' => ($headerConfig->get('focus_header_image')) ? $headerConfig->get('focus_header_image') : NULL, + '#description' => $this->t('Used only on the homepage when focus header is selected.'), ]; return $form; @@ -146,6 +243,8 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $headerConfig = $this->config('ys_core.header_settings'); $headerConfig->set('header_variation', $form_state->getValue('header_variation')); + $headerConfig->set('search.enable_search_form', $form_state->getValue('enable_search_form')); + $headerConfig->set('focus_header_image', $form_state->getValue('focus_header_image')); $headerConfig->save(); From f77f97b0e1f0393d73f03361584276479b753dec Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Thu, 12 Oct 2023 12:08:10 -0700 Subject: [PATCH 09/91] feat(YALB-1574): WIP start validation code for SVG --- .../modules/custom/ys_core/src/Form/HeaderSettingsForm.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php index 822584828e..fb9887420a 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php @@ -229,6 +229,13 @@ public function buildForm(array $form, FormStateInterface $form_state) { return $form; } + /** + * {@inheritdoc} + */ + public function validateForm(array &$form, FormStateInterface $form_state) { + dpm($form_state); + } + /** * Submit form action. * From 61eadedb7b2e5197e76e9d79092d45caa13dba68 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Fri, 13 Oct 2023 16:01:41 -0700 Subject: [PATCH 10/91] feat(YALB-1574): Refactor some existing classes to use in header settings form, add SVG uploader --- .../custom/yalesites_profile/composer.json | 3 +- .../ys_core/css/header-footer-settings.css | 2 +- .../images/preview-icons/header-focus.svg | 9 + .../preview-icons}/lever-nav-center.svg | 0 .../images/preview-icons}/lever-nav-left.svg | 0 .../images/preview-icons}/lever-nav-right.svg | 0 .../ys_core/js/header-footer-settings.js | 14 +- .../ys_core/src/Form/HeaderSettingsForm.php | 155 ++++++++++++------ .../ys_core/src/Form/SiteSettingsForm.php | 21 +-- ...nManager.php => YaleSitesMediaManager.php} | 30 ++-- .../modules/custom/ys_core/ys_core.module | 7 +- .../custom/ys_core/ys_core.services.yml | 4 +- .../file-managed-file--svg.html.twig | 67 ++++++++ .../content-edit/image-widget.html.twig | 3 +- 14 files changed, 227 insertions(+), 88 deletions(-) create mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/header-focus.svg rename web/profiles/custom/yalesites_profile/modules/custom/{ys_themes/icons => ys_core/images/preview-icons}/lever-nav-center.svg (100%) rename web/profiles/custom/yalesites_profile/modules/custom/{ys_themes/icons => ys_core/images/preview-icons}/lever-nav-left.svg (100%) rename web/profiles/custom/yalesites_profile/modules/custom/{ys_themes/icons => ys_core/images/preview-icons}/lever-nav-right.svg (100%) rename web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/{FaviconManager.php => YaleSitesMediaManager.php} (84%) create mode 100644 web/themes/custom/ys_admin_theme/templates/content-edit/file-managed-file--svg.html.twig diff --git a/web/profiles/custom/yalesites_profile/composer.json b/web/profiles/custom/yalesites_profile/composer.json index bd98b394fa..46e0914bf9 100644 --- a/web/profiles/custom/yalesites_profile/composer.json +++ b/web/profiles/custom/yalesites_profile/composer.json @@ -137,7 +137,8 @@ "update dark mode localstorage https://www.drupal.org/project/gin/issues/3387653": "https://git.drupalcode.org/project/gin/-/merge_requests/304.diff" }, "drupal/media_library_form_element": { - "Order Media items https://www.drupal.org/project/media_library_form_element/issues/3168027":"https://www.drupal.org/files/issues/2022-01-22/order_media_items-3168027-8.patch" + "Order Media items https://www.drupal.org/project/media_library_form_element/issues/3168027":"https://www.drupal.org/files/issues/2022-01-22/order_media_items-3168027-8.patch", + "Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated https://www.drupal.org/project/media_library_form_element/issues/3277273": "https://www.drupal.org/files/issues/2023-01-25/deprecated-explode-3277273-11.patch" }, "drupal/redirect": { "fix validation issue on adding url redirect": "https://www.drupal.org/files/issues/2023-08-09/3057250-65.patch" diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/css/header-footer-settings.css b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/css/header-footer-settings.css index c669edb84e..70cf2d3cf8 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/css/header-footer-settings.css +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/css/header-footer-settings.css @@ -37,7 +37,7 @@ content: ""; display: inline-block; height: 2rem; - left: 11rem; + left: 17rem; opacity: 1; position: absolute; top: 50%; diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/header-focus.svg b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/header-focus.svg new file mode 100644 index 0000000000..182c465792 --- /dev/null +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/header-focus.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/icons/lever-nav-center.svg b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/lever-nav-center.svg similarity index 100% rename from web/profiles/custom/yalesites_profile/modules/custom/ys_themes/icons/lever-nav-center.svg rename to web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/lever-nav-center.svg diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/icons/lever-nav-left.svg b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/lever-nav-left.svg similarity index 100% rename from web/profiles/custom/yalesites_profile/modules/custom/ys_themes/icons/lever-nav-left.svg rename to web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/lever-nav-left.svg diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/icons/lever-nav-right.svg b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/lever-nav-right.svg similarity index 100% rename from web/profiles/custom/yalesites_profile/modules/custom/ys_themes/icons/lever-nav-right.svg rename to web/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/lever-nav-right.svg diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/js/header-footer-settings.js b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/js/header-footer-settings.js index a87e07d56a..fc19616114 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/js/header-footer-settings.js +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/js/header-footer-settings.js @@ -31,16 +31,14 @@ } // Store radio input groups in an array - const headerRadioGroups = ['input[name="header_variation"]']; - const footerRadioGroups = ['input[name="footer_variation"]']; + const radioGroups = [ + 'input[name="header_variation"]', + 'input[name="footer_variation"]', + 'input[name="nav_position"]', + ]; // Apply the function to each radio input group - headerRadioGroups.forEach((group) => { - handleRadioInputs(group); - }); - - // Apply the function to each radio input group - footerRadioGroups.forEach((group) => { + radioGroups.forEach((group) => { handleRadioInputs(group); }); }, diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php index fb9887420a..619000b6ad 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php @@ -7,6 +7,7 @@ use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Session\AccountProxy; +use Drupal\ys_core\YaleSitesMediaManager; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -37,6 +38,13 @@ public function getFormId() { */ protected $currentUserSession; + /** + * The ys media manager. + * + * @var \Drupal\ys_core\YaleSitesMediaManager + */ + protected $ysMediaManager; + /** * Constructs the object. * @@ -44,17 +52,21 @@ public function getFormId() { * The factory for configuration objects. * @param \Drupal\Core\Path\CacheBackendInterface $cache_render * The Cache backend interface. - * @param \Drupal\Core\Session\AccountProxy $currentUserSession + * @param \Drupal\Core\Session\AccountProxy $current_user_session * The current user session. + * @param \Drupal\ys_core\YaleSitesMediaManager $ys_media_manager + * The media manager. */ public function __construct( ConfigFactoryInterface $config_factory, CacheBackendInterface $cache_render, AccountProxy $current_user_session, + YaleSitesMediaManager $ys_media_manager, ) { parent::__construct($config_factory); $this->cacheRender = $cache_render; $this->currentUserSession = $current_user_session; + $this->ysMediaManager = $ys_media_manager; } /** @@ -65,6 +77,7 @@ public static function create(ContainerInterface $container) { $container->get('config.factory'), $container->get('cache.render'), $container->get('current_user'), + $container->get('ys_core.media_manager'), ); } @@ -83,11 +96,6 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form = parent::buildForm($form, $form_state); $headerConfig = $this->config('ys_core.header_settings'); - $allowSecretItems = FALSE; - - if ($this->currentUserSession->getAccount()->id() == 1 || in_array('platform_admin', $this->currentUserSession->getAccount()->getRoles())) { - $allowSecretItems = TRUE; - } $form['#attached']['library'][] = 'ys_core/header_footer_settings'; $form['#attributes']['class'][] = 'ys-core-header-footer-settings'; @@ -95,9 +103,9 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form['header_variation'] = [ '#type' => 'radios', '#options' => [ - 'basic' => $this->t('Basic') . 'Basic header icon showing a site title and a simplified navigation.', - 'mega' => $this->t('Mega') . 'Mega header icon showing a site title and a flyout style mega menu.', - 'focus' => $this->t('Focus') . 'TKTKTK', + 'basic' => $this->t('Basic Nav') . 'Basic header icon showing a site title and a simplified navigation.', + 'mega' => $this->t('Mega Nav') . 'Mega header icon showing a site title and a flyout style mega menu.', + 'focus' => $this->t('Focus Nav') . 'TKTKTK', ], '#title' => $this->t('Header variation'), '#default_value' => ($headerConfig->get('header_variation')) ? $headerConfig->get('header_variation') : 'basic', @@ -138,16 +146,16 @@ public function buildForm(array $form, FormStateInterface $form_state) { ], ]; - if ($allowSecretItems) { - $form['all_headers'] = [ + if ($this->allowSecretItems()) { + $form['site_name_image_container'] = [ '#type' => 'details', - '#title' => $this->t('All Headers'), + '#title' => $this->t('Site Name Image'), ]; } - $form['basic_and_mega_header'] = [ + $form['nav_position_container'] = [ '#type' => 'details', - '#title' => $this->t('Basic & Mega'), + '#title' => $this->t('Navigation Position'), '#states' => [ 'disabled' => [ ':input[name="header_variation"]' => [ @@ -157,9 +165,21 @@ public function buildForm(array $form, FormStateInterface $form_state) { ], ]; - $form['focus_header'] = [ + $form['site_search_container'] = [ '#type' => 'details', - '#title' => $this->t('Focus'), + '#title' => $this->t('Site Search'), + '#states' => [ + 'disabled' => [ + ':input[name="header_variation"]' => [ + 'value' => 'focus', + ], + ], + ], + ]; + + $form['full_screen_homepage_image_container'] = [ + '#type' => 'details', + '#title' => $this->t('Full Screen Homepage Image'), '#states' => [ 'enabled' => [ ':input[name="header_variation"]' => [ @@ -171,43 +191,61 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form['desc_basic_container']['desc_basic'] = [ '#type' => 'markup', - '#prefix' => '

Basic

', - '#markup' => '

' . $this->t('The basic header of your website contains...') . '

', + '#prefix' => '

Basic Nav

', + '#markup' => '

' . $this->t('The basic nav can have any number of items but only displays up to two levels of navigation using single-column dropdown menus.') . '

', ]; $form['desc_mega_container']['desc_mega'] = [ '#type' => 'markup', - '#prefix' => '

Mega Header

', - '#markup' => '

' . $this->t('The mega header of your website can ...') . '

', + '#prefix' => '

Mega Nav

', + '#markup' => '

' . $this->t('The mega nav provides a third level of navigation, giving you the ability to organize menu links into columns with dropdown menus.') . '

', ]; $form['desc_focus_container']['desc_focus'] = [ '#type' => 'markup', - '#prefix' => '

Focus Header

', - '#markup' => '

' . $this->t('Focus header shows a full-width image on the homepage...') . '

', + '#prefix' => '

Focus Nav

', + '#markup' => '

' . $this->t('The focus nav combines a full image landing page with a single level of navigation.') . '

', ]; - if ($allowSecretItems) { - $form['all_headers']['site_name_image'] = [ - '#type' => 'file', - //'#upload_location' => 'public://header-logos', + if ($this->allowSecretItems()) { + $form['site_name_image_container']['site_name_image'] = [ + '#type' => 'managed_file', + '#upload_location' => 'public://site-name-images', '#multiple' => FALSE, - '#description' => $this->t('Allowed extensions: svg'), - // '#upload_validators' => [ - // 'file_validate_is_image' => [], - // 'file_validate_extensions' => ['svg'], - // ], + '#description' => $this->t('Replaces the site name text with an image.'), + '#upload_validators' => [ + 'file_validate_extensions' => ['svg'], + // 'file_validate_image_resolution' => [0, "180x180"], + ], '#title' => $this->t('Site Name Image'), - //'#default_value' => ($yaleConfig->get('custom_favicon')) ? $yaleConfig->get('custom_favicon') : NULL, - // '#theme' => 'image_widget', - // '#preview_image_style' => 'favicon_16x16', - // '#use_favicon_preview' => TRUE, + '#default_value' => ($headerConfig->get('site_name_image')) ? $headerConfig->get('site_name_image') : NULL, + '#theme' => 'image_widget', + '#preview_image_style' => 'media_library', + '#use_preview' => TRUE, + '#use_svg_preview' => TRUE, ]; } - $form['basic_and_mega_header']['enable_search_form'] = [ + $form['nav_position_container']['nav_position'] = [ + '#type' => 'radios', + '#options' => [ + 'left' => $this->t('Left') . 'Basic header icon showing a site title and a simplified navigation.', + 'center' => $this->t('Center') . 'Mega header icon showing a site title and a flyout style mega menu.', + 'right' => $this->t('Right') . 'TKTKTK', + ], + '#title' => $this->t('Navigation Position'), + '#description' => $this->t('Justifies the menu to the left, center, or right.'), + //'#default_value' => ($headerConfig->get('header_variation')) ? $headerConfig->get('header_variation') : 'basic', + '#attributes' => [ + 'class' => [ + 'variation-radios', + ], + ], + ]; + + $form['site_search_container']['enable_search_form'] = [ '#type' => 'checkbox', - '#description' => $this->t('Enable the search form located in the utility navigation area.'), + '#description' => $this->t('When enabled, a site search form will be displayed in the Utility Menu.'), '#title' => $this->t('Enable search form'), '#default_value' => $headerConfig->get('search.enable_search_form'), '#states' => [ @@ -217,14 +255,14 @@ public function buildForm(array $form, FormStateInterface $form_state) { ], ]; - $form['focus_header']['focus_header_image'] = [ - '#type' => 'media_library', - '#allowed_bundles' => ['image'], - '#title' => $this->t('Homepage Header image'), - '#required' => FALSE, - '#default_value' => ($headerConfig->get('focus_header_image')) ? $headerConfig->get('focus_header_image') : NULL, - '#description' => $this->t('Used only on the homepage when focus header is selected.'), - ]; + // $form['full_screen_homepage_image_container']['focus_header_image'] = [ + // '#type' => 'media_library', + // '#allowed_bundles' => ['image'], + // '#title' => $this->t('Homepage Header image'), + // '#required' => FALSE, + // //'#default_value' => ($headerConfig->get('focus_header_image')) ? $headerConfig->get('focus_header_image') : NULL, + // '#description' => $this->t('Used for the full-screen homepage image when the Focus Header is selected.'), + // ]; return $form; } @@ -233,7 +271,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { * {@inheritdoc} */ public function validateForm(array &$form, FormStateInterface $form_state) { - dpm($form_state); + //dpm($form_state->getValue('site_name_image')); } /** @@ -246,10 +284,17 @@ public function validateForm(array &$form, FormStateInterface $form_state) { */ public function submitForm(array &$form, FormStateInterface $form_state) { - // Footer settings config. + // Header settings config. $headerConfig = $this->config('ys_core.header_settings'); + // Handle the favicon filesystem if needed. + $this->ysMediaManager->handleMediaFilesystem( + $form_state->getValue('site_name_image'), + $headerConfig->get('site_name_image') + ); + $headerConfig->set('header_variation', $form_state->getValue('header_variation')); + $headerConfig->set('site_name_image', $form_state->getValue('site_name_image')); $headerConfig->set('search.enable_search_form', $form_state->getValue('enable_search_form')); $headerConfig->set('focus_header_image', $form_state->getValue('focus_header_image')); @@ -268,4 +313,20 @@ protected function getEditableConfigNames() { ]; } + /** + * If current user is platform admin or user 1, allow secret items. + * + * @return bool + * Returns TRUE if current user is a platform admin or user 1. + */ + private function allowSecretItems() { + $allowSecretItems = FALSE; + + if ($this->currentUserSession->getAccount()->id() == 1 || in_array('platform_admin', $this->currentUserSession->getAccount()->getRoles())) { + $allowSecretItems = TRUE; + } + + return $allowSecretItems; + } + } diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php index 2b3ea073d8..39aa41cdce 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php @@ -10,7 +10,7 @@ use Drupal\Core\Routing\RequestContext; use Drupal\google_analytics\Constants\GoogleAnalyticsPatterns; use Drupal\path_alias\AliasManagerInterface; -use Drupal\ys_core\FaviconManager; +use Drupal\ys_core\YaleSitesMediaManager; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -46,11 +46,11 @@ class SiteSettingsForm extends ConfigFormBase implements ContainerInjectionInter protected $requestContext; /** - * The favicon manager. + * The ys media manager. * - * @var \Drupal\ys_core\FaviconManager + * @var \Drupal\ys_core\YaleSitesMediaManager */ - protected $faviconManager; + protected $ysMediaManager; /** * Constructs a SiteInformationForm object. @@ -63,21 +63,21 @@ class SiteSettingsForm extends ConfigFormBase implements ContainerInjectionInter * The path validator. * @param \Drupal\Core\Routing\RequestContext $request_context * The request context. - * @param \Drupal\ys_core\FaviconManager $favicon_manager - * The favicon manager. + * @param \Drupal\ys_core\YaleSitesMediaManager $ys_media_manager + * The media manager. */ public function __construct( ConfigFactoryInterface $config_factory, AliasManagerInterface $alias_manager, PathValidatorInterface $path_validator, RequestContext $request_context, - FaviconManager $favicon_manager, + YaleSitesMediaManager $ys_media_manager, ) { parent::__construct($config_factory); $this->aliasManager = $alias_manager; $this->pathValidator = $path_validator; $this->requestContext = $request_context; - $this->faviconManager = $favicon_manager; + $this->ysMediaManager = $ys_media_manager; } /** @@ -89,7 +89,7 @@ public static function create(ContainerInterface $container) { $container->get('path_alias.manager'), $container->get('path.validator'), $container->get('router.request_context'), - $container->get('ys_core.favicon_manager'), + $container->get('ys_core.media_manager'), ); } @@ -215,6 +215,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#default_value' => ($yaleConfig->get('custom_favicon')) ? $yaleConfig->get('custom_favicon') : NULL, '#theme' => 'image_widget', '#preview_image_style' => 'favicon_16x16', + '#use_preview' => TRUE, '#use_favicon_preview' => TRUE, ]; @@ -268,7 +269,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) { public function submitForm(array &$form, FormStateInterface $form_state) { // Handle the favicon filesystem if needed. - $this->faviconManager->handleFaviconFilesystem( + $this->ysMediaManager->handleMediaFilesystem( $form_state->getValue('favicon'), $this->configFactory->getEditable('ys_core.site')->get('custom_favicon') ); diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/FaviconManager.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php similarity index 84% rename from web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/FaviconManager.php rename to web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php index ad19a6d295..9274d1a313 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/FaviconManager.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php @@ -10,9 +10,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Service for managing the favicon associated with a YaleSite. + * Service for managing custom media associated with a YaleSite. */ -class FaviconManager extends ControllerBase implements ContainerInjectionInterface { +class YaleSitesMediaManager extends ControllerBase implements ContainerInjectionInterface { /** * Configuration Factory. @@ -141,33 +141,33 @@ public function getFavicons() { } /** - * Handles the creation and deletion of favicons in the filesystem. + * Handles the creation and deletion of custom media in the filesystem. * * @param array $formValue - * An array with the form value of the favicon selected, if any. + * An array with the form value of the media selected, if any. * @param array $configValue - * An array with the config value of the favicon saved, if any. + * An array with the config value of the media saved, if any. */ - public function handleFaviconFilesystem($formValue, $configValue) { - $faviconFormValue = $formValue ? $formValue[0] : NULL; - $faviconConfigValue = $configValue ? $configValue[0] : NULL; + public function handleMediaFilesystem($formValue, $configValue) { + $incomingFormValue = $formValue ? $formValue[0] : NULL; + $incomingConfigValue = $configValue ? $configValue[0] : NULL; - if ($faviconFormValue != $faviconConfigValue) { + if ($incomingFormValue != $incomingConfigValue) { $fileEntity = $this->entityTypeManager->getStorage('file'); - // First, delete any previously set favicons. - if ($faviconConfigValue) { + // First, delete any previously set media. + if ($incomingConfigValue) { /** @var \Drupal\file\Entity $file */ - $file = $fileEntity->load($faviconConfigValue); + $file = $fileEntity->load($incomingConfigValue); if ($file) { $file->delete(); } } - // Next, set the new favicon. - if ($faviconFormValue) { + // Next, set the new media. + if ($incomingFormValue) { /** @var \Drupal\file\Entity $file */ - $file = $fileEntity->load($faviconFormValue); + $file = $fileEntity->load($incomingFormValue); $file->setPermanent(); $file->save(); } diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module index 5c62009014..f659e3dd8a 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module @@ -239,7 +239,7 @@ function ys_core_page_attachments(array &$page) { } // Custom or fallback favicons. - $favicons = \Drupal::service('ys_core.favicon_manager')->getFavicons(); + $favicons = \Drupal::service('ys_core.media_manager')->getFavicons(); foreach ($favicons as $name => $favicon) { $page['#attached']['html_head'][] = [$favicon, $name]; } @@ -258,7 +258,7 @@ function ys_core_preprocess_image_widget(&$variables) { */ $element = $variables['element']; - if (isset($element['#use_favicon_preview'])) { + if (isset($element['#use_preview'])) { $variables['attributes'] = [ 'class' => [ @@ -322,7 +322,8 @@ function ys_core_preprocess_image_widget(&$variables) { // Sets a twig variable to use the favicon preview. // @see web/themes/custom/ys_admin_theme/templates/content-edit/image-widget.html.twig - $variables['use_favicon_preview'] = $element['#use_favicon_preview']; + $variables['use_favicon_preview'] = $element['#use_favicon_preview'] ?? NULL; + $variables['use_svg_preview'] = $element['#use_svg_preview'] ?? NULL; $variables['data'] = []; foreach (Element::children($element) as $child) { diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.services.yml b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.services.yml index 4911ae2a7a..c6f390604e 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.services.yml +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.services.yml @@ -12,6 +12,6 @@ services: arguments: ['@config.factory'] tags: - { name: twig.extension } - ys_core.favicon_manager: - class: Drupal\ys_core\FaviconManager + ys_core.media_manager: + class: Drupal\ys_core\YaleSitesMediaManager arguments: ['@config.factory', '@entity_type.manager', '@file_url_generator'] diff --git a/web/themes/custom/ys_admin_theme/templates/content-edit/file-managed-file--svg.html.twig b/web/themes/custom/ys_admin_theme/templates/content-edit/file-managed-file--svg.html.twig new file mode 100644 index 0000000000..818cb54485 --- /dev/null +++ b/web/themes/custom/ys_admin_theme/templates/content-edit/file-managed-file--svg.html.twig @@ -0,0 +1,67 @@ +{# +/** + * @file + * Theme override to display a file form widget. + * + * Available variables: + * - main_items: Main render elements of the file or image widget: + * file name, upload input, upload and remove buttons and hidden inputs. + * - data: Other render elements of the image widget like preview, alt or title, + * or the description input and the display checkbox of the file widget. + * - display: A flag indicating whether the display field is visible. + * - attributes: HTML attributes for the containing element. + * - multiple: Whether this widget is the part of a multi-value file widget or + * not. + * - upload: Whether the file upload input is displayed or not. + * - has_value: true if the widget already contains a file. + * - has_meta: true when the display checkbox or the description, alt or title + * inputs are enabled and at least one of them is visible. + * + * @see template_preprocess_file_managed_file() + * @see claro_preprocess_file_managed_file() + */ +#} +{% + set classes = [ + 'js-form-managed-file', + 'form-managed-file', + multiple ? 'is-multiple' : 'is-single', + upload ? 'has-upload' : 'no-upload', + has_value ? 'has-value' : 'no-value', + has_meta ? 'has-meta' : 'no-meta', + ] +%} + +
+ {{ main_items.filename }} + {{ main_items|without('filename') }} +
+ + {% if has_meta or data.preview %} +
+
+ {% if data.preview %} +
+
+ Currently selected site name image +
+
+ {% endif %} + + {% if data.description or display or data.alt or data.title %} +
+ {{ data.description }} + {% if display %} + {{ data.display }} + {% endif %} + {{ data.alt }} + {{ data.title }} +
+ {% endif %} +
+
+ {% endif %} + + {# Every third-party addition will be rendered here. #} + {{ data|without('preview', 'alt', 'title', 'description', 'display') }} + diff --git a/web/themes/custom/ys_admin_theme/templates/content-edit/image-widget.html.twig b/web/themes/custom/ys_admin_theme/templates/content-edit/image-widget.html.twig index 1cfa01fa4e..a97bc8558c 100644 --- a/web/themes/custom/ys_admin_theme/templates/content-edit/image-widget.html.twig +++ b/web/themes/custom/ys_admin_theme/templates/content-edit/image-widget.html.twig @@ -26,9 +26,10 @@ it will load the default Claro version #} {% if use_favicon_preview %} {% include 'file-managed-file--favicon.html.twig' %} +{% elseif use_svg_preview %} + {% include 'file-managed-file--svg.html.twig' %} {% else %} {% include 'file-managed-file.html.twig' %} {% endif %} {% set attributes = attributes.addClass('form-managed-file--image') %} - From f3155b96281f2741e9b9b4823939a178b8a66b80 Mon Sep 17 00:00:00 2001 From: David Blankenship <128765777+dblanken-yale@users.noreply.github.com> Date: Tue, 17 Oct 2023 16:59:07 -0400 Subject: [PATCH 11/91] YALB-1443: Bug: Disable links in quicklink content field (#431) * Disables links being present inside of quick link content fields * Converts any existing quick link blocks to remove link elements. * Reverts search_api_html_element_filter to use the main branch now that our patch was accepted into the main repository. --- composer.json | 4 - .../custom/yalesites_profile/composer.json | 5 +- ...d.block_content.quick_links.field_text.yml | 2 +- .../modules/custom/ys_core/ys_core.install | 84 +++++++++++++++++++ 4 files changed, 89 insertions(+), 6 deletions(-) create mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install diff --git a/composer.json b/composer.json index 86f02c389d..9596e909a0 100644 --- a/composer.json +++ b/composer.json @@ -7,10 +7,6 @@ "type": "path", "url": "web/profiles/custom/yalesites_profile" }, - "drupal/search_api_html_element_filter": { - "type": "git", - "url": "https://git.drupalcode.org/issue/search_api_html_element_filter-3390283.git" - }, "drupal": { "type": "composer", "url": "https://packages.drupal.org/8" diff --git a/web/profiles/custom/yalesites_profile/composer.json b/web/profiles/custom/yalesites_profile/composer.json index e3a700b65a..991ab9c23e 100644 --- a/web/profiles/custom/yalesites_profile/composer.json +++ b/web/profiles/custom/yalesites_profile/composer.json @@ -78,7 +78,7 @@ "drupal/role_delegation": "^1.2", "drupal/search_api": "^1.25", "drupal/search_api_exclude": "^2.0", - "drupal/search_api_html_element_filter": "dev-3390283-drupal-10-symfony", + "drupal/search_api_html_element_filter": "^1.0", "drupal/section_library": "^1.1", "drupal/selective_better_exposed_filters": "^3.0@beta", "drupal/simple_sitemap": "^4.1", @@ -141,6 +141,9 @@ }, "drupal/redirect": { "fix validation issue on adding url redirect": "https://www.drupal.org/files/issues/2023-08-09/3057250-65.patch" + }, + "drupal/allowed_formats": { + "allowed formats missing default value": "https://www.drupal.org/files/issues/2022-02-02/2950548-allowed_formats-missing_default_value.patch" } } } diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.quick_links.field_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.quick_links.field_text.yml index eb960428ac..ba91b756d5 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.quick_links.field_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.quick_links.field_text.yml @@ -11,7 +11,7 @@ dependencies: third_party_settings: allowed_formats: allowed_formats: - - restricted_html + - heading_html id: block_content.quick_links.field_text field_name: field_text entity_type: block_content diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install new file mode 100644 index 0000000000..273fc459a8 --- /dev/null +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install @@ -0,0 +1,84 @@ +condition('type', 'quick_links') + ->allRevisions(); + + $ids = $query->execute(); + $block_content_storage = \Drupal::entityTypeManager()->getStorage('block_content'); + + foreach ($ids as $revision_id => $id) { + $block = $block_content_storage->loadRevision($revision_id); + + if ($block && $block->id() == $id) { + $body = $block->get('field_text')->getValue(); + foreach ($body as $key => $array_value) { + $array_value = ys_core_sanitize_content( + $array_value, ['em', 'p', 'strong'] + ); + $array_value = ys_core_set_format($array_value, 'heading_html'); + + $body[$key] = $array_value; + } + $block->set('field_text', $body); + $block->save(); + } + } +} + +/** + * Sanitizes the value of an array object with allowed_tags. + * + * @param array $content_array + * The content array. + * @param array $allowed_tags + * The allowed tags. + * + * @return array + * The sanitized content array. + */ +function ys_core_sanitize_content($content_array, $allowed_tags = []) { + if (!array_key_exists('value', $content_array)) { + return $content_array; + } + + $value = $content_array['value']; + $content_array['value'] = Xss::filter($value, $allowed_tags); + + return $content_array; +} + +/** + * Sets the format of an array object. + * + * @param array $content_array + * The content array. + * @param string $new_format + * The new format. + * + * @return array + * The content array with the new format. + */ +function ys_core_set_format($content_array, $new_format = 'heading_html') { + if (!array_key_exists('format', $content_array)) { + return $content_array; + } + + $content_array['format'] = $new_format; + + return $content_array; +} From 97273832fa4b6549f273d3602f8fc95dffdad758 Mon Sep 17 00:00:00 2001 From: Vincent Massaro Date: Thu, 19 Oct 2023 16:29:56 -0400 Subject: [PATCH 12/91] feat(YALB-1242): allow localdev to use pantheon secrets * feat: create and copy secrets file into lando container * feat: refactor local secrets handling per pantheon-secrets-sdk instructions * chore: bump composer platform php req to 8.1 * chore: update to php 8.2 to keep in sync with D10 work --- .gitignore | 4 +++- .lando.local.example.yml | 1 + composer.json | 2 +- scripts/local/setup.sh | 4 ++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fa11765e87..722ca9fef3 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,6 @@ # Ignore SimpleTest multi-site environment. /web/sites/simpletest - # Ignore custom modules managed by Composer. # # When a development team creates one or more custom modules that @@ -130,3 +129,6 @@ web/profiles/custom/yalesites_profile/vendor/ /atomic /component-library-twig /tokens + +# Secrets for local use +secrets.json diff --git a/.lando.local.example.yml b/.lando.local.example.yml index 3d1162d2fc..c2631df289 100644 --- a/.lando.local.example.yml +++ b/.lando.local.example.yml @@ -42,5 +42,6 @@ services: overrides: environment: COMPOSER_PROCESS_TIMEOUT: 1800 + CUSTOMER_SECRETS_FAKE_FILE: /app/secrets.json # This is needed to expose the reverse proxy to the xdebug port (9003) xdebug: true diff --git a/composer.json b/composer.json index 9596e909a0..0b956b20c7 100644 --- a/composer.json +++ b/composer.json @@ -104,7 +104,7 @@ "preferred-install": "dist", "sort-packages": true, "platform": { - "php": "7.4" + "php": "8.2" }, "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, diff --git a/scripts/local/setup.sh b/scripts/local/setup.sh index 155fc3f8c6..f6d206ce59 100755 --- a/scripts/local/setup.sh +++ b/scripts/local/setup.sh @@ -28,6 +28,10 @@ fi # Start lando and create containers. lando start +# Generate local secrets file. +terminus plugin:install pantheon-systems/terminus-secrets-manager-plugin +terminus secret:site:local-generate yalesites-platform --filepath=./secrets.json + # Install packages and install Drupal using yalesites_profile. npm install npm run build-with-install From 77670d3c8c1bbe47d9c68610427d461e9a8af334 Mon Sep 17 00:00:00 2001 From: Jim Vomero Date: Thu, 19 Oct 2023 16:32:03 -0400 Subject: [PATCH 13/91] docs(YALB-1204): updating all custom module readme files --- .../modules/custom/ys_alert/README.md | 12 ++++++-- .../modules/custom/ys_captcha/README.md | 23 +-------------- .../modules/custom/ys_core/README.md | 15 ++++++---- .../modules/custom/ys_layouts/README.md | 4 +++ .../modules/custom/ys_mail/README.md | 24 +--------------- .../modules/custom/ys_node_access/README.md | 4 +++ .../modules/custom/ys_secrets/README.md | 28 +------------------ .../modules/custom/ys_themes/README.md | 10 +++++-- .../modules/custom/ys_toolbar/README.md | 8 ++++++ .../modules/custom/ys_views_basic/README.md | 10 +++++++ 10 files changed, 56 insertions(+), 82 deletions(-) create mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_layouts/README.md create mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_node_access/README.md create mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_toolbar/README.md create mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/README.md diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/README.md b/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/README.md index 436aa138a6..f7a7ca7100 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/README.md +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/README.md @@ -1,5 +1,11 @@ # YaleSites Alert -This module creates an alert banner to display a message across all pages of a -YaleSite. A backend interface allows site owners to enable or disable alerts. -Message can be an announcement, marketing, or emergency alert. +## Description +The YaleSite Alert Banner module enhances your website by providing a versatile alert banner that can display messages on all pages. Whether you want to make announcements, run marketing campaigns, or communicate emergency information, this module has got you covered. + +## Features +- **Alert Management Interface**: We offer a user-friendly admin interface at admin/yalesites/alert for efficient management of alerts. +- **Global Alert Display**: Enabled alerts are prominently displayed across all pages of your website, ensuring your message reaches your audience effectively. +- **Toggle Switch**: A convenient toggle switch allows site owners to enable or disable alerts at their convenience. +- **Alert Types**: Customize your message by specifying the alert type: announcement, marketing, or emergency. Each type has a different visual treatment and mechanism for minimizing or dismissing. +- **Confirmation Message**: For emergency alerts, we've added an extra layer of caution. Authors will receive a confirmation message before setting emergency alerts, helping prevent accidental broadcasts. diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_captcha/README.md b/web/profiles/custom/yalesites_profile/modules/custom/ys_captcha/README.md index 8feba4298a..fd18350ca0 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_captcha/README.md +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_captcha/README.md @@ -1,24 +1,3 @@ # YaleSites Recaptcha -This module customizes recaptcha settings for the YaleSites platform. - -This includes: - -- Setting the recaptcha v2 and v3 API keys from a value stored in a Terminus secrets file. -- Disabling the recaptcha API key field to improve the admin interface. - -## Requirements - -Recaptcha API keys must be set in a `secrets.json` file to use the service. -After enabling this module, verify that the API keys are set. - -```bash -lando drush config-get recaptcha.settings --include-overridden -lando drush config-get recaptcha_v3.settings --include-overridden -``` - -If this file is missing, then pull the latest files into the local environment. - -```bash -lando pull --database=none --files=dev --code=none -``` +This module ensures all sites on the YaleSites platform have Google ReCaptcha setup in a consistant way. Currently this module is only used to obfuscate the API keys within the Drupal admin interface. diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/README.md b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/README.md index 8edcfa9f98..08c940efb8 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/README.md +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/README.md @@ -1,6 +1,11 @@ -# YaleSites Starterkit +# YaleSites Core -This module is used to organize custom functionality that is core to the -YaleSites platform. Code is included in the ys_core module if it does not fit -within an existing custom module. Custom code should be placed in a different -module if it can offer utility to non-YaleSites properties. +## Description +The YaleSites Core Functionality module serves as the central repository for organizing custom functionality that is fundamental to the YaleSites platform. Within this module, you'll find templates, assets, configuration overrides, and custom code that are vital for the seamless operation of all sites hosted on the platform. + +However, before adding new features or functionality to this module, platform developers are encouraged to contemplate the creation of separate custom modules. These custom modules can encapsulate specific sets of features, enhancing modularity and ensuring that the codebase remains clean and organized. This approach promotes a more efficient and maintainable development process for the YaleSites platform. + +## Features +- **Sitewide Elements**: This category covers a wide array of elements including plugins, forms, templates, and various assets used for managing sitewide components such as the site header, footer, and breadcrumbs. These elements may also extend into the styling realm within the Atomic theme and the component library. +- **Install Configuration**: The module houses default values for YaleSites-specific configuration files used during the creation of new sites on the platform. While technically not mandatory, maintaining these install files is considered a best practice, as they ensure consistency and serve as a reference point for values that should ideally reside in the profile's config/sync directory. +- **Hooks and Custom Functionality**: It provides a growing list of hooks for adding and altering form elements, tokens, caching rules, and website behavior. These hooks empower developers to customize and fine-tune the platform's behavior to meet specific requirements. diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_layouts/README.md b/web/profiles/custom/yalesites_profile/modules/custom/ys_layouts/README.md new file mode 100644 index 0000000000..b53a6890de --- /dev/null +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_layouts/README.md @@ -0,0 +1,4 @@ +# YaleSites Layouts + +## Description +The layouts module organizes work related to YaleSite's implementation of Layout Builder. This includes the definition of custom layouts including the banner, page meta, and two column sections. diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_mail/README.md b/web/profiles/custom/yalesites_profile/modules/custom/ys_mail/README.md index 5480d71253..81cb49613b 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_mail/README.md +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_mail/README.md @@ -1,25 +1,3 @@ # YaleSites Mail -This module customizes emails sent from sites on the YaleSites platform. - -This includes: - -- Setting the MailChimp API from a value stored in a Terminus secrets file. -- Disabling the MailChimp API key field to improve the admin interface. -- Altering email metadata to ensure useful data is sent to MailChimp. - -## Requirements - -A MailChimp API key must be set in a `secrets.json` file to use the -transactional email service. After enabling this module, verify that -the api key is set. - -```bash -lando drush config-get mailchimp_transactional.settings mailchimp_transactional_api_key --include-overridden -``` - -If this file is missing, then pull the latest files into the local environment. - -```bash -lando pull --database=none --files=dev --code=none -``` +The YaleSites Mail module ensures all sites on the platform have the MailChimp transactional email handling setup in a consistant way. Currently this module is only used to obfuscate the API keys within the Drupal admin interface and make minor changes to email handling. \ No newline at end of file diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_node_access/README.md b/web/profiles/custom/yalesites_profile/modules/custom/ys_node_access/README.md new file mode 100644 index 0000000000..912f8b47cc --- /dev/null +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_node_access/README.md @@ -0,0 +1,4 @@ +# YaleSites Node Access + +## Description +The YaleSites Node Access module offers a flexible mechanism that allows site authors to control access to the canonical view of a node exclusively for CAS authenticated users. This feature serves as a valuable tool for selectively restricting access to specific page content. However, it is important to note that this module is not intended to function as a secure repository for sensitive content. Other mechanisms within the platform may still expose assets and metadata associated with these nodes to users who are not authenticated, which means that sensitive content should be handled through alternative, more secure means. diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_secrets/README.md b/web/profiles/custom/yalesites_profile/modules/custom/ys_secrets/README.md index ce93feb29a..478ff77bc9 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_secrets/README.md +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_secrets/README.md @@ -1,29 +1,3 @@ # YaleSites Secrets Mannager -The YaleSites upstream project and all of its configurations are stored in a -public repository. As a result sensative information such as API keys are stored -in the Pantheon secrets.json file instead of the standard Drupal config YAML -files. Utilities in this module help to load API keys from the secrets file at -runtime. - -## How to add a secret API key to the platform - -Step 1. Within the Drupal interface add a fake API key with the value 'HIDDEN'. -Config-export the changes to store the value as stagged configuration. For -example, see: web/profiles/custom/yalesites_profile/config/sync/mailchimp_transactional.settings.yml - -Step 2. Disable the API key field within the Drupal interface using a -ys_mail_form_FORM_ID_alter() so that future site builders are not confused by -the 'HIDDEN' value. The `disableField` method is useful for disabling the field. -It is not obvious when Drupal's config-override system is being used to replace -a value so we want to leave clues for future developers. For example, see -ys_mail_form_mailchimp_transactional_admin_settings_alter() - -Step 3. Set the API key in the appropriate Pantheon environment. This will -require the [Terminus Secrets Plugin](https://github.com/pantheon-systems/terminus-secrets-plugin). -Following the format: `terminus secrets:set site.env key value` - -Step 4. Create a class to override Drupal configuration with values stored in -the secrets.json file. This class will map the name of the configuration in -Drupal with the key in the secrets.json file. See example: -Drupal/ys_mail/Config/MailConfigOverrides +This module is no longer used and can be removed once all sites adopt the new environmented variables. diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/README.md b/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/README.md index 3e9ca02834..afe37cf78f 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/README.md +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/README.md @@ -1,4 +1,10 @@ # YaleSites Themes -This module is used to support YaleSites themes. This includes functionality -that allows site owners to override global theme settings. +## Description +The YaleSites Themes module empowers site administrators with a suite of features that put them in control of their website's visual identity. Our primary objective is to offer site owners the tools they need to personalize the look and feel of their websites. This feature-rich module not only enhances customization capabilities but also instills confidence in site owners, enabling them to make informed decisions and achieve their desired outcomes. + +## Features +- **Levers**: This module introduces a user-friendly theme settings form accessible via the admin toolbar. This intuitive form opens in a modal dialog and guides site owners through the process of selecting site colors from a curated set of palettes. Additionally, it provides control over other site-wide settings, influencing the global styling of the website. The tool's preview functionality allows authors to visualize theme settings before implementation, ensuring their decisions align with their vision. +- **Dials**: The module offers granular control over theme settings at the level of individual components. Site authors can fine-tune background colors, layouts, and orientations of these components, providing them with the flexibility to craft their unique narrative and visual experience. +- **Theme Settings Management**: This module streamlines the organization of theme settings and incorporates them into the code as data attributes and CSS custom variables. This approach enhances the maintainability and consistency of the theme settings, making it easier for developers to manage and customize the site's visual elements. +- **Install Configuration**: The module houses default values for theme-related configuration files used during the creation of new sites on the platform. While technically not mandatory, maintaining these install files is considered a best practice, as they ensure consistency and serve as a reference point for values that should ideally reside in the profile's config/sync directory. diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_toolbar/README.md b/web/profiles/custom/yalesites_profile/modules/custom/ys_toolbar/README.md new file mode 100644 index 0000000000..6cb3306987 --- /dev/null +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_toolbar/README.md @@ -0,0 +1,8 @@ +# YaleSites Toolbar + +## Description +The YaleSites Toolbar module enhances the Drupal Admin toolbar, tailored to empower site owners in managing their websites effectively. This module integrates with and builds upon the Toolbar and Gin Toolbar modules, customizing the authoring experience for the YaleSites community. + +## Features +- **Enhanced Local Task Links**: The module introduces a collection of new local task links, offering quick access to essential functions such as editing, publishing, unpublishing, and changing the layout of a node. These links provide a consistent and efficient toolset for site authors, simplifying common tasks and streamlining content management. +- **Labels and Icons**: To enhance usability and user understanding, several toolbar items receive refreshed names and icons. This thoughtful approach establishes a standardized naming convention that aligns with Yale's training practices, ensuring that all authors have a clear grasp of content management intricacies. diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/README.md b/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/README.md new file mode 100644 index 0000000000..128e633bb3 --- /dev/null +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/README.md @@ -0,0 +1,10 @@ +# YaleSites Views Basic + +## Description +The View Basic module is a custom utility, built on Drupal Views, that gives advanced users with the ability to generate dynamic content lists based on content metadata. This feature lets users curate the collections of news, events, people, and pages across various sections of their website more effectively. This module serves as a valuable resource for authors seeking to create multiple content streams, leveraging taxonomy and other filters to tailor their content displays. It gives them the ability to create custom queries with little training and in a no-code interface. + +## Features +- **Field Plugin**: Data describing a view is stored within a custom schema as a serialized object. This modular design allows for seamless addition and removal of features without compromising metadata storage integrity. +- **Field Widget**: Users interact with a specialized form for constructing queries and render logic using a user-friendly, no-code interface. Natural language and intuitive icons simplify query building, requiring minimal training for authors. +- **Field Formatter**: Metadata is rendered consistently through custom templates, blocks, display modes, and a Drupal View. This consistency ensures that content creators construct Views that align with the YaleSites Design System. +- **View Plugins**: The module incorporates numerous view plugins that interpret view definitions into sorts, filters, pagers, and styles compatible with the core Drupal Views module, enhancing functionality and flexibility. From 5513986a18e2cc54310ecf2e991a136edb92765a Mon Sep 17 00:00:00 2001 From: Jim Vomero Date: Thu, 19 Oct 2023 16:32:54 -0400 Subject: [PATCH 14/91] docs(YALB-1155): Add data model best practices do developer Readme file * docs (YALB-1155): Add data model best practices do developer Readme file * docs (YALB-1154): Add documentation about dials --- docs/development.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/development.md b/docs/development.md index 2362ddde52..029b11a304 100644 --- a/docs/development.md +++ b/docs/development.md @@ -91,3 +91,25 @@ lando drush migrate-rollback --group ys_starterkit # Update partial configuration if altering the migration configuration. lando drush cim --partial --source=/app/web/profiles/custom/yalesites_profile/modules/custom/ys_starterkit/config/install -y ``` + +## Data model best practices + +A well-structured data model ensures efficiency, maintainability, and scalability within the YaleSites platform. Below are some guiding principles adopted by the platform maintainers: + +- **Documentation Maintenance**: Keep the data model documentation up to date. This Teams document includes entity definitions, text formats, display mode definitions, and other content settings. Whenever there's a change to a content type, block, paragraph, taxonomy, or any other entity, make it a priority to update this central documentation source. Maintaining accurate documentation is crucial for team collaboration and project continuity. +- **Normalize Data**: Follow established principles of database normalization to minimize data redundancy and enhance data integrity. Leverage reference fields and relationships to establish connections between related content instead of duplicating data. This approach ensures that the data remains consistent and predictable. +- **Reuse Fields**: Reduce the proliferation of field definitions by reusing fields across multiple content bundles, as long as they serve a similar business purpose. For instance, if several content types (e.g., pull quote, video description, banner intro) require a 'field_text' storage, consider reusing this field definition to maintain consistency and simplify content management. +- **Avoid Single-Purpose Fields or Entities**: When adding fields or entities, strive to make them versatile enough to fulfill multiple purposes across YaleSites. For example, while a dedicated 'Speaker' field might seem useful for an event content type, evaluate whether this feature could be addressed using a content-spotlight block. Add new fields only when they contribute to sorting, filtering, or theming content in specific ways. +- **Build with Blocks**: Embrace the power of the layout builder by utilizing blocks to define new components. YaleSites relies on blocks for editorial controls and mapping content to the component library. This includes both custom blocks (content entities) and programmatically defined blocks (plugins). +- **Use Paragraphs for Nested Content**: Paragraphs remain a valuable tool, particularly when dealing with components that contain an indeterminate number of children, such as accordion items, tab items, or gallery items. The Paragraphs module provides intuitive widgets that offer an effective editorial interface for managing reference content within these complex components. + +## Adding a 'dial' for theming a component + +This project features custom fields for block theming. For example, the divider block includes settings for position, width, and animation style. In contrast to traditional Drupal projects using predefined list-field options in the configuration file, we've chosen a distinct approach. Our approach prioritizes the ability to add, remove, and dynamically adjust these options in future YaleSites themes and platform iterations, ensuring enduring flexibility. This system accommodates unique values for each field instance and supports changes over time, avoiding database integrity concerns. To add a dial: + +1. Begin by adding the desired style field to the custom block using the standard field UI. Whenever feasible, utilize an existing field like field_style_position, field_style_width, or field_style_variation. +2. Configure the display of this field using the Field UI. Ensure that the style field is presented without a label and employs the 'key' formatter. +3. Export the site configuration to generate all the associated field YAML files. +4. In the event that this is a newly created field, update the field storage configuration file. Specify the callback function for values using `allowed_values_function: ys_themes_allowed_values_function`. +5. Proceed to update the key-value pairs within `ys_themes.component_overrides.yml`. Remember to make these updates in two locations: the config/sync directory and the module/install directory. +6. With these adjustments in place, you can now connect these values to components within the theme templates, achieving the desired styling and functionality. From d772d5878654f64d116624561bb2597e4e7b37f8 Mon Sep 17 00:00:00 2001 From: Vincent Massaro Date: Thu, 19 Oct 2023 21:52:22 -0400 Subject: [PATCH 15/91] ci: add YALESITES_BUILD_TOKEN to semantic release action --- .github/workflows/release.yml | 3 +-- package.json | 10 +--------- .../yalesites_profile/yalesites_profile.info.yml | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6632cb701..ae897c4d51 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: branches: master env: GH_TOKEN: ${{ secrets.YALESITES_BUILD_TOKEN }} + YALESITES_BUILD_TOKEN: ${{ secrets.YALESITES_BUILD_TOKEN }} jobs: build: runs-on: ubuntu-latest @@ -15,8 +16,6 @@ jobs: uses: actions/setup-node@v3 - name: Install - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} run: npm install - name: Release diff --git a/package.json b/package.json index e6397dcffc..941512f18f 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "files": [ "web/profiles/custom/yalesites_profile/yalesites_profile.info.yml" ], - "from": "version: .*", + "from": "#version:", "to": "version: ${nextRelease.version}", "results": [ { @@ -76,14 +76,6 @@ ] } ], - [ - "@semantic-release/git", - { - "assets": [ - "web/profiles/custom/yalesites_profile/yalesites_profile.info.yml" - ] - } - ], "@semantic-release/release-notes-generator", "@semantic-release/github" ] diff --git a/web/profiles/custom/yalesites_profile/yalesites_profile.info.yml b/web/profiles/custom/yalesites_profile/yalesites_profile.info.yml index fcbb53f4d6..3818e01ef7 100644 --- a/web/profiles/custom/yalesites_profile/yalesites_profile.info.yml +++ b/web/profiles/custom/yalesites_profile/yalesites_profile.info.yml @@ -1,6 +1,6 @@ name: YaleSites Profile type: profile -version: 1.0 +#version: description: 'Install profile for managing YaleSites platform sites.' core_version_requirement: '^9 || ^10' From cf080003728919a7c7afaf33d6a986b0fc2edf21 Mon Sep 17 00:00:00 2001 From: David Blankenship <128765777+dblanken-yale@users.noreply.github.com> Date: Mon, 23 Oct 2023 13:15:59 -0400 Subject: [PATCH 16/91] YALB-1472: Bug: Image generation failures (#423) * feat(YALB-1472): enable area limits to imagemagick Even with the file limit, it still bases the memory on the area of the image (width * height * bits needed by imagemagick). By adding the area limit, if the width * height gets over 20 megapixels, it utilizes disk over memory. This does not mean that it'll load every time, but it now gives a chance for all of the images to finish. * feat(YALB-1472): memory and map needed For a successful image generation, memory/map limits are still needed. While having the area tells it when to use disk space to map, the mapping must be filling up and erroring still. While this does not ensure an image every time, it has usually worked on the 2nd try. * fix(YALB-1472): limit images to 4K resolution Given what was said by Pantheon, and the calculator provided, I thought we'd try to see how images would do limiting to the 4k resolution of 3840x2160 while leaving in our imagemagick limits in case somehow an image gets on the server that would cause it to error. This will give larger images a chance to load should they ever get on there while limiting the amount of memory needed for uploaded images. * feat(YALB-1472): add image conversion scripts In order for images to load properly, we made the decision to limit the width and height to a 4k display. There are sites out there that already have these larger images, and will not get resized. These are scripts to assist in handling this. - calculateMB.sh: returns the amount of memory an image will use to convert to our currently highest resolution - get_images.sh: retrieves all files (images) under the /files directory of a Pantheon site - put_images.sh: places all files (images) under a local directory to a directory on a Pantheon site - fix_images.sh: Evaluates all jpgs inside of a directory. If they are above the threshold that we desire of a width/height, it attempts to resize it in place. - doItAll.sh: My attempt to have one script that will retrieve images, convert them, and reupload them in one script (still a WIP) --- scripts/local/images/calculateMB.sh | 49 +++++++ scripts/local/images/doItAll.sh | 11 ++ scripts/local/images/fix_images.sh | 120 ++++++++++++++++++ scripts/local/images/get_images.sh | 39 ++++++ scripts/local/images/put_images.sh | 35 +++++ ...ld.field.media.image.field_media_image.yml | 2 +- .../config/sync/imagemagick.settings.yml | 2 +- 7 files changed, 256 insertions(+), 2 deletions(-) create mode 100755 scripts/local/images/calculateMB.sh create mode 100755 scripts/local/images/doItAll.sh create mode 100755 scripts/local/images/fix_images.sh create mode 100755 scripts/local/images/get_images.sh create mode 100755 scripts/local/images/put_images.sh diff --git a/scripts/local/images/calculateMB.sh b/scripts/local/images/calculateMB.sh new file mode 100755 index 0000000000..8073f1ec54 --- /dev/null +++ b/scripts/local/images/calculateMB.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +# This script is used to check the possible memory +# allocation ImageMagick would need to convert a base image +# into our currently largest resolution of a file. +# +# Usage: ./calculateMB.sh +# - image: The image to check the memory usage for +# +# Example: ./calculateMB.sh ~/Pictures/IMG_0001.JPG +# - This will return the memory usage for IMG_0001.JPG in megabytes + +getMB() { + local resolution + resolution=$(getResolutionFromImage "$1") + calculateMemoryUsage "$(retrieveWidth "$resolution")" "$(retrieveHeight "$resolution")" +} + +getResolutionFromImage() { + local image="$1" + local resolution + + # Use double quotes around "$image" to handle spaces in the filename + resolution=$(identify -format "%wx%h" "$image") + + echo "$resolution" +} + +retrieveWidth() { + echo "${1%x*}" +} + +retrieveHeight() { + echo "${1#*x}" +} + +calculateMemoryUsage() { + local bitsPerPixel=3 + local tweakFactor=1.8 + local width="$1" + local height="$2" + + local largestWidth=2400 + local largestHeight=1600 + + echo "($largestWidth * $largestHeight * $bitsPerPixel + $width * $height * $bitsPerPixel) * $tweakFactor / 1024 / 1024" | bc +} + +getMB "$1" diff --git a/scripts/local/images/doItAll.sh b/scripts/local/images/doItAll.sh new file mode 100755 index 0000000000..d3f9ceaa47 --- /dev/null +++ b/scripts/local/images/doItAll.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Check arguments +if [[ $# -ne 3 ]]; then + echo "Usage: ./doItAll.sh " + exit 1 +fi + +./get_images.sh "$1" "$2" && +./convert_images.sh "$2" 3840 2160 && +./put_images.sh "$1" "$3" "$2" diff --git a/scripts/local/images/fix_images.sh b/scripts/local/images/fix_images.sh new file mode 100755 index 0000000000..99da6ce747 --- /dev/null +++ b/scripts/local/images/fix_images.sh @@ -0,0 +1,120 @@ +#!/usr/bin/env bash + +# This script will attempt to convert any images that are greater than the +# desired width and height into the desired width and height. +# +# Requirements: +# - ImageMagick +# - bc +# +# Usage: ./fix_images.sh +# - path_to_where_images_are: The path to where the images are +# - desired_max_width: The desired maximum width of the images +# - desired_max_height: The desired maximum height of the images +# +# Example: ./fix_images.sh ~/Pictures 3840 2160 +# - This will convert any images in ~/Pictures that are greater than 3840x2160 +# to 3840x2160 or close to it. +# - This will also print out the memory usage for each image (before and after) +# - This will also print out the command that will be used to convert the image +# (in case you want to copy and paste it to run it yourself) + +getImages() { + local dirsToExclude=("library-definitions" "media-icons" "private" "styles" "js" "oembed_thumbnails" "paragraphs_type_icon" "css") + local dirToLook="$1" + + # Get rid of excluded directories--will make find easier + for dir in "${dirsToExclude[@]}"; do + rm -rf "$dirToLook/$dir" + done + + find "$dirToLook" -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.JPEG" -o -name "*.JPG" \) +} + +convertImages() { + local desiredWidth=$2 + local desiredHeight=$3 + local height + local width + local resolution + local directory="$1" + + local red='\033[0;31m' + local green='\033[0;32m' + local yellow='\033[0;33m' + local noColor='\033[0m' + + # Use an array to store file paths and prevent splitting + local files=() + IFS=$'\n' # Set the Internal Field Separator to newline + + # Use the getImages function to populate the array + readarray -t files <<< "$(getImages "$directory")" + + for file in "${files[@]}"; do + resolution=$(getResolutionFromImage "$file") + width=$(retrieveWidth "$resolution") + height=$(retrieveHeight "$resolution") + + if [[ $height -gt $desiredHeight ]]; then + echo -e "$red [Will Convert] $file has a resolution of $resolution: w: $width, h: $height (Target: $desiredWidth x $desiredHeight, Current memory usage: $(calculateMemoryUsage "$width" "$height") MB) $noColor" + echo convert -resize 3840x2160\> -quality 100 "$file" "$file" + echo -e "$yellow" convert "$file" -resize 3840x2160\> -quality 100 "$file" "$noColor" + convert "$file" -resize 3840x2160\> -quality 100 "$file" + + # Retrieve the new resolution, width, and height to recalculate the new memory usage + resolution=$(getResolutionFromImage "$file") + width=$(retrieveWidth "$resolution") + height=$(retrieveHeight "$resolution") + echo -e "$green [Converted] $file has been converted to $(getResolutionFromImage "$file") : Current memory usage: $(calculateMemoryUsage "$width" "$height") MB $noColor" + else + echo -e "$green [Will Not Convert] $file has a resolution of $resolution: w: $width, h: $height, Current memory usage: $(calculateMemoryUsage "$width" "$height") MB) $noColor" + fi + done +} + +getResolutionFromImage() { + local image="$1" + local resolution + + # Use double quotes around "$image" to handle spaces in the filename + resolution=$(identify -format "%wx%h" "$image") + + echo "$resolution" +} + +retrieveWidth() { + echo "${1%x*}" +} + +retrieveHeight() { + echo "${1#*x}" +} + +calculateMemoryUsage() { + local bitsPerPixel=3 + local tweakFactor=1.8 + local width="$1" + local height="$2" + + # This is currently our largest generated image resolution + # Should we ever update this, we will need to update this script + local largestWidth=2400 + local largestHeight=1600 + + echo "($largestWidth * $largestHeight * $bitsPerPixel + $width * $height * $bitsPerPixel) * $tweakFactor / 1024 / 1024" | bc +} + +# Ensure that they pass the right parameters +if [ $# -ne 3 ]; then + echo "Usage: ./fix_images.sh " + exit 1 +fi + +# Ensure directory exists +if [ ! -d "$1" ]; then + echo "Directory $1 does not exist" + exit 2 +fi + +convertImages "$1" "$2" "$3" diff --git a/scripts/local/images/get_images.sh b/scripts/local/images/get_images.sh new file mode 100755 index 0000000000..3d29261e88 --- /dev/null +++ b/scripts/local/images/get_images.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +# This will attempt to retrieve all files under the /files +# directory on a remote Pantheon server. +# +# The motivation for this script is to convert all images to a smaller format. + +getFiles() { + local port=2222 + + sftp -o Port="$port" "$1" < " + exit 1 +fi + +# Test if destination exists +if [ ! -d "$2" ]; then + echo "Destination $2 does not exist; attempting to make directory" + + if ! mkdir -p "$2"; then + echo "Could not create directory $2" + exit 2 + fi +fi + +getFiles "$1" "$2" diff --git a/scripts/local/images/put_images.sh b/scripts/local/images/put_images.sh new file mode 100755 index 0000000000..82a6b82689 --- /dev/null +++ b/scripts/local/images/put_images.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# This will upload images processed to a destination Pantheon server +# +# The motivation for this script is to convert all images to a smaller format. + +uploadImages() { + local destinationServer="$1" + local destinationDirectory="$2" + local sourceDirectory="$3" + local port=2222 + + echo "Uploading images to $destinationServer:$destinationDirectory" + sftp -o Port="$port" "$destinationServer" < " + exit 1 +fi + +# Directory check +if [ ! -d "$3" ]; then + echo "Source directory $3 does not exist" + exit 2 +fi + +uploadImages "$1" "$2" "$3" diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.media.image.field_media_image.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.media.image.field_media_image.yml index 4a2ca6e6da..616ab9ff68 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.media.image.field_media_image.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.media.image.field_media_image.yml @@ -26,7 +26,7 @@ settings: file_directory: '[date:custom:Y]-[date:custom:m]' file_extensions: 'png jpg jpeg' max_filesize: '' - max_resolution: '' + max_resolution: 3840x2160 min_resolution: '' alt_field: true alt_field_required: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/imagemagick.settings.yml b/web/profiles/custom/yalesites_profile/config/sync/imagemagick.settings.yml index 9a86e390a4..57a60707ef 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/imagemagick.settings.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/imagemagick.settings.yml @@ -3,7 +3,7 @@ _core: quality: 100 binaries: imagemagick path_to_binaries: '' -prepend: '' +prepend: '-limit area 20MP -limit memory 96MB -limit map 192MB' log_warnings: true debug: false locale: en_US.UTF-8 From 49e6f9700048638d8c36725c4de30795fb007623 Mon Sep 17 00:00:00 2001 From: David Blankenship <128765777+dblanken-yale@users.noreply.github.com> Date: Tue, 24 Oct 2023 09:42:46 -0400 Subject: [PATCH 17/91] YALB-1593: Bug: FE: Views pagination not showing on front end (#462) * fix(YALB-1593): assign unique dom_id to views In Drupal, there is a mechanism that attemps to re-use pagers for views, usually because they are not used multiple times in a page. For those times they are, a patch was made to use the dom_id as a way to uniquely identify a view such that the pager will be unique. In our implementation, the dom_id of our view is never set, causing this to be skipped, and the pager ID to retain a value of 0, making it re-used across the page rendered. This fix assigns a unique dom_id to the view before it is built so that it will generate a unique pager instance per view. * fix(YALB-1593): apply dynamic pager ID patch This is the patch that enables the dom_id to produce a unique pager. References: https://www.drupal.org/project/drupal/issues/3225987 * fix(YALB-1593): remove c date format patch --- patches/add-php-c-format.patch | 14 -------------- .../custom/yalesites_profile/composer.json | 6 ++---- .../custom/ys_views_basic/ys_views_basic.module | 11 +++++++++++ 3 files changed, 13 insertions(+), 18 deletions(-) delete mode 100644 patches/add-php-c-format.patch diff --git a/patches/add-php-c-format.patch b/patches/add-php-c-format.patch deleted file mode 100644 index f11d5616df..0000000000 --- a/patches/add-php-c-format.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/SmartDateTrait.php b/src/SmartDateTrait.php -index 27ffff1..31afa2b 100644 ---- a/src/SmartDateTrait.php -+++ b/src/SmartDateTrait.php -@@ -536,7 +536,7 @@ trait SmartDateTrait { - if ($year_pos !== FALSE) { - $valid_tokens = []; - // Check for workable day or month tokens. -- preg_match_all('/[djDNlwzSFmMn]/', $settings['date_format'], $valid_tokens, PREG_OFFSET_CAPTURE); -+ preg_match_all('/[djDNlwzSFmMnc]/', $settings['date_format'], $valid_tokens, PREG_OFFSET_CAPTURE); - if ($valid_tokens) { - if ($year_pos == 0) { - // Year is at the beginning, so change the end to start at the - diff --git a/web/profiles/custom/yalesites_profile/composer.json b/web/profiles/custom/yalesites_profile/composer.json index 991ab9c23e..cec1550283 100644 --- a/web/profiles/custom/yalesites_profile/composer.json +++ b/web/profiles/custom/yalesites_profile/composer.json @@ -115,7 +115,8 @@ "plural results summary https://www.drupal.org/project/drupal/issues/2888320": "https://www.drupal.org/files/issues/2021-12-15/2888320-78.patch", "Prevent media library item overflow https://www.drupal.org/project/drupal/issues/3059955": "https://www.drupal.org/files/issues/2023-03-18/3059955-167.patch", "Remove for Drupal 10 - CKEditor 5 should not grow to infinite height https://www.drupal.org/project/drupal/issues/3273755": "https://www.drupal.org/files/issues/2023-07-26/ckeditor-height-fix.patch", - "Fix ZipArchive deprecation: https://www.drupal.org/project/single_content_sync/issues/3364535": "https://www.drupal.org/files/issues/2022-08-22/2850794-51.patch" + "Fix ZipArchive deprecation: https://www.drupal.org/project/single_content_sync/issues/3364535": "https://www.drupal.org/files/issues/2022-08-22/2850794-51.patch", + "Allow multiples of the same view on a page to have uniquely different pagers: https://www.drupal.org/project/drupal/issues/3225987": "https://www.drupal.org/files/issues/2023-04-21/drupal-dynamic_pager_id-3225987-19.patch" }, "drupal/entity_redirect": { "fix layout route https://www.drupal.org/project/entity_redirect/issues/3352265": "https://git.drupalcode.org/project/entity_redirect/-/merge_requests/6.patch" @@ -129,9 +130,6 @@ "drupal/bugherd": { "anonymous user unable to fill in email field https://www.drupal.org/project/bugherd/issues/3364305": "https://git.drupalcode.org/project/bugherd/-/merge_requests/4.diff" }, - "drupal/smart_date": { - "add PHP c date format": "patches/add-php-c-format.patch" - }, "drupal/gin": { "fix description toggle for CKEditor fields https://www.drupal.org/project/gin/issues/3316265": "https://git.drupalcode.org/project/gin/-/merge_requests/227.patch", "update dark mode localstorage https://www.drupal.org/project/gin/issues/3387653": "https://git.drupalcode.org/project/gin/-/merge_requests/304.diff" diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/ys_views_basic.module b/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/ys_views_basic.module index 68bdd1bfe1..e174d2a6ad 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/ys_views_basic.module +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/ys_views_basic.module @@ -59,3 +59,14 @@ function ys_views_basic_views_data_alter(array &$data) { ]; } + +/** + * Implements hook_views_pre_build(). + */ +function ys_views_basic_views_pre_build($view) { + static $counter = 0; + + if (empty($view->dom_id)) { + $view->dom_id = "view_" . $counter++; + } +} From d77b471630495aa4643c7b939e7aef0b3caf0e6b Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Thu, 26 Oct 2023 18:08:34 -0700 Subject: [PATCH 18/91] feat(YALB-1574): WIP add dynamic title tag to uploaded SVG --- .../ys_core/src/Form/HeaderSettingsForm.php | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php index 619000b6ad..eb5f19c6e4 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php @@ -212,7 +212,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#type' => 'managed_file', '#upload_location' => 'public://site-name-images', '#multiple' => FALSE, - '#description' => $this->t('Replaces the site name text with an image.'), + '#description' => $this->t('Replaces the site name text with an image.
Allowed extensions: svg'), '#upload_validators' => [ 'file_validate_extensions' => ['svg'], // 'file_validate_image_resolution' => [0, "180x180"], @@ -283,8 +283,30 @@ public function validateForm(array &$form, FormStateInterface $form_state) { * Form state. */ public function submitForm(array &$form, FormStateInterface $form_state) { + dpm($form_state->getValue('site_name_image')); + $fid = $form_state->getValue('site_name_image')[0]; + $file = \Drupal::entityTypeManager() + ->getStorage('file') + ->load($fid); + //$path = \Drupal::service('file_url_generator')->generateString(($file->getFileUri())); + //dpm($path); + $fileData = file_get_contents($file->getFileUri(), TRUE); + $regEx = "/]*>(.*?)<\\/title>/"; + dpm($fileData); + if (preg_match($regEx, $fileData)) { + + dpm("We have a title tag"); + $replacement = "A new title"; + dpm(preg_replace($regEx, $replacement, $fileData)); + + } else { + dpm("No title tag"); + $svgPattern = "/(]*>)/"; + $replacement = "$1\nAdding a new title to one that does not exist"; + dpm(preg_replace($svgPattern, $replacement, $fileData)); + } - // Header settings config. + // Header settings config. $headerConfig = $this->config('ys_core.header_settings'); // Handle the favicon filesystem if needed. From f46dd4e128f5cdf7e201d0d68b584663a72a0c39 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Fri, 27 Oct 2023 16:11:11 -0700 Subject: [PATCH 19/91] feat(YALB-1574): Move SVG logic into mediaManager --- .../ys_core/src/Form/HeaderSettingsForm.php | 59 ++++++++----------- .../ys_core/src/YaleSitesMediaManager.php | 35 +++++++++++ 2 files changed, 60 insertions(+), 34 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php index eb5f19c6e4..121ff9c3fe 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php @@ -215,7 +215,6 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#description' => $this->t('Replaces the site name text with an image.
Allowed extensions: svg'), '#upload_validators' => [ 'file_validate_extensions' => ['svg'], - // 'file_validate_image_resolution' => [0, "180x180"], ], '#title' => $this->t('Site Name Image'), '#default_value' => ($headerConfig->get('site_name_image')) ? $headerConfig->get('site_name_image') : NULL, @@ -235,7 +234,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ], '#title' => $this->t('Navigation Position'), '#description' => $this->t('Justifies the menu to the left, center, or right.'), - //'#default_value' => ($headerConfig->get('header_variation')) ? $headerConfig->get('header_variation') : 'basic', + '#default_value' => ($headerConfig->get('nav_position')) ? $headerConfig->get('nav_position') : 'left', '#attributes' => [ 'class' => [ 'variation-radios', @@ -255,14 +254,14 @@ public function buildForm(array $form, FormStateInterface $form_state) { ], ]; - // $form['full_screen_homepage_image_container']['focus_header_image'] = [ - // '#type' => 'media_library', - // '#allowed_bundles' => ['image'], - // '#title' => $this->t('Homepage Header image'), - // '#required' => FALSE, - // //'#default_value' => ($headerConfig->get('focus_header_image')) ? $headerConfig->get('focus_header_image') : NULL, - // '#description' => $this->t('Used for the full-screen homepage image when the Focus Header is selected.'), - // ]; + $form['full_screen_homepage_image_container']['focus_header_image'] = [ + '#type' => 'media_library', + '#allowed_bundles' => ['image'], + '#title' => $this->t('Homepage header image'), + '#required' => FALSE, + '#default_value' => ($headerConfig->get('focus_header_image')) ? $headerConfig->get('focus_header_image') : NULL, + '#description' => $this->t('Used for the full-screen homepage image when the Focus Header is selected.'), + ]; return $form; } @@ -271,7 +270,12 @@ public function buildForm(array $form, FormStateInterface $form_state) { * {@inheritdoc} */ public function validateForm(array &$form, FormStateInterface $form_state) { - //dpm($form_state->getValue('site_name_image')); + if ($form_state->getValue('header_variation') == 'focus' && !$form_state->getValue('focus_header_image')) { + $form_state->setErrorByName( + 'focus_header_image', + $this->t("The homepage header image is required when Focus nav is selected") + ); + } } /** @@ -283,32 +287,18 @@ public function validateForm(array &$form, FormStateInterface $form_state) { * Form state. */ public function submitForm(array &$form, FormStateInterface $form_state) { - dpm($form_state->getValue('site_name_image')); - $fid = $form_state->getValue('site_name_image')[0]; - $file = \Drupal::entityTypeManager() - ->getStorage('file') - ->load($fid); - //$path = \Drupal::service('file_url_generator')->generateString(($file->getFileUri())); - //dpm($path); - $fileData = file_get_contents($file->getFileUri(), TRUE); - $regEx = "/]*>(.*?)<\\/title>/"; - dpm($fileData); - if (preg_match($regEx, $fileData)) { - - dpm("We have a title tag"); - $replacement = "A new title"; - dpm(preg_replace($regEx, $replacement, $fileData)); - - } else { - dpm("No title tag"); - $svgPattern = "/(]*>)/"; - $replacement = "$1\nAdding a new title to one that does not exist"; - dpm(preg_replace($svgPattern, $replacement, $fileData)); - } - // Header settings config. + // Header settings config. $headerConfig = $this->config('ys_core.header_settings'); + // Site settings config. + $siteConfig = $this->config('system.site'); + + // Handles adding a title to the uploaded SVG. + if ($siteNameImage = $form_state->getValue('site_name_image')) { + $this->ysMediaManager->titleSvg($siteNameImage[0], $siteConfig->get('name')); + }; + // Handle the favicon filesystem if needed. $this->ysMediaManager->handleMediaFilesystem( $form_state->getValue('site_name_image'), @@ -317,6 +307,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $headerConfig->set('header_variation', $form_state->getValue('header_variation')); $headerConfig->set('site_name_image', $form_state->getValue('site_name_image')); + $headerConfig->set('nav_position', $form_state->getValue('nav_position')); $headerConfig->set('search.enable_search_form', $form_state->getValue('enable_search_form')); $headerConfig->set('focus_header_image', $form_state->getValue('focus_header_image')); diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php index 9274d1a313..8a28b3c88b 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php @@ -175,4 +175,39 @@ public function handleMediaFilesystem($formValue, $configValue) { } } + /** + * Adds or replaces the title of an uploaded SVG. + * + * @param int $fid + * File ID. + * @param string $title + * Title to add or replace into SVG. + */ + public function titleSvg($fid, $title) { + + /** @var \Drupal\file\Entity\File $file */ + if ($file = $this->entityTypeManager() + ->getStorage('file') + ->load($fid)) { + if (str_ends_with($file->getFilename(), '.svg')) { + $fileData = file_get_contents($file->getFileUri(), TRUE); + $titlePattern = "/]*>(.*?)<\\/title>/"; + + if (preg_match($titlePattern, $fileData)) { + // We have a title tag, let's replace it. + $replacement = "{$title}"; + $replacementSVG = preg_replace($titlePattern, $replacement, $fileData); + } + else { + // No title tag, so let's add one right below the opening svg tag. + $svgPattern = "/(]*>)/"; + $replacement = "$1\n{$title}"; + $replacementSVG = preg_replace($svgPattern, $replacement, $fileData); + } + + file_put_contents($file->getFileUri(), $replacementSVG); + } + } + } + } From d29f3dfb2da5bda22102360f90710b9656cce982 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Fri, 27 Oct 2023 18:18:36 -0700 Subject: [PATCH 20/91] feat(YALB-1563): Wiring of new header settings and migration of config from theme and core to new header settings --- .../ys_core/config/install/ys_core.site.yml | 2 -- .../custom/ys_core/src/CoreTwigExtension.php | 22 ++++++++++++ .../ys_core/src/Form/SiteSettingsForm.php | 8 ----- .../modules/custom/ys_core/ys_core.install | 30 ++++++++++++++++ .../modules/custom/ys_core/ys_core.module | 35 +++++++++++++++++-- .../install/ys_themes.theme_settings.yml | 2 -- .../ys_themes/src/ThemeSettingsManager.php | 31 ---------------- 7 files changed, 84 insertions(+), 46 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/config/install/ys_core.site.yml b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/config/install/ys_core.site.yml index 36a71fa660..0e719a0ab1 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/config/install/ys_core.site.yml +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/config/install/ys_core.site.yml @@ -1,8 +1,6 @@ page: posts: '' events: '' -search: - enable_search_form: 1 seo: google_site_verification: '' google_analytics_id: '' diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/CoreTwigExtension.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/CoreTwigExtension.php index deebaf910d..76cfc63569 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/CoreTwigExtension.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/CoreTwigExtension.php @@ -18,6 +18,13 @@ class CoreTwigExtension extends AbstractExtension { */ protected $yaleCoreSettings; + /** + * Configuration Factory. + * + * @var \Drupal\Core\Config\ConfigFactoryInterface + */ + protected $yaleHeaderSettings; + /** * Constructs the object. * @@ -26,6 +33,7 @@ class CoreTwigExtension extends AbstractExtension { */ public function __construct(ConfigFactoryInterface $configFactory) { $this->yaleCoreSettings = $configFactory->getEditable('ys_core.site'); + $this->yaleHeaderSettings = $configFactory->getEditable('ys_core.header_settings'); } /** @@ -34,6 +42,7 @@ public function __construct(ConfigFactoryInterface $configFactory) { public function getFunctions() { return [ new TwigFunction('getCoreSetting', [$this, 'getCoreSetting']), + new TwigFunction('getHeaderSetting', [$this, 'getHeaderSetting']), ]; } @@ -50,4 +59,17 @@ public function getCoreSetting($setting_name) { return($this->yaleCoreSettings->get($setting_name)); } + /** + * Actual function that returns header setting based on setting machine name. + * + * @param string $setting_name + * Setting machine name to pass in to retrieve setting from config. + * + * @return string + * Setting value from ys_core.site. + */ + public function getHeaderSetting($setting_name) { + return($this->yaleHeaderSettings->get($setting_name)); + } + } diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php index 39aa41cdce..247f28acad 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php @@ -185,13 +185,6 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#default_value' => $yaleConfig->get('seo')['google_analytics_id'], ]; - $form['enable_search_form'] = [ - '#type' => 'checkbox', - '#description' => $this->t('Enable the search form located in the utility navigation area.'), - '#title' => $this->t('Enable search form'), - '#default_value' => $yaleConfig->get('search')['enable_search_form'], - ]; - $form['teaser_image_fallback'] = [ '#type' => 'media_library', '#allowed_bundles' => ['image'], @@ -284,7 +277,6 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $this->configFactory->getEditable('ys_core.site') ->set('page.posts', $form_state->getValue('site_page_posts')) ->set('page.events', $form_state->getValue('site_page_events')) - ->set('search.enable_search_form', $form_state->getValue('enable_search_form')) ->set('seo.google_site_verification', $form_state->getValue('google_site_verification')) ->set('seo.google_analytics_id', $form_state->getValue('google_analytics_id')) ->set('image_fallback.teaser', $form_state->getValue('teaser_image_fallback')) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install index 273fc459a8..be2792571c 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install @@ -40,6 +40,36 @@ function ys_core_update_9001() { } } +/** + * Implements hook_update(). + * + * This update will migrate old theme settings to the new header settings. + */ +function ys_core_update_9002() { + $ysCoreConfig = \Drupal::config('ys_core.site'); + $themeConfig = \Drupal::config('ys_themes.theme_settings'); + $headerConfig = \Drupal::service('config.factory')->getEditable('ys_core.header_settings'); + + // Migrate search setting from core to header + if ($ysCoreConfig->get('search')) { + $oldSearchSetting = $ysCoreConfig->get('search')['enable_search_form']; + $headerConfig->set('search.enable_search_form', $oldSearchSetting)->save(); + } + + // Migrate nav_position setting from themes to header settings + $oldNavPosition = $themeConfig->get('nav_position'); + if ($oldNavPosition) { + $headerConfig->set('nav_position', $oldNavPosition)->save(); + } + + // Migrate nav_type setting from themes to header settings header_variation + $oldNavType = $themeConfig->get('nav_type'); + if ($oldNavType) { + $headerConfig->set('header_variation', $oldNavType)->save(); + } + +} + /** * Sanitizes the value of an array object with allowed_tags. * diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module index f659e3dd8a..d483946645 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module @@ -146,9 +146,27 @@ function ys_core_preprocess_block(&$variables) { * Implements hook_preprocess_region(). */ function ys_core_preprocess_region(&$variables) { - $config = \Drupal::config('ys_core.site'); - if ($variables['elements']['#region'] == 'header' && $config->get('search')) { - $variables['utility_nav__search'] = $config->get('search')['enable_search_form']; + $config = \Drupal::config('ys_core.header_settings'); + if ($variables['elements']['#region'] == 'header') { + $variables['utility_nav__search'] = ($config->get('search')) ? $config->get('search')['enable_search_form'] : NULL; + + // Responsive image render array for focus header image. + if ($focusHeaderImageId = $config->get('focus_header_image')) { + $focusHeaderImageMedia = \Drupal::service('entity_type.manager')->getStorage('media')->load($focusHeaderImageId); + $fileEntity = \Drupal::service('entity_type.manager')->getStorage('file'); + $focusHeaderImageFileUri = $fileEntity->load($focusHeaderImageMedia->field_media_image->target_id)->getFileUri(); + $focusHeaderImageRender = [ + '#type' => 'responsive_image', + '#responsive_image_style_id' => 'banner_16_5_', + '#uri' => $focusHeaderImageFileUri, + '#attributes' => [ + 'alt' => $focusHeaderImageMedia->get('field_media_image')->first()->get('alt')->getValue(), + ], + ]; + $variables['site_header__background_image'] = (\Drupal::service('path.matcher')->isFrontPage()) ? $focusHeaderImageRender : FALSE; + } + + } } @@ -432,3 +450,14 @@ function _ys_core_get_link(FormStateInterface $form_state) { /** * End allow menu item extras fields to be included on node add and edit forms. */ + + /** + * Implements hook_preprocess_page(). + */ +function ys_core_preprocess_page(&$variables) { + // Add the cache tag, so that the theme setting information is rebuilt + // when the config is saved. + // Via: https://drupal.stackexchange.com/questions/266379/how-to-clear-cache-for-config-entity-after-making-changes + $config = \Drupal::config('ys_core.header_settings'); + \Drupal::service('renderer')->addCacheableDependency($variables, $config); +} diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/config/install/ys_themes.theme_settings.yml b/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/config/install/ys_themes.theme_settings.yml index 94be8c3cf1..8ab22d91b2 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/config/install/ys_themes.theme_settings.yml +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/config/install/ys_themes.theme_settings.yml @@ -1,5 +1,3 @@ -nav_position: 'left' -nav_type: 'basic' header_theme: 'one' header_accent: 'one' footer_theme: 'one' diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/src/ThemeSettingsManager.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/src/ThemeSettingsManager.php index acb7e0130d..486d74881a 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/src/ThemeSettingsManager.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/src/ThemeSettingsManager.php @@ -46,37 +46,6 @@ class ThemeSettingsManager { ], ], ], - 'nav_position' => [ - 'name' => 'Navigation Position', - 'prop_type' => 'element', - 'selector' => '[data-site-header-nav-position]', - 'default' => 'left', - 'values' => [ - 'right' => [ - 'label' => 'Right', - ], - 'center' => [ - 'label' => 'Center', - ], - 'left' => [ - 'label' => 'Left', - ], - ], - ], - 'nav_type' => [ - 'name' => 'Navigation Type', - 'prop_type' => 'element', - 'selector' => '[data-menu-variation]', - 'default' => 'mega', - 'values' => [ - 'mega' => [ - 'label' => 'Mega Menu', - ], - 'basic' => [ - 'label' => 'Basic Menu', - ], - ], - ], 'button_theme' => [ 'name' => 'Button Theme', 'prop_type' => 'element', From 8df0bd5e8c4ab16abe244c9874070c7279f9cbbc Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Mon, 30 Oct 2023 15:25:17 -0700 Subject: [PATCH 21/91] feat(YALB-1574): Wire site name as image and move SVG title to an on-demand rather than save function --- .../custom/ys_core/src/CoreTwigExtension.php | 25 +++++++++++++++++-- .../ys_core/src/Form/HeaderSettingsForm.php | 8 ------ .../ys_core/src/YaleSitesMediaManager.php | 17 +++++++++---- .../custom/ys_core/ys_core.services.yml | 2 +- 4 files changed, 36 insertions(+), 16 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/CoreTwigExtension.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/CoreTwigExtension.php index 76cfc63569..cd8174669a 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/CoreTwigExtension.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/CoreTwigExtension.php @@ -3,6 +3,7 @@ namespace Drupal\ys_core; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\ys_core\YaleSitesMediaManager; use Twig\Extension\AbstractExtension; use Twig\TwigFunction; @@ -25,15 +26,25 @@ class CoreTwigExtension extends AbstractExtension { */ protected $yaleHeaderSettings; + /** + * The YaleSites Media Manager. + * + * @var \Drupal\ys_core\YaleSitesMediaManager + */ + protected $yaleMediaManager; + /** * Constructs the object. * * @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory * The configuration interface. + * @param \Drupal\ys_core\YaleSitesMediaManager $yale_media_manager + * The YaleSites Media Manager. */ - public function __construct(ConfigFactoryInterface $configFactory) { + public function __construct(ConfigFactoryInterface $configFactory, YaleSitesMediaManager $yale_media_manager) { $this->yaleCoreSettings = $configFactory->getEditable('ys_core.site'); $this->yaleHeaderSettings = $configFactory->getEditable('ys_core.header_settings'); + $this->yaleMediaManager = $yale_media_manager; } /** @@ -69,7 +80,17 @@ public function getCoreSetting($setting_name) { * Setting value from ys_core.site. */ public function getHeaderSetting($setting_name) { - return($this->yaleHeaderSettings->get($setting_name)); + if ($setting_name == 'site_name_image') { + $siteNameSVG = FALSE; + if ($fid = $this->yaleHeaderSettings->get('site_name_image')) { + $siteNameSVG = $this->yaleMediaManager->getSiteNameImage($fid[0]); + } + + return $siteNameSVG; + } + else { + return($this->yaleHeaderSettings->get($setting_name)); + } } } diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php index 121ff9c3fe..edd33343d9 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php @@ -291,14 +291,6 @@ public function submitForm(array &$form, FormStateInterface $form_state) { // Header settings config. $headerConfig = $this->config('ys_core.header_settings'); - // Site settings config. - $siteConfig = $this->config('system.site'); - - // Handles adding a title to the uploaded SVG. - if ($siteNameImage = $form_state->getValue('site_name_image')) { - $this->ysMediaManager->titleSvg($siteNameImage[0], $siteConfig->get('name')); - }; - // Handle the favicon filesystem if needed. $this->ysMediaManager->handleMediaFilesystem( $form_state->getValue('site_name_image'), diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php index 8a28b3c88b..41b0846278 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php @@ -21,6 +21,13 @@ class YaleSitesMediaManager extends ControllerBase implements ContainerInjection */ protected $yaleSettings; + /** + * Configuration Factory. + * + * @var \Drupal\Core\Config\ConfigFactoryInterface + */ + protected $siteSettings; + /** * The entity type manager. * @@ -51,6 +58,7 @@ public function __construct( FileUrlGenerator $file_url_generator ) { $this->yaleSettings = $config_factory->get('ys_core.site'); + $this->siteSettings = $config_factory->get('system.site'); $this->entityTypeManager = $entity_type_manager; $this->fileUrlGenerator = $file_url_generator; } @@ -176,19 +184,18 @@ public function handleMediaFilesystem($formValue, $configValue) { } /** - * Adds or replaces the title of an uploaded SVG. + * Gets SVG for the uploaded site name as image and adds site name as title. * * @param int $fid * File ID. - * @param string $title - * Title to add or replace into SVG. */ - public function titleSvg($fid, $title) { + public function getSiteNameImage($fid) { /** @var \Drupal\file\Entity\File $file */ if ($file = $this->entityTypeManager() ->getStorage('file') ->load($fid)) { + $title = $this->siteSettings->get('name'); if (str_ends_with($file->getFilename(), '.svg')) { $fileData = file_get_contents($file->getFileUri(), TRUE); $titlePattern = "/]*>(.*?)<\\/title>/"; @@ -205,7 +212,7 @@ public function titleSvg($fid, $title) { $replacementSVG = preg_replace($svgPattern, $replacement, $fileData); } - file_put_contents($file->getFileUri(), $replacementSVG); + return $replacementSVG; } } } diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.services.yml b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.services.yml index c6f390604e..8b1ded2e1f 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.services.yml +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.services.yml @@ -9,7 +9,7 @@ services: # Twig functions for passing core settings to templates. ys_core.core_twig_extension: class: Drupal\ys_core\CoreTwigExtension - arguments: ['@config.factory'] + arguments: ['@config.factory', '@ys_core.media_manager'] tags: - { name: twig.extension } ys_core.media_manager: From 3178f9be62d2b90c2323170a5a10227a6b2fd8d1 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Mon, 30 Oct 2023 16:35:17 -0700 Subject: [PATCH 22/91] docs(YALB-1574): fix linting and comments --- .../modules/custom/ys_core/src/Form/HeaderSettingsForm.php | 2 +- .../modules/custom/ys_core/src/YaleSitesMediaManager.php | 3 +++ .../yalesites_profile/modules/custom/ys_core/ys_core.module | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php index edd33343d9..6124d632f7 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php @@ -291,7 +291,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { // Header settings config. $headerConfig = $this->config('ys_core.header_settings'); - // Handle the favicon filesystem if needed. + // Handle the filesystem if needed. $this->ysMediaManager->handleMediaFilesystem( $form_state->getValue('site_name_image'), $headerConfig->get('site_name_image') diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php index 41b0846278..cebf578079 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/YaleSitesMediaManager.php @@ -188,6 +188,9 @@ public function handleMediaFilesystem($formValue, $configValue) { * * @param int $fid * File ID. + * + * @return string + * SVG in raw form for use in twig templates. */ public function getSiteNameImage($fid) { diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module index d483946645..c380808e3f 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module @@ -166,7 +166,6 @@ function ys_core_preprocess_region(&$variables) { $variables['site_header__background_image'] = (\Drupal::service('path.matcher')->isFrontPage()) ? $focusHeaderImageRender : FALSE; } - } } @@ -451,7 +450,7 @@ function _ys_core_get_link(FormStateInterface $form_state) { * End allow menu item extras fields to be included on node add and edit forms. */ - /** +/** * Implements hook_preprocess_page(). */ function ys_core_preprocess_page(&$variables) { From d1c9ff7c539ab83f9d8b86184229ecacc1a002fc Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Mon, 30 Oct 2023 16:48:13 -0700 Subject: [PATCH 23/91] fix(YALB-1574): Fix linting error --- .../modules/custom/ys_core/ys_core.install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install index be2792571c..28d0c77bfb 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install @@ -50,19 +50,19 @@ function ys_core_update_9002() { $themeConfig = \Drupal::config('ys_themes.theme_settings'); $headerConfig = \Drupal::service('config.factory')->getEditable('ys_core.header_settings'); - // Migrate search setting from core to header + // Migrate search setting from core to header. if ($ysCoreConfig->get('search')) { $oldSearchSetting = $ysCoreConfig->get('search')['enable_search_form']; $headerConfig->set('search.enable_search_form', $oldSearchSetting)->save(); } - // Migrate nav_position setting from themes to header settings + // Migrate nav_position setting from themes to header settings. $oldNavPosition = $themeConfig->get('nav_position'); if ($oldNavPosition) { $headerConfig->set('nav_position', $oldNavPosition)->save(); } - // Migrate nav_type setting from themes to header settings header_variation + // Migrate nav_type setting from themes to header settings header_variation. $oldNavType = $themeConfig->get('nav_type'); if ($oldNavType) { $headerConfig->set('header_variation', $oldNavType)->save(); From c3bb69c661a51db98aac665dd6b2e171698f4246 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Mon, 30 Oct 2023 16:53:54 -0700 Subject: [PATCH 24/91] fix(YALB-1563): Remove unused use statement --- .../modules/custom/ys_core/src/CoreTwigExtension.php | 1 - 1 file changed, 1 deletion(-) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/CoreTwigExtension.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/CoreTwigExtension.php index cd8174669a..fd8e8abfac 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/CoreTwigExtension.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/CoreTwigExtension.php @@ -3,7 +3,6 @@ namespace Drupal\ys_core; use Drupal\Core\Config\ConfigFactoryInterface; -use Drupal\ys_core\YaleSitesMediaManager; use Twig\Extension\AbstractExtension; use Twig\TwigFunction; From ffe6590d3962fb65f0177698c7b605222450aee3 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Tue, 31 Oct 2023 11:39:39 -0700 Subject: [PATCH 25/91] feat(YALB-1574): Update old footer theme setting four to one as four no longer exists --- .../modules/custom/ys_themes/ys_themes.install | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/ys_themes.install b/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/ys_themes.install index 905e360c5f..92feb91c47 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/ys_themes.install +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/ys_themes.install @@ -43,3 +43,20 @@ function ys_themes_update_9001() { } } + +/** + * Implements hook_update(). + * + * This update will migrate old footer setting theme four to theme one. + */ +function ys_themes_update_9002() { + $themeConfig = \Drupal::service('config.factory')->getEditable('ys_themes.theme_settings'); + + // Migrate search setting from core to header. + if ($themeConfig->get('footer_theme')) { + if ($themeConfig->get('footer_theme') == 'four') { + $themeConfig->set('footer_theme', 'one')->save(); + } + } + +} From bfaa364fcc7a34b3ce2fce6672bbb7db79b8fdc5 Mon Sep 17 00:00:00 2001 From: David Blankenship <128765777+dblanken-yale@users.noreply.github.com> Date: Tue, 14 Nov 2023 09:14:00 -0500 Subject: [PATCH 26/91] YALB-1387: WYSIWYG: Clarity on maxlength (#474) * fix(YALB-1387): update soft limit maxlength text Updates the count down message on soft limits to be: "Content recommended length set to characters, remaining: " --- ...e.entity_form_display.block_content.accordion.default.yml | 2 +- ..._form_display.block_content.content_spotlight.default.yml | 4 ++-- ....entity_form_display.block_content.cta_banner.default.yml | 2 +- ...ntity_form_display.block_content.custom_cards.default.yml | 2 +- ...e.entity_form_display.block_content.directory.default.yml | 2 +- ....entity_form_display.block_content.event_list.default.yml | 2 +- ...ore.entity_form_display.block_content.gallery.default.yml | 2 +- ....entity_form_display.block_content.grand_hero.default.yml | 4 ++-- .../core.entity_form_display.block_content.image.default.yml | 2 +- ....entity_form_display.block_content.media_grid.default.yml | 2 +- ...e.entity_form_display.block_content.post_list.default.yml | 2 +- ....entity_form_display.block_content.pull_quote.default.yml | 2 +- ...entity_form_display.block_content.quick_links.default.yml | 2 +- .../core.entity_form_display.block_content.video.default.yml | 4 ++-- .../core.entity_form_display.block_content.view.default.yml | 2 +- ...ore.entity_form_display.block_content.webform.default.yml | 2 +- ....entity_form_display.paragraph.accordion_item.default.yml | 3 ++- ...re.entity_form_display.paragraph.callout_item.default.yml | 3 ++- ...ore.entity_form_display.paragraph.custom_card.default.yml | 3 ++- ...re.entity_form_display.paragraph.gallery_item.default.yml | 5 +++-- .../sync/core.entity_form_display.paragraph.tab.default.yml | 3 ++- 21 files changed, 30 insertions(+), 25 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.accordion.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.accordion.default.yml index b63ac7f67a..20138a1d24 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.accordion.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.accordion.default.yml @@ -56,7 +56,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 50 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_instructions: type: markup diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.content_spotlight.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.content_spotlight.default.yml index 6e6089d435..2410f253e1 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.content_spotlight.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.content_spotlight.default.yml @@ -39,7 +39,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 80 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_instructions: type: markup @@ -99,7 +99,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 50 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_text: type: text_textarea diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.cta_banner.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.cta_banner.default.yml index 8956dbd94a..02db80496c 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.cta_banner.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.cta_banner.default.yml @@ -38,7 +38,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 50 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_heading_level: type: options_select diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.custom_cards.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.custom_cards.default.yml index d57aab67f5..4f9a7e7f8c 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.custom_cards.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.custom_cards.default.yml @@ -56,7 +56,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 50 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_instructions: type: markup diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.directory.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.directory.default.yml index d9bcce115f..a287c462bd 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.directory.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.directory.default.yml @@ -29,7 +29,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 50 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_instructions: type: markup diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.event_list.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.event_list.default.yml index 5dbd0eb88c..e7d8f5282b 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.event_list.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.event_list.default.yml @@ -29,7 +29,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 50 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_instructions: type: markup diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.gallery.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.gallery.default.yml index 88b58d4b7c..065caa4027 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.gallery.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.gallery.default.yml @@ -56,7 +56,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 50 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_instructions: type: markup diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.grand_hero.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.grand_hero.default.yml index ce2a8e3d16..e0600de6d6 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.grand_hero.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.grand_hero.default.yml @@ -38,7 +38,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 50 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_heading_level: type: options_select @@ -96,7 +96,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 90 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false hidden: info: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.image.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.image.default.yml index 0b8a92ba39..7cc6879d28 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.image.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.image.default.yml @@ -47,7 +47,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 200 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false hidden: info: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.media_grid.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.media_grid.default.yml index fcd0c98c09..67a89c3fec 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.media_grid.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.media_grid.default.yml @@ -32,7 +32,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 50 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_instructions: type: markup diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.post_list.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.post_list.default.yml index aeb017d48d..c8ddd320f5 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.post_list.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.post_list.default.yml @@ -29,7 +29,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 50 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_instructions: type: markup diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.pull_quote.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.pull_quote.default.yml index 1c9df91c60..d164fb0205 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.pull_quote.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.pull_quote.default.yml @@ -31,7 +31,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 90 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_instructions: type: markup diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.quick_links.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.quick_links.default.yml index dfdfd53275..05165de905 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.quick_links.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.quick_links.default.yml @@ -35,7 +35,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 50 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_instructions: type: markup diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.video.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.video.default.yml index bdbb2871c2..fd3a2ae953 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.video.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.video.default.yml @@ -33,7 +33,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: null - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_instructions: type: markup @@ -63,7 +63,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 200 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false hidden: info: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.view.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.view.default.yml index 9fdf29700a..20f19b00d1 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.view.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.view.default.yml @@ -31,7 +31,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 50 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_instructions: type: markup diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.webform.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.webform.default.yml index d6d65f0b88..f523a3ed8b 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.webform.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.webform.default.yml @@ -39,7 +39,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 80 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false field_instructions: type: markup diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.accordion_item.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.accordion_item.default.yml index 9547831bd9..10b4b3b7aa 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.accordion_item.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.accordion_item.default.yml @@ -41,7 +41,8 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 80 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' + maxlength_js_enforce: false hidden: created: true status: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.callout_item.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.callout_item.default.yml index 395f8cf58a..531beb3621 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.callout_item.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.callout_item.default.yml @@ -30,7 +30,8 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 80 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' + maxlength_js_enforce: false field_link: type: link_default weight: 3 diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.custom_card.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.custom_card.default.yml index 765d50505a..71ba888e58 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.custom_card.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.custom_card.default.yml @@ -33,7 +33,8 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 80 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' + maxlength_js_enforce: false field_image: type: media_library_widget weight: 0 diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.gallery_item.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.gallery_item.default.yml index 741b54db36..7ac3567c23 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.gallery_item.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.gallery_item.default.yml @@ -30,7 +30,8 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 80 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' + maxlength_js_enforce: false field_media: type: media_library_widget weight: 0 @@ -51,7 +52,7 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 200 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' maxlength_js_enforce: false hidden: created: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.tab.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.tab.default.yml index 3fa6816408..0515c56f2c 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.tab.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.paragraph.tab.default.yml @@ -55,7 +55,8 @@ content: hide_guidelines: '1' maxlength: maxlength_js: 40 - maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_label: 'Content recommended length set to @limit characters, remaining: @remaining' + maxlength_js_enforce: false hidden: created: true status: true From 07e8343ebf624496451df66a0a4753a8164acdf7 Mon Sep 17 00:00:00 2001 From: Joe Tower Date: Tue, 14 Nov 2023 13:14:40 -0600 Subject: [PATCH 27/91] fix(YALB-1593): add new image sizes and responsive image styles for 16:9 background image --- ...age.background_image_16_9_focus_header.yml | 36 +++++++++++++++++++ ...dia.background_image_16_9_focus_header.yml | 10 ++++++ .../config/sync/image.style.16_9_1000.yml | 15 ++++++++ .../config/sync/image.style.16_9_1400.yml | 15 ++++++++ .../config/sync/image.style.16_9_1800.yml | 15 ++++++++ .../config/sync/image.style.16_9_2400.yml | 15 ++++++++ .../config/sync/image.style.16_9_400.yml | 15 ++++++++ .../config/sync/image.style.16_9_600.yml | 15 ++++++++ .../config/sync/image.style.16_9_800.yml | 15 ++++++++ ...e.styles.background_image_focus_header.yml | 31 ++++++++++++++++ .../modules/custom/ys_core/ys_core.module | 2 +- 11 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.background_image_16_9_focus_header.yml create mode 100644 web/profiles/custom/yalesites_profile/config/sync/core.entity_view_mode.media.background_image_16_9_focus_header.yml create mode 100644 web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_1000.yml create mode 100644 web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_1400.yml create mode 100644 web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_1800.yml create mode 100644 web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_2400.yml create mode 100644 web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_400.yml create mode 100644 web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_600.yml create mode 100644 web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_800.yml create mode 100644 web/profiles/custom/yalesites_profile/config/sync/responsive_image.styles.background_image_focus_header.yml diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.background_image_16_9_focus_header.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.background_image_16_9_focus_header.yml new file mode 100644 index 0000000000..923016e266 --- /dev/null +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.background_image_16_9_focus_header.yml @@ -0,0 +1,36 @@ +uuid: c8e77859-a557-41b4-b240-2869c47c5b87 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.media.background_image_16_9_focus_header + - field.field.media.image.field_media_image + - media.type.image + - responsive_image.styles.background_image_focus_header + module: + - layout_builder + - responsive_image +third_party_settings: + layout_builder: + enabled: false + allow_custom: false +id: media.image.background_image_16_9_focus_header +targetEntityType: media +bundle: image +mode: background_image_16_9_focus_header +content: + field_media_image: + type: responsive_image + label: hidden + settings: + responsive_image_style: background_image_focus_header + image_link: '' + third_party_settings: { } + weight: 0 + region: content +hidden: + created: true + name: true + search_api_excerpt: true + thumbnail: true + uid: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_mode.media.background_image_16_9_focus_header.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_mode.media.background_image_16_9_focus_header.yml new file mode 100644 index 0000000000..52614e40ce --- /dev/null +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_mode.media.background_image_16_9_focus_header.yml @@ -0,0 +1,10 @@ +uuid: a71d250d-989a-4554-95cb-f04af8833400 +langcode: en +status: true +dependencies: + module: + - media +id: media.background_image_16_9_focus_header +label: 'Background Image (16:9) | Focus Header' +targetEntityType: media +cache: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_1000.yml b/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_1000.yml new file mode 100644 index 0000000000..4793eb21bd --- /dev/null +++ b/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_1000.yml @@ -0,0 +1,15 @@ +uuid: 0b295375-1072-4e02-a73e-35304ffaad03 +langcode: en +status: true +dependencies: { } +name: '16_9_1000' +label: '16:9 (1000)' +effects: + cab9f2b4-8b0c-43c6-9870-30d9574bd201: + uuid: cab9f2b4-8b0c-43c6-9870-30d9574bd201 + id: image_scale_and_crop + weight: 1 + data: + width: 1000 + height: 562 + anchor: center-center diff --git a/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_1400.yml b/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_1400.yml new file mode 100644 index 0000000000..5250327b50 --- /dev/null +++ b/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_1400.yml @@ -0,0 +1,15 @@ +uuid: 03a3c61b-838d-4c25-93b3-b96953412b31 +langcode: en +status: true +dependencies: { } +name: '16_9_1400' +label: '16:9 (1400)' +effects: + 77d3ea85-f0ea-40b8-abf2-57bad7ed7000: + uuid: 77d3ea85-f0ea-40b8-abf2-57bad7ed7000 + id: image_scale_and_crop + weight: 1 + data: + width: 1400 + height: 787 + anchor: center-center diff --git a/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_1800.yml b/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_1800.yml new file mode 100644 index 0000000000..24a1fa8a55 --- /dev/null +++ b/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_1800.yml @@ -0,0 +1,15 @@ +uuid: 7712b420-e9fe-4d3d-bf4c-9bfe78b184d6 +langcode: en +status: true +dependencies: { } +name: '16_9_1800' +label: '16:9 (1800)' +effects: + 49278a79-9e9c-4983-9c28-41cee26e5167: + uuid: 49278a79-9e9c-4983-9c28-41cee26e5167 + id: image_scale_and_crop + weight: 1 + data: + width: 1800 + height: 1012 + anchor: center-center diff --git a/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_2400.yml b/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_2400.yml new file mode 100644 index 0000000000..6c9fa6a064 --- /dev/null +++ b/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_2400.yml @@ -0,0 +1,15 @@ +uuid: a28b30bb-3075-4d17-9d9d-11e14e704f29 +langcode: en +status: true +dependencies: { } +name: '16_9_2400' +label: '16:9 (2400)' +effects: + 85d811de-88a2-4dc4-818a-a7151fbcdcd8: + uuid: 85d811de-88a2-4dc4-818a-a7151fbcdcd8 + id: image_scale_and_crop + weight: 1 + data: + width: 2400 + height: 1350 + anchor: center-center diff --git a/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_400.yml b/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_400.yml new file mode 100644 index 0000000000..f4793b0e73 --- /dev/null +++ b/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_400.yml @@ -0,0 +1,15 @@ +uuid: 4bc48e22-88eb-4945-ba3f-e071ddc4330c +langcode: en +status: true +dependencies: { } +name: '16_9_400' +label: '16:9 (400)' +effects: + 9c3740b8-e036-48ea-a554-ebe961085911: + uuid: 9c3740b8-e036-48ea-a554-ebe961085911 + id: image_scale_and_crop + weight: 1 + data: + width: 400 + height: 225 + anchor: center-center diff --git a/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_600.yml b/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_600.yml new file mode 100644 index 0000000000..81ed0d984b --- /dev/null +++ b/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_600.yml @@ -0,0 +1,15 @@ +uuid: b7a8dfd5-46ad-4c2a-9d97-531eb8d0ee4d +langcode: en +status: true +dependencies: { } +name: '16_9_600' +label: '16:9 (600)' +effects: + 20ecb5c2-8cb1-4e89-aa5d-0f4e4bf7bdff: + uuid: 20ecb5c2-8cb1-4e89-aa5d-0f4e4bf7bdff + id: image_scale_and_crop + weight: 1 + data: + width: 600 + height: 337 + anchor: center-center diff --git a/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_800.yml b/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_800.yml new file mode 100644 index 0000000000..da61e8439f --- /dev/null +++ b/web/profiles/custom/yalesites_profile/config/sync/image.style.16_9_800.yml @@ -0,0 +1,15 @@ +uuid: 950f3472-0e74-4207-8f5e-a2227e52b6c3 +langcode: en +status: true +dependencies: { } +name: '16_9_800' +label: '16:9 (800)' +effects: + 0206d396-5fbd-431e-aacf-eff3f88ff7e3: + uuid: 0206d396-5fbd-431e-aacf-eff3f88ff7e3 + id: image_scale_and_crop + weight: 1 + data: + width: 800 + height: 450 + anchor: center-center diff --git a/web/profiles/custom/yalesites_profile/config/sync/responsive_image.styles.background_image_focus_header.yml b/web/profiles/custom/yalesites_profile/config/sync/responsive_image.styles.background_image_focus_header.yml new file mode 100644 index 0000000000..03e0bd7f18 --- /dev/null +++ b/web/profiles/custom/yalesites_profile/config/sync/responsive_image.styles.background_image_focus_header.yml @@ -0,0 +1,31 @@ +uuid: 4e08ad05-a17d-486f-b391-d017ca163c66 +langcode: en +status: true +dependencies: + config: + - image.style.16_9_1000 + - image.style.16_9_1400 + - image.style.16_9_1800 + - image.style.16_9_2400 + - image.style.16_9_400 + - image.style.16_9_600 + - image.style.16_9_800 +id: background_image_focus_header +label: 'Background Image - Focus Header' +image_style_mappings: + - + image_mapping_type: sizes + image_mapping: + sizes: 100vw + sizes_image_styles: + - '16_9_400' + - '16_9_1000' + - '16_9_1400' + - '16_9_1800' + - '16_9_2400' + - '16_9_600' + - '16_9_800' + breakpoint_id: responsive_image.viewport_sizing + multiplier: 1x +breakpoint_group: responsive_image +fallback_image_style: '16_9_1000' diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module index c380808e3f..6a5db7e437 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module @@ -157,7 +157,7 @@ function ys_core_preprocess_region(&$variables) { $focusHeaderImageFileUri = $fileEntity->load($focusHeaderImageMedia->field_media_image->target_id)->getFileUri(); $focusHeaderImageRender = [ '#type' => 'responsive_image', - '#responsive_image_style_id' => 'banner_16_5_', + '#responsive_image_style_id' => 'background_image_focus_header', '#uri' => $focusHeaderImageFileUri, '#attributes' => [ 'alt' => $focusHeaderImageMedia->get('field_media_image')->first()->get('alt')->getValue(), From 76e0b6256de8453f74d478253bb3c2f702002332 Mon Sep 17 00:00:00 2001 From: Vincent Massaro Date: Fri, 17 Nov 2023 13:32:12 -0500 Subject: [PATCH 28/91] Update develop from master (#482) * fix: pin drupal/linkit to 6.0.0 to fix regression in https://www.drupal.org/project/linkit/issues/3354873 * feat(YALB-1186): Upgrade to Drupal 10 and pin revisions in composer * feat(YALB-1186): Update CAPTCHA to 1.14 * feat(YALB-1186): Update markup to 2.0.0-beta6 * feat(YALB-1186): Update menu breadcrumb to 2.0.0-alpha0 * feat(YALB-1186): Update mailchimp transactional with override community patch for Drupal 10 support * feat(YALB-1186): WIP updating YaleSites custom modules for Drupal 10 compatibility * fix(YALB-1186): Update CSS to comply with Drupal 10 specs and refactor CSS for linting issues * feat(YALB-1210): WIP Pin versions of address, admin toolbar, allowed formats, auto entity label, and autosave form * feat(YALB-1186): Update to PHP 8.1. Update smart_date to 4.0.3 and new patch for adding PHP c format * feat(YALB-1210): Pin versions of calendar link, cas, chosen, components, and config modules * feat(YALB-1210): Update chaos tools to 4.0.4 * feat(YALB-1210): Pin versions for devel, devel_kint_extras, easy breadcumb, editoria11y, emulsify, entity redirect, fast 404, field group, formdazzle, gin, and gin layout builder * feat(YALB-1210): Pin more modules to the latest versions. All info in spreasheet in Teams * feat(YALB-1210): Pinning more versions * feat(YALB-1210): Finish pinning versions * feat(YALB-1186): Initial changes for D10 upgrade * chore(YALB-1186): Temporarily remove search api html element filter * feat(YALB-1186): Remove old patches, add laminas-escaper for bugherd * fix(YALB-1186): Fix search API HTML element filter with forked MR from Drupal.org * feat(YALB-1186): Config after upgrading to D10 * feat(YALB-1210): Pin version for laminas-escaper * feat(YALB-1186): New URL for forked search API HTML element filter repo, small CSS fix for levers form for D10 * fix(YALB-1186): Change git to vcs to see if that helps CI find the repo * fix(YALB-1186): Change mailchimp trasactional to dev version with patch * fix(YALB-1186): move logic from /composer.json into profile composer.json * chore(YALB-1186): fix root composer.json syntax * chore(YALB-1186): add repo back to root composer.json * fix(YALB-1186): Test wrapping views-basic in #drupal-off-canvas-wrapper, if this works, change all of them * fix(YALB-1186): Views basic and layout builder browser fixes for D10 * fix(YALB-1186): Fix styling issues with views basic form * feat(YALB-1186): Upgrade allowed formats which also moves config from that module into Drupal core config * feat(YALB-1186): Remove block content permissions as this is now in Drupal 10.1 * fix(YALB-1186): Fixes CSS issues with layout builder when aggregate CSS was turned on * fix(YALB-1186): patch google_analytics to install from config in D10 * chore(YALB-1186): Remove smart date patch - no longer needed * feat(YALB-1186): Update to official Search API HTML Element Filter 1.0.4 * fix(YALB-1186): remove mailchimp transcational patch because it was merged, update to 1.1.0 version * feat(YALB-1186): Update Atomic to 1.21.1 * chore: update to php 8.2 --------- Co-authored-by: Vincent Massaro Co-authored-by: Joe Tower Co-authored-by: nJim * chore: update pathauto to 1.12 for PHP 8.2 compatibility (#476) * fix(permissions): add block content permissions (#473) There was a user having issues uploading images, and it seems to be linked to the conversion from block content permissions to core permissions. This re-enables items such that it allows users to upload content and interact with blocks. * chore: export config after d10 update (#477) * feat: add ability to load site-specific settings file (#478) * revert: add block content permissions module again (#481) * YALB-961: WYSIWYG: Text field size to reflect character limits (#464) * fix(YALB-961): set grand hero content rows to 3 * fix(YALB-961): set pull quote content rows to 3 * fix(YALB-961): set quick links content rows to 3 * fix(YALB-961): set wrapped image content rows to 3 * fix(YALB-961): set image content rows to 3 * fix: add access check on entity query per https://www.drupal.org/node/3201242 * fix: added patch to remove deprication warning on typogrify --------- Co-authored-by: Jim Vomero Co-authored-by: Marc Berger <107938318+codechefmarc@users.noreply.github.com> Co-authored-by: Joe Tower Co-authored-by: nJim Co-authored-by: David Blankenship <128765777+dblanken-yale@users.noreply.github.com> --- composer.json | 18 +- pantheon.upstream.yml | 2 +- .../custom/yalesites_profile/composer.json | 185 ++++--- .../config/sync/captcha.settings.yml | 7 +- ...splay.block_content.grand_hero.default.yml | 2 +- ...splay.block_content.pull_quote.default.yml | 2 +- ...play.block_content.quick_links.default.yml | 2 +- ...rm_display.block_content.video.default.yml | 2 +- ...ay.block_content.wrapped_image.default.yml | 2 +- ...entity_form_display.node.event.default.yml | 2 +- ...y_view_display.media.image.banner_16_5.yml | 2 + ...view_display.media.image.card_list_3_2.yml | 2 + ...display.media.image.card_secondary_3_2.yml | 2 + ...ntity_view_display.media.image.default.yml | 2 + ...isplay.media.image.image_content_width.yml | 2 + ...y_view_display.media.image.image_float.yml | 2 + ...edia.image.profile_directory_card_1_1_.yml | 2 + ...ia.image.text_with_image_feature_equal.yml | 2 + ...ntity_view_display.media.video.default.yml | 2 + .../config/sync/core.extension.yml | 2 +- .../config/sync/editor.editor.basic_html.yml | 18 +- ....block_content.accordion.field_heading.yml | 10 +- ...ontent.content_spotlight.field_heading.yml | 10 +- ...ent.content_spotlight.field_subheading.yml | 10 +- ...k_content.content_spotlight.field_text.yml | 10 +- ...block_content.cta_banner.field_heading.yml | 10 +- ...ld.block_content.cta_banner.field_text.yml | 10 +- ...ock_content.custom_cards.field_heading.yml | 10 +- ....block_content.directory.field_heading.yml | 10 +- ...block_content.event_list.field_heading.yml | 10 +- ...ld.block_content.gallery.field_heading.yml | 10 +- ...block_content.grand_hero.field_heading.yml | 10 +- ...ld.block_content.grand_hero.field_text.yml | 10 +- ...d.field.block_content.image.field_text.yml | 10 +- ...block_content.media_grid.field_heading.yml | 10 +- ....block_content.post_list.field_heading.yml | 10 +- ...block_content.pull_quote.field_caption.yml | 10 +- ...ld.block_content.pull_quote.field_text.yml | 10 +- ...lock_content.quick_links.field_heading.yml | 10 +- ...d.block_content.quick_links.field_text.yml | 10 +- ...ld.field.block_content.text.field_text.yml | 10 +- ...ield.block_content.video.field_heading.yml | 10 +- ...d.field.block_content.video.field_text.yml | 10 +- ...field.block_content.view.field_heading.yml | 10 +- ...ld.block_content.webform.field_heading.yml | 10 +- ...ck_content.wrapped_image.field_caption.yml | 10 +- ...block_content.wrapped_image.field_text.yml | 10 +- .../field.field.node.event.field_category.yml | 2 +- ...field.field.node.event.field_event_cta.yml | 2 +- .../field.field.node.event.field_tags.yml | 2 +- ...eld.field.node.event.field_teaser_text.yml | 10 +- .../sync/field.field.node.page.field_tags.yml | 2 +- ...ield.field.node.page.field_teaser_text.yml | 10 +- .../field.field.node.post.field_category.yml | 2 +- .../sync/field.field.node.post.field_tags.yml | 2 +- ...ield.field.node.post.field_teaser_text.yml | 10 +- ...field.field.node.profile.field_address.yml | 10 +- ...ield.field.node.profile.field_subtitle.yml | 10 +- ...d.field.node.profile.field_teaser_text.yml | 10 +- ...paragraph.accordion_item.field_heading.yml | 10 +- ...d.paragraph.callout_item.field_heading.yml | 10 +- ...ield.paragraph.callout_item.field_text.yml | 10 +- ...ld.paragraph.custom_card.field_heading.yml | 10 +- ...field.paragraph.custom_card.field_text.yml | 10 +- ...d.paragraph.gallery_item.field_heading.yml | 10 +- ...ield.paragraph.gallery_item.field_text.yml | 10 +- ...ield.field.paragraph.tab.field_heading.yml | 10 +- .../field.field.paragraph.text.field_text.yml | 10 +- .../config/sync/filter.format.basic_html.yml | 14 +- ...yout_builder_browser_blockcat.advanced.yml | 1 + ...ut_builder_browser_blockcat.all_blocks.yml | 1 + ....layout_builder_browser_blockcat.basic.yml | 1 + ....layout_builder_browser_blockcat.media.yml | 1 + .../config/sync/node.type.event.yml | 11 +- .../config/sync/node.type.page.yml | 11 +- .../config/sync/node.type.post.yml | 11 +- .../config/sync/node.type.profile.yml | 11 +- .../sync/node_revision_delete.settings.yml | 11 - .../sync/search_api.index.node_index.yml | 5 +- .../config/sync/search_api.settings.yml | 16 +- .../config/sync/system.feature_flags.yml | 1 + .../config/sync/user.role.authenticated.yml | 2 + .../config/sync/user.role.platform_admin.yml | 142 ++++- .../config/sync/user.role.site_admin.yml | 140 ++++- .../config/sync/views.view.block_content.yml | 22 +- .../config/sync/views.view.content.yml | 9 + .../config/sync/views.view.export_media.yml | 9 + .../sync/views.view.export_taxonomy.yml | 9 + .../config/sync/views.view.files.yml | 18 + .../config/sync/views.view.glossary.yml | 9 + .../config/sync/views.view.manage_events.yml | 9 + .../config/sync/views.view.manage_pages.yml | 9 + .../config/sync/views.view.manage_posts.yml | 9 + .../sync/views.view.manage_profiles.yml | 9 + .../config/sync/views.view.media.yml | 9 + .../config/sync/views.view.media_library.yml | 9 + .../sync/views.view.section_library.yml | 18 + .../sync/views.view.webform_submissions.yml | 63 +++ .../config/sync/ys_alert.settings.yml | 4 +- .../modules/custom/ys_core/ys_core.install | 1 + .../ys_layouts/src/UpdateExistingNodes.php | 16 +- .../modules/custom/ys_themes/css/levers.css | 13 + .../ys_views_basic/assets/css/views-basic.css | 492 ++++++++++++------ .../FieldWidget/ViewsBasicDefaultWidget.php | 1 + web/sites/default/services.yml | 0 web/sites/default/settings.php | 11 + 106 files changed, 1193 insertions(+), 619 deletions(-) delete mode 100644 web/profiles/custom/yalesites_profile/config/sync/node_revision_delete.settings.yml create mode 100644 web/profiles/custom/yalesites_profile/config/sync/system.feature_flags.yml mode change 100755 => 100644 web/sites/default/services.yml diff --git a/composer.json b/composer.json index 0b956b20c7..635bbee003 100644 --- a/composer.json +++ b/composer.json @@ -15,20 +15,20 @@ "require": { "composer/installers": "^1.9", "cweagans/composer-patches": "^1.7", - "drupal/core-composer-scaffold": "^9.2", - "drupal/core-recommended": "^9.2", + "drupal/core-composer-scaffold": "^10", + "drupal/core-project-message": "^10", + "drupal/core-recommended": "^10", "drush/drush": "^11 || ^12", "oomphinc/composer-installers-extender": "^2.0", - "pantheon-systems/drupal-integrations": "^9", + "pantheon-systems/drupal-integrations": "^10", "yalesites-org/yalesites_profile": "*" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2", "drupal/coder": "^8.3", - "drupal/console": "~1.0", - "drupal/core-dev": "^9.2", + "drupal/core-dev": "^10", "drupal/drupal-driver": "^2.1", - "drupal/drupal-extension": "^4.1", + "drupal/drupal-extension": "^5.0", "mikey179/vfsstream": "^1.6", "phpspec/prophecy-phpunit": "^2", "phpunit/phpunit": "^9.5", @@ -111,8 +111,10 @@ "composer/installers": true, "cweagans/composer-patches": true, "drupal/core-composer-scaffold": true, - "drupal/console-extend-plugin": true, - "oomphinc/composer-installers-extender": true + "oomphinc/composer-installers-extender": true, + "drupal/core-project-message": true, + "phpstan/extension-installer": true, + "drupal/console-extend-plugin": true } }, "scripts": { diff --git a/pantheon.upstream.yml b/pantheon.upstream.yml index 94542a7eae..1e8b404027 100644 --- a/pantheon.upstream.yml +++ b/pantheon.upstream.yml @@ -1,5 +1,5 @@ api_version: 1 -php_version: 8.1 +php_version: 8.2 database: version: 10.4 drush_version: 10 diff --git a/web/profiles/custom/yalesites_profile/composer.json b/web/profiles/custom/yalesites_profile/composer.json index cec1550283..b5de00ad1a 100644 --- a/web/profiles/custom/yalesites_profile/composer.json +++ b/web/profiles/custom/yalesites_profile/composer.json @@ -1,97 +1,98 @@ { "name": "yalesites-org/yalesites_profile", "type": "drupal-custom-profile", - "repositories": [ - { + "repositories": { + "drupal": { "type": "composer", "url": "https://packages.drupal.org/8" } - ], + }, "require": { - "drupal/address": "^1.10", - "drupal/admin_toolbar": "3.3.0", - "drupal/allowed_formats": "^2.0", - "drupal/auto_entitylabel": "^3.0", - "drupal/autosave_form": "^1.3", - "drupal/better_exposed_filters": "^6.0", - "drupal/block_content_permissions": "^1.11", + "drupal/address": "1.12", + "drupal/admin_toolbar": "3.4.1", + "drupal/allowed_formats": "3.0", + "drupal/auto_entitylabel": "3.0", + "drupal/autosave_form": "1.4", + "drupal/better_exposed_filters": "6.0.3", + "drupal/block_content_permissions": "1.11", "drupal/bugherd": "1.0", - "drupal/calendar_link": "^3.0", - "drupal/captcha": "1.10.0", - "drupal/cas": "^2.0", - "drupal/chosen": "^4.0", - "drupal/components": "^3.0", - "drupal/config_filter": "^2.4", - "drupal/config_ignore": "^3.0", - "drupal/config_split": "^2.0@RC", - "drupal/ctools": "^3.7", - "drupal/devel": "^5.1", - "drupal/devel_kint_extras": "^1.0", - "drupal/easy_breadcrumb": "^2.0", - "drupal/editoria11y": "^2.0", - "drupal/emulsify_twig": "^4.0", - "drupal/entity_redirect": "^2.2", - "drupal/fast_404": "^2.0@alpha", - "drupal/field_group": "^3.2", - "drupal/formdazzle": "^3.0", - "drupal/gin": "^3.0@beta", - "drupal/gin_lb": "^1.0@RC", - "drupal/google_analytics": "^4.0", - "drupal/hide_revision_field": "^2.2", - "drupal/honeypot": "^2.1", - "drupal/image_widget_crop": "^2.3", - "drupal/imagemagick": "^3.4", - "drupal/improve_line_breaks_filter": "^1.3", - "drupal/inline_entity_form": "^1.0@RC", - "drupal/layout_builder_browser": "^1.4", - "drupal/layout_builder_iframe_modal": "^1.3", - "drupal/layout_builder_lock": "^1.2", - "drupal/layout_builder_restrictions": "^2.17", - "drupal/layout_builder_restrictions_by_role": "^1.0@alpha", - "drupal/libraries": "^4.0", - "drupal/linkit": "^6.0@RC", - "drupal/mailchimp_transactional": "^1.0", - "drupal/mailsystem": "^4.3", - "drupal/markup": "^1.0@beta", - "drupal/maxlength": "^2.0@RC", - "drupal/media_library_edit": "^3.0", - "drupal/media_library_form_element": "^2.0", - "drupal/menu_admin_per_menu": "^1.4", - "drupal/menu_breadcrumb": "^1.16", - "drupal/menu_item_extras": "^3.0", - "drupal/metatag": "^1.19", - "drupal/migrate_plus": "^6.0", - "drupal/migrate_tools": "^6.0", - "drupal/multivalue_form_element": "^1.0@beta", - "drupal/node_revision_delete": "^1.0@RC", - "drupal/override_node_options": "^2.6", - "drupal/pantheon_advanced_page_cache": "^2.1", + "drupal/calendar_link": "3.0.2", + "drupal/captcha": "1.14", + "drupal/cas": "2.2.0", + "drupal/chosen": "4.0.0", + "drupal/components": "3.0.0-beta3", + "drupal/config_filter": "2.4", + "drupal/config_ignore": "3.0-beta2", + "drupal/config_split": "2.0.0-rc4", + "drupal/ctools": "4.0.4", + "drupal/devel": "5.1.2", + "drupal/devel_kint_extras": "1.1.0", + "drupal/easy_breadcrumb": "2.0.5", + "drupal/editoria11y": "2.0.14", + "drupal/emulsify_twig": "4.0.0", + "drupal/entity_redirect": "2.2", + "drupal/fast_404": "3.2", + "drupal/field_group": "3.4", + "drupal/formdazzle": "3.0.0", + "drupal/gin": "3.0-rc6", + "drupal/gin_lb": "1.0.x-dev@dev", + "drupal/google_analytics": "4.0.2", + "drupal/hide_revision_field": "2.3", + "drupal/honeypot": "2.1.3", + "drupal/image_widget_crop": "2.4", + "drupal/imagemagick": "3.4", + "drupal/improve_line_breaks_filter": "1.5", + "drupal/inline_entity_form": "2.0.0-rc9", + "drupal/layout_builder_browser": "1.x-dev@dev", + "drupal/layout_builder_iframe_modal": "1.3", + "drupal/layout_builder_lock": "1.2", + "drupal/layout_builder_restrictions": "2.19", + "drupal/layout_builder_restrictions_by_role": "1.0-alpha5", + "drupal/libraries": "4.0.4", + "drupal/linkit": "6.1.0", + "drupal/mailchimp_transactional": "1.1.0", + "drupal/mailsystem": "4.4", + "drupal/markup": "2.0.0-beta6", + "drupal/maxlength": "2.1.2", + "drupal/media_library_edit": "3.0.2", + "drupal/media_library_form_element": "2.0.6", + "drupal/menu_admin_per_menu": "1.5", + "drupal/menu_breadcrumb": "2.0.0-alpha0", + "drupal/menu_item_extras": "3.0.2", + "drupal/metatag": "2.0.0", + "drupal/migrate_plus": "6.0.1", + "drupal/migrate_tools": "6.0.2", + "drupal/multivalue_form_element": "1.0-beta6", + "drupal/node_revision_delete": "2.0.0-alpha2", + "drupal/override_node_options": "2.7", + "drupal/pantheon_advanced_page_cache": "2.1.2", "drupal/pantheon_secrets": "1.0.1", - "drupal/paragraphs": "^1.12", - "drupal/paragraphs_features": "^2.0@beta", - "drupal/pathauto": "^1.8", - "drupal/publishcontent": "^1.5", - "drupal/quick_node_clone": "^1.15", - "drupal/recaptcha": "^3.1", - "drupal/recaptcha_v3": "^1.7", - "drupal/redirect": "^1.7", - "drupal/role_delegation": "^1.2", - "drupal/search_api": "^1.25", - "drupal/search_api_exclude": "^2.0", - "drupal/search_api_html_element_filter": "^1.0", - "drupal/section_library": "^1.1", - "drupal/selective_better_exposed_filters": "^3.0@beta", - "drupal/simple_sitemap": "^4.1", - "drupal/single_content_sync": "^1.4", - "drupal/smart_date": "^3.5", - "drupal/twig_tweak": "^3.1", - "drupal/typogrify": "^1.2", - "drupal/upgrade_status": "^3.18", - "drupal/webform": "^6.2@beta", - "drupal/wingsuit_companion": "^2.0@RC", - "jjj/chosen": "^2.2", + "drupal/paragraphs": "1.16", + "drupal/paragraphs_features": "2.0-beta3", + "drupal/pathauto": "1.12", + "drupal/publishcontent": "1.6", + "drupal/quick_node_clone": "1.16", + "drupal/recaptcha": "3.2", + "drupal/recaptcha_v3": "1.9", + "drupal/redirect": "1.9", + "drupal/role_delegation": "1.2", + "drupal/search_api": "1.29", + "drupal/search_api_exclude": "2.0.2", + "drupal/search_api_html_element_filter": "1.0.4", + "drupal/section_library": "1.1.1", + "drupal/selective_better_exposed_filters": "3.0.0-beta1", + "drupal/simple_sitemap": "4.1.6", + "drupal/single_content_sync": "1.4.1", + "drupal/smart_date": "4.0.3", + "drupal/twig_tweak": "3.2.1", + "drupal/typogrify": "1.2", + "drupal/upgrade_status": "4.0.0", + "drupal/webform": "6.2.0-beta6", + "drupal/wingsuit_companion": "2.1", + "jjj/chosen": "2.2.1", + "laminas/laminas-escaper": "2.12", "yalesites-org/atomic": "1.21.1", - "yalesites-org/yale_cas": "^1.0" + "yalesites-org/yale_cas": "1.0.4" }, "minimum-stability": "dev", "prefer-stable": true, @@ -112,11 +113,7 @@ "hide remove button": "https://www.drupal.org/files/issues/2020-05-13/hide_field_required_paragraphs_remove_button_1.patch" }, "drupal/core": { - "plural results summary https://www.drupal.org/project/drupal/issues/2888320": "https://www.drupal.org/files/issues/2021-12-15/2888320-78.patch", - "Prevent media library item overflow https://www.drupal.org/project/drupal/issues/3059955": "https://www.drupal.org/files/issues/2023-03-18/3059955-167.patch", - "Remove for Drupal 10 - CKEditor 5 should not grow to infinite height https://www.drupal.org/project/drupal/issues/3273755": "https://www.drupal.org/files/issues/2023-07-26/ckeditor-height-fix.patch", - "Fix ZipArchive deprecation: https://www.drupal.org/project/single_content_sync/issues/3364535": "https://www.drupal.org/files/issues/2022-08-22/2850794-51.patch", - "Allow multiples of the same view on a page to have uniquely different pagers: https://www.drupal.org/project/drupal/issues/3225987": "https://www.drupal.org/files/issues/2023-04-21/drupal-dynamic_pager_id-3225987-19.patch" + "plural results summary https://www.drupal.org/project/drupal/issues/2888320": "https://www.drupal.org/files/issues/2021-12-15/2888320-78.patch" }, "drupal/entity_redirect": { "fix layout route https://www.drupal.org/project/entity_redirect/issues/3352265": "https://git.drupalcode.org/project/entity_redirect/-/merge_requests/6.patch" @@ -124,9 +121,6 @@ "drupal/layout_builder_restrictions_by_role": { "Fix user 1 https://www.drupal.org/project/layout_builder_restrictions_by_role/issues/3298638": "https://www.drupal.org/files/issues/2022-07-28/3298638--layout_builder_restrictions_by_role--user-1-exception-8.patch" }, - "drupal/layout_builder_browser": { - "close modal on submit https://www.drupal.org/project/layout_builder_browser/issues/3352754": "https://www.drupal.org/files/issues/2023-04-19/layout_builder_browser-modal_does_not_close_on_submit-3352754-2.patch" - }, "drupal/bugherd": { "anonymous user unable to fill in email field https://www.drupal.org/project/bugherd/issues/3364305": "https://git.drupalcode.org/project/bugherd/-/merge_requests/4.diff" }, @@ -140,8 +134,11 @@ "drupal/redirect": { "fix validation issue on adding url redirect": "https://www.drupal.org/files/issues/2023-08-09/3057250-65.patch" }, - "drupal/allowed_formats": { - "allowed formats missing default value": "https://www.drupal.org/files/issues/2022-02-02/2950548-allowed_formats-missing_default_value.patch" + "drupal/typogrify": { + "update deprecated php for v8.2 https://www.drupal.org/project/typogrify/issues/3398815": "https://git.drupalcode.org/project/typogrify/-/merge_requests/6.diff" + }, + "drupal/google_analytics": { + "Cannot install from existing config https://www.drupal.org/project/google_analytics/issues/3373921": "https://www.drupal.org/files/issues/2023-08-07/google-analytics-issues-3373921-cannot-install-from-existing-config-11.patch" } } } diff --git a/web/profiles/custom/yalesites_profile/config/sync/captcha.settings.yml b/web/profiles/custom/yalesites_profile/config/sync/captcha.settings.yml index 1a9aa1b1f0..571a999c80 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/captcha.settings.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/captcha.settings.yml @@ -1,14 +1,15 @@ _core: default_config_hash: hSAUW7BoAd9YUpKcVKyZpW4wY67g4XZAYlt3Vnz6SVA -enabled_default: 0 +enable_globally: 0 +enable_globally_on_admin_routes: false default_challenge: recaptcha_v3/form_submission description: 'This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.' administration_mode: false -allow_on_admin_pages: false +administration_mode_on_admin_routes: false whitelist_ips: '' -add_captcha_description: true wrong_captcha_response_message: 'The answer you entered for the CAPTCHA was not correct.' default_validation: 1 persistence: 1 enable_stats: false log_wrong_responses: false +title: CAPTCHA diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.grand_hero.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.grand_hero.default.yml index e0600de6d6..8cc26e3a8e 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.grand_hero.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.grand_hero.default.yml @@ -88,7 +88,7 @@ content: weight: 6 region: content settings: - rows: 5 + rows: 3 placeholder: '' third_party_settings: allowed_formats: diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.pull_quote.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.pull_quote.default.yml index d164fb0205..ffb8a05dad 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.pull_quote.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.pull_quote.default.yml @@ -50,7 +50,7 @@ content: weight: 4 region: content settings: - rows: 5 + rows: 3 placeholder: '' third_party_settings: allowed_formats: diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.quick_links.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.quick_links.default.yml index 05165de905..624c78d3d4 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.quick_links.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.quick_links.default.yml @@ -65,7 +65,7 @@ content: weight: 2 region: content settings: - rows: 5 + rows: 3 placeholder: '' third_party_settings: allowed_formats: diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.video.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.video.default.yml index fd3a2ae953..7879b96248 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.video.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.video.default.yml @@ -55,7 +55,7 @@ content: weight: 2 region: content settings: - rows: 5 + rows: 3 placeholder: '' third_party_settings: allowed_formats: diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.wrapped_image.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.wrapped_image.default.yml index 1e4577be68..5e0c5dada0 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.wrapped_image.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.block_content.wrapped_image.default.yml @@ -69,7 +69,7 @@ content: weight: 2 region: content settings: - rows: 5 + rows: 3 placeholder: '' third_party_settings: allowed_formats: diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.node.event.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.node.event.default.yml index da3f19cbc1..4b4f1036ed 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.node.event.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_form_display.node.event.default.yml @@ -106,7 +106,6 @@ content: weight: 4 region: content settings: - hide_date: 0 modal: false default_duration: 60 default_duration_increments: |- @@ -116,6 +115,7 @@ content: 120|2 hours custom show_extra: false + hide_date: false third_party_settings: { } field_event_type: type: options_buttons diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.banner_16_5.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.banner_16_5.yml index 114c6e3d8f..8434aa28a7 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.banner_16_5.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.banner_16_5.yml @@ -20,6 +20,8 @@ content: settings: responsive_image_style: banner_16_5_ image_link: '' + image_loading: + attribute: eager third_party_settings: { } weight: 0 region: content diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.card_list_3_2.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.card_list_3_2.yml index 135d2b69b5..edc31b8363 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.card_list_3_2.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.card_list_3_2.yml @@ -20,6 +20,8 @@ content: settings: responsive_image_style: card_list_3_2 image_link: '' + image_loading: + attribute: eager third_party_settings: { } weight: 0 region: content diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.card_secondary_3_2.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.card_secondary_3_2.yml index 74070c6327..114fc2a39c 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.card_secondary_3_2.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.card_secondary_3_2.yml @@ -20,6 +20,8 @@ content: settings: responsive_image_style: card_secondary_3_2 image_link: '' + image_loading: + attribute: eager third_party_settings: { } weight: 0 region: content diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.default.yml index 817b5cc9a9..5d03aa4277 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.default.yml @@ -19,6 +19,8 @@ content: settings: responsive_image_style: image_max_width image_link: '' + image_loading: + attribute: eager third_party_settings: { } weight: 0 region: content diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.image_content_width.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.image_content_width.yml index 9b80314e46..54f41dd98f 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.image_content_width.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.image_content_width.yml @@ -20,6 +20,8 @@ content: settings: responsive_image_style: image_content_width image_link: '' + image_loading: + attribute: eager third_party_settings: { } weight: 0 region: content diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.image_float.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.image_float.yml index c9e81c21be..11a3c10541 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.image_float.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.image_float.yml @@ -20,6 +20,8 @@ content: settings: responsive_image_style: image_float image_link: '' + image_loading: + attribute: eager third_party_settings: { } weight: 0 region: content diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.profile_directory_card_1_1_.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.profile_directory_card_1_1_.yml index f9b44bd27b..37518b88c3 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.profile_directory_card_1_1_.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.profile_directory_card_1_1_.yml @@ -25,6 +25,8 @@ content: settings: responsive_image_style: profile_1_1_ image_link: '' + image_loading: + attribute: eager third_party_settings: { } weight: 0 region: content diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.text_with_image_feature_equal.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.text_with_image_feature_equal.yml index 2a52eba3d1..b67ad9261c 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.text_with_image_feature_equal.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.image.text_with_image_feature_equal.yml @@ -20,6 +20,8 @@ content: settings: responsive_image_style: text_with_image_feature_equal image_link: '' + image_loading: + attribute: eager third_party_settings: { } weight: 0 region: content diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.video.default.yml b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.video.default.yml index 724680305b..75216a932e 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.video.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.entity_view_display.media.video.default.yml @@ -18,6 +18,8 @@ content: settings: max_width: 0 max_height: 0 + loading: + attribute: eager third_party_settings: { } weight: 0 region: content diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.extension.yml b/web/profiles/custom/yalesites_profile/config/sync/core.extension.yml index 27b3e96f22..8f51697110 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.extension.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.extension.yml @@ -10,7 +10,6 @@ module: better_exposed_filters: 0 block: 0 block_content: 0 - block_content_permissions: 0 breakpoint: 0 calendar_link: 0 captcha: 0 @@ -96,6 +95,7 @@ module: paragraphs_features: 0 path: 0 path_alias: 0 + phpass: 0 publishcontent: 0 quick_node_clone: 0 recaptcha: 0 diff --git a/web/profiles/custom/yalesites_profile/config/sync/editor.editor.basic_html.yml b/web/profiles/custom/yalesites_profile/config/sync/editor.editor.basic_html.yml index d8c02d6578..5716f12005 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/editor.editor.basic_html.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/editor.editor.basic_html.yml @@ -27,6 +27,12 @@ settings: - '|' - sourceEditing plugins: + ckeditor5_alignment: + enabled_alignments: + - center + - justify + - left + - right ckeditor5_heading: enabled_headings: - heading2 @@ -34,6 +40,9 @@ settings: - heading4 - heading5 - heading6 + ckeditor5_list: + reversed: false + startIndex: true ckeditor5_sourceEditing: allowed_tags: - '' @@ -50,15 +59,6 @@ settings: - '
' - '
' - '' - ckeditor5_list: - reversed: false - startIndex: true - ckeditor5_alignment: - enabled_alignments: - - left - - center - - right - - justify linkit_extension: linkit_enabled: true linkit_profile: default diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.accordion.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.accordion.field_heading.yml index e9b38815a8..5205e2777e 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.accordion.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.accordion.field_heading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.accordion - field.storage.block_content.field_heading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.accordion.field_heading field_name: field_heading entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_heading.yml index a9b405641e..ce99ef577d 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_heading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.content_spotlight - field.storage.block_content.field_heading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.content_spotlight.field_heading field_name: field_heading entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_subheading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_subheading.yml index 28fb36a990..66ebc64344 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_subheading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_subheading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.content_spotlight - field.storage.block_content.field_subheading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.content_spotlight.field_subheading field_name: field_subheading entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: false default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_text.yml index d94f776235..4593457730 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.content_spotlight.field_text.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.content_spotlight - field.storage.block_content.field_text + - filter.format.restricted_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - restricted_html id: block_content.content_spotlight.field_text field_name: field_text entity_type: block_content @@ -22,5 +18,7 @@ required: true translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - restricted_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.cta_banner.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.cta_banner.field_heading.yml index a58d2a780b..a3c73252a0 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.cta_banner.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.cta_banner.field_heading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.cta_banner - field.storage.block_content.field_heading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.cta_banner.field_heading field_name: field_heading entity_type: block_content @@ -22,5 +18,7 @@ required: true translatable: false default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.cta_banner.field_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.cta_banner.field_text.yml index 826107d4bb..cbadbe81ff 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.cta_banner.field_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.cta_banner.field_text.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.cta_banner - field.storage.block_content.field_text + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.cta_banner.field_text field_name: field_text entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: false default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.custom_cards.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.custom_cards.field_heading.yml index 20d4c45c7e..f84f408a37 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.custom_cards.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.custom_cards.field_heading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.custom_cards - field.storage.block_content.field_heading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.custom_cards.field_heading field_name: field_heading entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.directory.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.directory.field_heading.yml index 419550398c..193a2b23a5 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.directory.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.directory.field_heading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.directory - field.storage.block_content.field_heading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.directory.field_heading field_name: field_heading entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.event_list.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.event_list.field_heading.yml index 0c83597488..f4ff040ee5 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.event_list.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.event_list.field_heading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.event_list - field.storage.block_content.field_heading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.event_list.field_heading field_name: field_heading entity_type: block_content @@ -22,5 +18,7 @@ required: true translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.gallery.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.gallery.field_heading.yml index 0951b3b8ad..c70258387a 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.gallery.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.gallery.field_heading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.gallery - field.storage.block_content.field_heading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.gallery.field_heading field_name: field_heading entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_heading.yml index 33daf2c747..6783bc8d47 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_heading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.grand_hero - field.storage.block_content.field_heading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.grand_hero.field_heading field_name: field_heading entity_type: block_content @@ -22,5 +18,7 @@ required: true translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_text.yml index 5668dfda73..740aafe088 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.grand_hero.field_text.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.grand_hero - field.storage.block_content.field_text + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.grand_hero.field_text field_name: field_text entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.image.field_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.image.field_text.yml index 9b771eb292..e468ea693c 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.image.field_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.image.field_text.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.image - field.storage.block_content.field_text + - filter.format.restricted_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - restricted_html id: block_content.image.field_text field_name: field_text entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - restricted_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.media_grid.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.media_grid.field_heading.yml index f320516cd2..01a2a9a3e6 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.media_grid.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.media_grid.field_heading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.media_grid - field.storage.block_content.field_heading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.media_grid.field_heading field_name: field_heading entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.post_list.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.post_list.field_heading.yml index f13b6fde7f..42e8a70046 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.post_list.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.post_list.field_heading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.post_list - field.storage.block_content.field_heading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.post_list.field_heading field_name: field_heading entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.pull_quote.field_caption.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.pull_quote.field_caption.yml index 5e8af1c7d1..5467b74b35 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.pull_quote.field_caption.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.pull_quote.field_caption.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.pull_quote - field.storage.block_content.field_caption + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.pull_quote.field_caption field_name: field_caption entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.pull_quote.field_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.pull_quote.field_text.yml index 1787ee5779..29565b2605 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.pull_quote.field_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.pull_quote.field_text.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.pull_quote - field.storage.block_content.field_text + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.pull_quote.field_text field_name: field_text entity_type: block_content @@ -22,5 +18,7 @@ required: true translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.quick_links.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.quick_links.field_heading.yml index 0322cee8f9..09049e153a 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.quick_links.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.quick_links.field_heading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.quick_links - field.storage.block_content.field_heading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.quick_links.field_heading field_name: field_heading entity_type: block_content @@ -22,5 +18,7 @@ required: true translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.quick_links.field_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.quick_links.field_text.yml index ba91b756d5..e8357c9f92 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.quick_links.field_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.quick_links.field_text.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.quick_links - field.storage.block_content.field_text + - filter.format.restricted_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.quick_links.field_text field_name: field_text entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - restricted_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.text.field_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.text.field_text.yml index 2581f6da33..e62ac5b3fe 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.text.field_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.text.field_text.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.text - field.storage.block_content.field_text + - filter.format.basic_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - basic_html id: block_content.text.field_text field_name: field_text entity_type: block_content @@ -22,5 +18,7 @@ required: true translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - basic_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.video.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.video.field_heading.yml index b8572062e8..c144185182 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.video.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.video.field_heading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.video - field.storage.block_content.field_heading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.video.field_heading field_name: field_heading entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.video.field_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.video.field_text.yml index 2fbe6b4b28..f8890c8f9d 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.video.field_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.video.field_text.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.video - field.storage.block_content.field_text + - filter.format.restricted_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - restricted_html id: block_content.video.field_text field_name: field_text entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - restricted_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.view.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.view.field_heading.yml index 0c034b85b9..8ee8797b56 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.view.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.view.field_heading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.view - field.storage.block_content.field_heading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.view.field_heading field_name: field_heading entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.webform.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.webform.field_heading.yml index 941bdf6041..71f4031516 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.webform.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.webform.field_heading.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.webform - field.storage.block_content.field_heading + - filter.format.heading_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: block_content.webform.field_heading field_name: field_heading entity_type: block_content @@ -22,5 +18,7 @@ required: true translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_caption.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_caption.yml index 24bc7fe639..b6325c52ea 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_caption.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_caption.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.wrapped_image - field.storage.block_content.field_caption + - filter.format.restricted_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - restricted_html id: block_content.wrapped_image.field_caption field_name: field_caption entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: false default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - restricted_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_text.yml index ee2d1ef6f1..bf35ac7827 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.block_content.wrapped_image.field_text.yml @@ -5,13 +5,9 @@ dependencies: config: - block_content.type.wrapped_image - field.storage.block_content.field_text + - filter.format.basic_html module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - basic_html id: block_content.wrapped_image.field_text field_name: field_text entity_type: block_content @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - basic_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_category.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_category.yml index 9c3d3595f6..d0e9ac5fd3 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_category.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_category.yml @@ -11,7 +11,7 @@ field_name: field_category entity_type: node bundle: event label: Category -description: 'Categories will autocomplete as you type. Choose from pre-created options only. To add a new category, go to ''Content->Manage Taxonomy->Event Categories''.' +description: "Categories will autocomplete as you type. Choose from pre-created options only. To add a new category, go to 'Content->Manage Taxonomy->Event Categories'." required: false translatable: false default_value: { } diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_event_cta.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_event_cta.yml index 377bd22a6f..7809ef57a4 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_event_cta.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_event_cta.yml @@ -12,7 +12,7 @@ field_name: field_event_cta entity_type: node bundle: event label: 'Call to Action' -description: 'Add an optional link to the top of event pages. For example, ''Register'', ''RSVP'', or ''Volunteer'' links that take visitors to external events management systems.' +description: "Add an optional link to the top of event pages. For example, 'Register', 'RSVP', or 'Volunteer' links that take visitors to external events management systems." required: false translatable: false default_value: { } diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_tags.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_tags.yml index 853caf6678..d5c3deab6b 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_tags.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_tags.yml @@ -11,7 +11,7 @@ field_name: field_tags entity_type: node bundle: event label: Tags -description: 'Tags will autocomplete as you type. Choose from pre-created options only. To add a new tag, go to ''Content->Manage Taxonomy->Tags''.' +description: "Tags will autocomplete as you type. Choose from pre-created options only. To add a new tag, go to 'Content->Manage Taxonomy->Tags'." required: false translatable: true default_value: { } diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_teaser_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_teaser_text.yml index 387ad8deb5..e978f88d88 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_teaser_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.event.field_teaser_text.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.node.field_teaser_text + - filter.format.heading_html - node.type.event module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: node.event.field_teaser_text field_name: field_teaser_text entity_type: node @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.page.field_tags.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.page.field_tags.yml index 6cb5ffe861..095fd51e67 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.page.field_tags.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.page.field_tags.yml @@ -11,7 +11,7 @@ field_name: field_tags entity_type: node bundle: page label: Tags -description: 'Tags will autocomplete as you type. Choose from pre-created options only. To add a new tag, go to ''Content->Manage Taxonomy->Tags''.' +description: "Tags will autocomplete as you type. Choose from pre-created options only. To add a new tag, go to 'Content->Manage Taxonomy->Tags'." required: false translatable: false default_value: { } diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.page.field_teaser_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.page.field_teaser_text.yml index f79a53f1f3..7b6c485b8e 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.page.field_teaser_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.page.field_teaser_text.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.node.field_teaser_text + - filter.format.heading_html - node.type.page module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: node.page.field_teaser_text field_name: field_teaser_text entity_type: node @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.post.field_category.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.post.field_category.yml index 48cb3d94de..4d424ec71a 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.post.field_category.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.post.field_category.yml @@ -11,7 +11,7 @@ field_name: field_category entity_type: node bundle: post label: Category -description: 'Categories will autocomplete as you type. Choose from pre-created options only. To add a new category, go to ''Content->Manage Taxonomy->Post Categories''.' +description: "Categories will autocomplete as you type. Choose from pre-created options only. To add a new category, go to 'Content->Manage Taxonomy->Post Categories'." required: false translatable: true default_value: { } diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.post.field_tags.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.post.field_tags.yml index 4265db9d2d..72b05c8933 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.post.field_tags.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.post.field_tags.yml @@ -11,7 +11,7 @@ field_name: field_tags entity_type: node bundle: post label: Tags -description: 'Tags will autocomplete as you type. Choose from pre-created options only. To add a new tag, go to ''Content->Manage Taxonomy->Tags''.' +description: "Tags will autocomplete as you type. Choose from pre-created options only. To add a new tag, go to 'Content->Manage Taxonomy->Tags'." required: false translatable: true default_value: { } diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.post.field_teaser_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.post.field_teaser_text.yml index e3e65c6568..8453f8c9cc 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.post.field_teaser_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.post.field_teaser_text.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.node.field_teaser_text + - filter.format.heading_html - node.type.post module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: node.post.field_teaser_text field_name: field_teaser_text entity_type: node @@ -22,5 +18,7 @@ required: false translatable: false default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.profile.field_address.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.profile.field_address.yml index 16f842ca04..ed0e8ac9c8 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.profile.field_address.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.profile.field_address.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.node.field_address + - filter.format.heading_html - node.type.profile module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: node.profile.field_address field_name: field_address entity_type: node @@ -22,5 +18,7 @@ required: false translatable: false default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.profile.field_subtitle.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.profile.field_subtitle.yml index 21388cd29a..6b86fab16d 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.profile.field_subtitle.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.profile.field_subtitle.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.node.field_subtitle + - filter.format.heading_html - node.type.profile module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: node.profile.field_subtitle field_name: field_subtitle entity_type: node @@ -22,5 +18,7 @@ required: false translatable: false default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.profile.field_teaser_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.profile.field_teaser_text.yml index 317929291d..a849b7fc47 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.node.profile.field_teaser_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.node.profile.field_teaser_text.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.node.field_teaser_text + - filter.format.heading_html - node.type.profile module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: node.profile.field_teaser_text field_name: field_teaser_text entity_type: node @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.accordion_item.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.accordion_item.field_heading.yml index 14c593667b..1779914b3b 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.accordion_item.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.accordion_item.field_heading.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.paragraph.field_heading + - filter.format.heading_html - paragraphs.paragraphs_type.accordion_item module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: paragraph.accordion_item.field_heading field_name: field_heading entity_type: paragraph @@ -22,5 +18,7 @@ required: true translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.callout_item.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.callout_item.field_heading.yml index 464a87760d..36e5f6210a 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.callout_item.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.callout_item.field_heading.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.paragraph.field_heading + - filter.format.heading_html - paragraphs.paragraphs_type.callout_item module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: paragraph.callout_item.field_heading field_name: field_heading entity_type: paragraph @@ -22,5 +18,7 @@ required: true translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.callout_item.field_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.callout_item.field_text.yml index 21c81e7623..9c23ba4907 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.callout_item.field_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.callout_item.field_text.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.paragraph.field_text + - filter.format.heading_html - paragraphs.paragraphs_type.callout_item module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: paragraph.callout_item.field_text field_name: field_text entity_type: paragraph @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.custom_card.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.custom_card.field_heading.yml index b2fc30bf7c..60c8c78c2f 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.custom_card.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.custom_card.field_heading.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.paragraph.field_heading + - filter.format.heading_html - paragraphs.paragraphs_type.custom_card module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: paragraph.custom_card.field_heading field_name: field_heading entity_type: paragraph @@ -22,5 +18,7 @@ required: true translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.custom_card.field_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.custom_card.field_text.yml index 753ecdc678..75e613acaf 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.custom_card.field_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.custom_card.field_text.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.paragraph.field_text + - filter.format.heading_html - paragraphs.paragraphs_type.custom_card module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: paragraph.custom_card.field_text field_name: field_text entity_type: paragraph @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.gallery_item.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.gallery_item.field_heading.yml index 25d4ac38a5..c389e55361 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.gallery_item.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.gallery_item.field_heading.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.paragraph.field_heading + - filter.format.heading_html - paragraphs.paragraphs_type.gallery_item module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - heading_html id: paragraph.gallery_item.field_heading field_name: field_heading entity_type: paragraph @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - heading_html field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.gallery_item.field_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.gallery_item.field_text.yml index 18239a7a1d..1c2d7c3a86 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.gallery_item.field_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.gallery_item.field_text.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.paragraph.field_text + - filter.format.restricted_html - paragraphs.paragraphs_type.gallery_item module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - restricted_html id: paragraph.gallery_item.field_text field_name: field_text entity_type: paragraph @@ -22,5 +18,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - restricted_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.tab.field_heading.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.tab.field_heading.yml index 235538555b..9c8e939be0 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.tab.field_heading.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.tab.field_heading.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.paragraph.field_heading + - filter.format.plain_text - paragraphs.paragraphs_type.tab module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - plain_text id: paragraph.tab.field_heading field_name: field_heading entity_type: paragraph @@ -22,5 +18,7 @@ required: true translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - plain_text field_type: text diff --git a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.text.field_text.yml b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.text.field_text.yml index 0810423aca..6840b4a456 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.text.field_text.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/field.field.paragraph.text.field_text.yml @@ -4,14 +4,10 @@ status: true dependencies: config: - field.storage.paragraph.field_text + - filter.format.basic_html - paragraphs.paragraphs_type.text module: - - allowed_formats - text -third_party_settings: - allowed_formats: - allowed_formats: - - basic_html id: paragraph.text.field_text field_name: field_text entity_type: paragraph @@ -22,5 +18,7 @@ required: true translatable: false default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - basic_html field_type: text_long diff --git a/web/profiles/custom/yalesites_profile/config/sync/filter.format.basic_html.yml b/web/profiles/custom/yalesites_profile/config/sync/filter.format.basic_html.yml index 6321685235..33b90851c4 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/filter.format.basic_html.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/filter.format.basic_html.yml @@ -80,15 +80,21 @@ filters: smartypants_enabled: '1' smartypants_hyphens: '2' space_hyphens: '0' + wrap_ampersand: '0' widont_enabled: '0' - hyphenate_shy: '0' space_to_nbsp: '1' - wrap_caps: '0' - wrap_ampersand: '0' + hyphenate_shy: '0' wrap_abbr: '0' - wrap_numbers: '0' + wrap_caps: '0' wrap_initial_quotes: '1' + wrap_numbers: '0' ligatures: 'a:0:{}' arrows: 'a:0:{}' fractions: 'a:0:{}' quotes: 'a:2:{s:2:",,";s:2:",,";s:2:"''''";s:2:"''''";}' + filter_image_lazy_load: + id: filter_image_lazy_load + provider: filter + status: true + weight: 12 + settings: { } diff --git a/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.advanced.yml b/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.advanced.yml index 631409be3d..2ebf554411 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.advanced.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.advanced.yml @@ -5,3 +5,4 @@ dependencies: { } id: advanced label: Advanced weight: -7 +opened: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.all_blocks.yml b/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.all_blocks.yml index 64f8846b6a..4762eb7a9c 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.all_blocks.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.all_blocks.yml @@ -5,3 +5,4 @@ dependencies: { } id: all_blocks label: 'All Blocks' weight: -10 +opened: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.basic.yml b/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.basic.yml index 6324b4a52a..5c05c661f3 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.basic.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.basic.yml @@ -5,3 +5,4 @@ dependencies: { } id: basic label: Basic weight: -9 +opened: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.media.yml b/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.media.yml index 9537d891f2..cac0d0d77e 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.media.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/layout_builder_browser.layout_builder_browser_blockcat.media.yml @@ -5,3 +5,4 @@ dependencies: { } id: media label: Media weight: -8 +opened: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/node.type.event.yml b/web/profiles/custom/yalesites_profile/config/sync/node.type.event.yml index cd0c4095de..205945621a 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/node.type.event.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/node.type.event.yml @@ -14,9 +14,14 @@ third_party_settings: search_api_exclude: enabled: 1 node_revision_delete: - minimum_revisions_to_keep: 1 - minimum_age_to_delete: 12 - when_to_delete: 0 + amount: + status: true + settings: + amount: 1 + created: + status: true + settings: + age: 12 entity_redirect: redirect: anonymous: diff --git a/web/profiles/custom/yalesites_profile/config/sync/node.type.page.yml b/web/profiles/custom/yalesites_profile/config/sync/node.type.page.yml index f7a4ace8f8..85362c92ad 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/node.type.page.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/node.type.page.yml @@ -16,9 +16,14 @@ third_party_settings: search_api_exclude: enabled: 1 node_revision_delete: - minimum_revisions_to_keep: 1 - minimum_age_to_delete: 12 - when_to_delete: 0 + amount: + status: true + settings: + amount: 1 + created: + status: true + settings: + age: 12 entity_redirect: redirect: anonymous: diff --git a/web/profiles/custom/yalesites_profile/config/sync/node.type.post.yml b/web/profiles/custom/yalesites_profile/config/sync/node.type.post.yml index 038619825e..af2538f0bc 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/node.type.post.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/node.type.post.yml @@ -14,9 +14,14 @@ third_party_settings: search_api_exclude: enabled: 1 node_revision_delete: - minimum_revisions_to_keep: 1 - minimum_age_to_delete: 12 - when_to_delete: 0 + amount: + status: true + settings: + amount: 1 + created: + status: true + settings: + age: 12 entity_redirect: redirect: anonymous: diff --git a/web/profiles/custom/yalesites_profile/config/sync/node.type.profile.yml b/web/profiles/custom/yalesites_profile/config/sync/node.type.profile.yml index 466189c2c5..ac7ca280bd 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/node.type.profile.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/node.type.profile.yml @@ -36,9 +36,14 @@ third_party_settings: search_api_exclude: enabled: 1 node_revision_delete: - minimum_revisions_to_keep: 1 - minimum_age_to_delete: 12 - when_to_delete: 0 + amount: + status: true + settings: + amount: 1 + created: + status: true + settings: + age: 12 name: Profile type: profile description: 'Manage and present profiles and directories on your website.' diff --git a/web/profiles/custom/yalesites_profile/config/sync/node_revision_delete.settings.yml b/web/profiles/custom/yalesites_profile/config/sync/node_revision_delete.settings.yml deleted file mode 100644 index 5b399cc1b5..0000000000 --- a/web/profiles/custom/yalesites_profile/config/sync/node_revision_delete.settings.yml +++ /dev/null @@ -1,11 +0,0 @@ -_core: - default_config_hash: Cq0qEqvsPlEVfrCpF0VRzK4MFQhRHzqncneoTEKHXUc -delete_newer: false -node_revision_delete_cron: 50 -node_revision_delete_time: 86400 -node_revision_delete_minimum_age_to_delete_time: - max_number: 12 - time: months -node_revision_delete_when_to_delete_time: - max_number: 12 - time: months diff --git a/web/profiles/custom/yalesites_profile/config/sync/search_api.index.node_index.yml b/web/profiles/custom/yalesites_profile/config/sync/search_api.index.node_index.yml index 7089b8a7ce..9e3ccc4598 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/search_api.index.node_index.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/search_api.index.node_index.yml @@ -42,9 +42,8 @@ field_settings: event: default page: default post: default - profile: default status: - label: status + label: null datasource_id: 'entity:node' property_path: status type: boolean @@ -54,7 +53,7 @@ field_settings: module: - node uid: - label: uid + label: null datasource_id: 'entity:node' property_path: uid type: integer diff --git a/web/profiles/custom/yalesites_profile/config/sync/search_api.settings.yml b/web/profiles/custom/yalesites_profile/config/sync/search_api.settings.yml index 21dfa083c2..510a3e5280 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/search_api.settings.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/search_api.settings.yml @@ -5,7 +5,7 @@ cron_worker_runtime: 15 default_tracker: default tracking_page_size: 100 boost_factors: - - !!float 0 + - 0.0 - 0.1 - 0.2 - 0.3 @@ -14,15 +14,15 @@ boost_factors: - 0.7 - 0.8 - 0.9 - - !!float 1 + - 1.0 - 1.1 - 1.2 - 1.3 - 1.4 - 1.5 - - !!float 2 - - !!float 3 - - !!float 5 - - !!float 8 - - !!float 13 - - !!float 21 + - 2.0 + - 3.0 + - 5.0 + - 8.0 + - 13.0 + - 21.0 diff --git a/web/profiles/custom/yalesites_profile/config/sync/system.feature_flags.yml b/web/profiles/custom/yalesites_profile/config/sync/system.feature_flags.yml new file mode 100644 index 0000000000..7169df08b7 --- /dev/null +++ b/web/profiles/custom/yalesites_profile/config/sync/system.feature_flags.yml @@ -0,0 +1 @@ +linkset_endpoint: false diff --git a/web/profiles/custom/yalesites_profile/config/sync/user.role.authenticated.yml b/web/profiles/custom/yalesites_profile/config/sync/user.role.authenticated.yml index e9b6076e41..27646f4045 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/user.role.authenticated.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/user.role.authenticated.yml @@ -7,6 +7,7 @@ dependencies: - filter.format.heading_html - filter.format.restricted_html module: + - file - filter - google_analytics - media @@ -19,6 +20,7 @@ weight: 1 is_admin: false permissions: - 'access content' + - 'delete own files' - 'opt-in or out of google analytics tracking' - 'use text format basic_html' - 'use text format heading_html' diff --git a/web/profiles/custom/yalesites_profile/config/sync/user.role.platform_admin.yml b/web/profiles/custom/yalesites_profile/config/sync/user.role.platform_admin.yml index 9b0ea4cedc..344768d379 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/user.role.platform_admin.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/user.role.platform_admin.yml @@ -3,6 +3,29 @@ langcode: en status: true dependencies: config: + - block_content.type.accordion + - block_content.type.button_link + - block_content.type.callout + - block_content.type.content_spotlight + - block_content.type.cta_banner + - block_content.type.custom_cards + - block_content.type.directory + - block_content.type.divider + - block_content.type.embed + - block_content.type.event_list + - block_content.type.gallery + - block_content.type.grand_hero + - block_content.type.image + - block_content.type.media_grid + - block_content.type.post_list + - block_content.type.pull_quote + - block_content.type.quick_links + - block_content.type.tabs + - block_content.type.text + - block_content.type.video + - block_content.type.view + - block_content.type.webform + - block_content.type.wrapped_image - core.entity_view_display.node.event.default - core.entity_view_display.node.page.default - core.entity_view_display.node.post.default @@ -21,7 +44,7 @@ dependencies: - taxonomy.vocabulary.tags module: - block - - block_content_permissions + - block_content - contextual - editoria11y - file @@ -47,6 +70,7 @@ label: 'Platform administrator' weight: 2 is_admin: null permissions: + - 'access block library' - 'access content overview' - 'access contextual links' - 'access files overview' @@ -57,6 +81,8 @@ permissions: - 'access toolbar' - 'access user profiles' - 'access webform overview' + - 'administer block content' + - 'administer block types' - 'administer blocks' - 'administer main menu items' - 'administer redirects' @@ -109,43 +135,66 @@ permissions: - 'create webform block content' - 'create wrapped_image block content' - 'delete any accordion block content' + - 'delete any accordion block content revisions' - 'delete any background_video media' - 'delete any button_link block content' + - 'delete any button_link block content revisions' - 'delete any callout block content' + - 'delete any callout block content revisions' - 'delete any content_spotlight block content' + - 'delete any content_spotlight block content revisions' - 'delete any cta_banner block content' + - 'delete any cta_banner block content revisions' - 'delete any custom_cards block content' + - 'delete any custom_cards block content revisions' - 'delete any divider block content' + - 'delete any divider block content revisions' - 'delete any document media' - 'delete any embed block content' + - 'delete any embed block content revisions' - 'delete any embed media' - 'delete any event content' - 'delete any event_list block content' + - 'delete any event_list block content revisions' - 'delete any gallery block content' + - 'delete any gallery block content revisions' - 'delete any grand_hero block content' + - 'delete any grand_hero block content revisions' - 'delete any image block content' + - 'delete any image block content revisions' - 'delete any image media' - 'delete any media' - 'delete any media_grid block content' + - 'delete any media_grid block content revisions' - 'delete any page content' - 'delete any post content' - 'delete any post_list block content' + - 'delete any post_list block content revisions' - 'delete any profile content' - 'delete any pull_quote block content' + - 'delete any pull_quote block content revisions' - 'delete any quick_links block content' + - 'delete any quick_links block content revisions' - 'delete any tabs block content' + - 'delete any tabs block content revisions' - 'delete any text block content' + - 'delete any text block content revisions' - 'delete any video block content' + - 'delete any video block content revisions' - 'delete any video media' - 'delete any view block content' + - 'delete any view block content revisions' - 'delete any webform block content' + - 'delete any webform block content revisions' - 'delete any webform submission' - 'delete any wrapped_image block content' + - 'delete any wrapped_image block content revisions' - 'delete media' - 'delete own background_video media' - 'delete own document media' - 'delete own embed media' - 'delete own event content' + - 'delete own files' - 'delete own image media' - 'delete own page content' - 'delete own post content' @@ -154,16 +203,39 @@ permissions: - 'delete terms in event_category' - 'delete terms in post_category' - 'delete terms in tags' + - 'edit any accordion block content' - 'edit any background_video media' + - 'edit any button_link block content' + - 'edit any callout block content' + - 'edit any content_spotlight block content' + - 'edit any cta_banner block content' + - 'edit any custom_cards block content' + - 'edit any directory block content' + - 'edit any divider block content' - 'edit any document media' + - 'edit any embed block content' - 'edit any embed media' - 'edit any event content' + - 'edit any event_list block content' + - 'edit any gallery block content' + - 'edit any grand_hero block content' + - 'edit any image block content' - 'edit any image media' + - 'edit any media_grid block content' - 'edit any page content' - 'edit any post content' + - 'edit any post_list block content' - 'edit any profile content' + - 'edit any pull_quote block content' + - 'edit any quick_links block content' + - 'edit any tabs block content' + - 'edit any text block content' + - 'edit any video block content' - 'edit any video media' + - 'edit any view block content' + - 'edit any webform block content' - 'edit any webform submission' + - 'edit any wrapped_image block content' - 'edit own background_video media' - 'edit own document media' - 'edit own embed media' @@ -186,39 +258,63 @@ permissions: - 'publish any content' - 'publish editable content' - 'revert all revisions' + - 'revert any accordion block content revisions' + - 'revert any button_link block content revisions' + - 'revert any callout block content revisions' + - 'revert any content_spotlight block content revisions' + - 'revert any cta_banner block content revisions' + - 'revert any custom_cards block content revisions' + - 'revert any directory block content revisions' + - 'revert any divider block content revisions' + - 'revert any embed block content revisions' + - 'revert any event_list block content revisions' + - 'revert any gallery block content revisions' + - 'revert any grand_hero block content revisions' + - 'revert any image block content revisions' + - 'revert any media_grid block content revisions' + - 'revert any post_list block content revisions' + - 'revert any pull_quote block content revisions' + - 'revert any quick_links block content revisions' + - 'revert any tabs block content revisions' + - 'revert any text block content revisions' + - 'revert any video block content revisions' + - 'revert any view block content revisions' + - 'revert any webform block content revisions' + - 'revert any wrapped_image block content revisions' - 'revert event revisions' - 'revert page revisions' - 'revert post revisions' - 'revert profile revisions' - 'unpublish any content' - 'unpublish editable content' - - 'update any accordion block content' - - 'update any button_link block content' - - 'update any callout block content' - - 'update any content_spotlight block content' - - 'update any cta_banner block content' - - 'update any custom_cards block content' - - 'update any divider block content' - - 'update any embed block content' - - 'update any event_list block content' - - 'update any gallery block content' - - 'update any grand_hero block content' - - 'update any image block content' - 'update any media' - - 'update any media_grid block content' - - 'update any post_list block content' - - 'update any pull_quote block content' - - 'update any quick_links block content' - - 'update any tabs block content' - - 'update any text block content' - - 'update any video block content' - - 'update any view block content' - - 'update any webform block content' - - 'update any wrapped_image block content' - 'update media' - 'view all media revisions' - 'view all revisions' + - 'view any accordion block content history' + - 'view any button_link block content history' + - 'view any callout block content history' + - 'view any content_spotlight block content history' + - 'view any cta_banner block content history' + - 'view any custom_cards block content history' + - 'view any directory block content history' + - 'view any divider block content history' + - 'view any embed block content history' + - 'view any event_list block content history' + - 'view any gallery block content history' + - 'view any grand_hero block content history' + - 'view any image block content history' + - 'view any media_grid block content history' + - 'view any post_list block content history' + - 'view any pull_quote block content history' + - 'view any quick_links block content history' + - 'view any tabs block content history' + - 'view any text block content history' + - 'view any video block content history' + - 'view any view block content history' + - 'view any webform block content history' - 'view any webform submission' + - 'view any wrapped_image block content history' - 'view editoria11y checker' - 'view event revisions' - 'view own unpublished content' diff --git a/web/profiles/custom/yalesites_profile/config/sync/user.role.site_admin.yml b/web/profiles/custom/yalesites_profile/config/sync/user.role.site_admin.yml index 03bea303a4..a1e679fa8b 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/user.role.site_admin.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/user.role.site_admin.yml @@ -3,6 +3,29 @@ langcode: en status: true dependencies: config: + - block_content.type.accordion + - block_content.type.button_link + - block_content.type.callout + - block_content.type.content_spotlight + - block_content.type.cta_banner + - block_content.type.custom_cards + - block_content.type.directory + - block_content.type.divider + - block_content.type.embed + - block_content.type.event_list + - block_content.type.gallery + - block_content.type.grand_hero + - block_content.type.image + - block_content.type.media_grid + - block_content.type.post_list + - block_content.type.pull_quote + - block_content.type.quick_links + - block_content.type.tabs + - block_content.type.text + - block_content.type.video + - block_content.type.view + - block_content.type.webform + - block_content.type.wrapped_image - core.entity_view_display.node.event.default - core.entity_view_display.node.page.default - core.entity_view_display.node.post.default @@ -20,7 +43,7 @@ dependencies: - taxonomy.vocabulary.post_category - taxonomy.vocabulary.tags module: - - block_content_permissions + - block_content - contextual - editoria11y - file @@ -46,6 +69,7 @@ label: 'Site administrator' weight: 3 is_admin: null permissions: + - 'access block library' - 'access content overview' - 'access contextual links' - 'access files overview' @@ -105,43 +129,66 @@ permissions: - 'create webform block content' - 'create wrapped_image block content' - 'delete any accordion block content' + - 'delete any accordion block content revisions' - 'delete any background_video media' - 'delete any button_link block content' + - 'delete any button_link block content revisions' - 'delete any callout block content' + - 'delete any callout block content revisions' - 'delete any content_spotlight block content' + - 'delete any content_spotlight block content revisions' - 'delete any cta_banner block content' + - 'delete any cta_banner block content revisions' - 'delete any custom_cards block content' + - 'delete any custom_cards block content revisions' - 'delete any divider block content' + - 'delete any divider block content revisions' - 'delete any document media' - 'delete any embed block content' + - 'delete any embed block content revisions' - 'delete any embed media' - 'delete any event content' - 'delete any event_list block content' + - 'delete any event_list block content revisions' - 'delete any gallery block content' + - 'delete any gallery block content revisions' - 'delete any grand_hero block content' + - 'delete any grand_hero block content revisions' - 'delete any image block content' + - 'delete any image block content revisions' - 'delete any image media' - 'delete any media' - 'delete any media_grid block content' + - 'delete any media_grid block content revisions' - 'delete any page content' - 'delete any post content' - 'delete any post_list block content' + - 'delete any post_list block content revisions' - 'delete any profile content' - 'delete any pull_quote block content' + - 'delete any pull_quote block content revisions' - 'delete any quick_links block content' + - 'delete any quick_links block content revisions' - 'delete any tabs block content' + - 'delete any tabs block content revisions' - 'delete any text block content' + - 'delete any text block content revisions' - 'delete any video block content' + - 'delete any video block content revisions' - 'delete any video media' - 'delete any view block content' + - 'delete any view block content revisions' - 'delete any webform block content' + - 'delete any webform block content revisions' - 'delete any webform submission' - 'delete any wrapped_image block content' + - 'delete any wrapped_image block content revisions' - 'delete media' - 'delete own background_video media' - 'delete own document media' - 'delete own embed media' - 'delete own event content' + - 'delete own files' - 'delete own image media' - 'delete own page content' - 'delete own post content' @@ -150,16 +197,39 @@ permissions: - 'delete terms in event_category' - 'delete terms in post_category' - 'delete terms in tags' + - 'edit any accordion block content' - 'edit any background_video media' + - 'edit any button_link block content' + - 'edit any callout block content' + - 'edit any content_spotlight block content' + - 'edit any cta_banner block content' + - 'edit any custom_cards block content' + - 'edit any directory block content' + - 'edit any divider block content' - 'edit any document media' + - 'edit any embed block content' - 'edit any embed media' - 'edit any event content' + - 'edit any event_list block content' + - 'edit any gallery block content' + - 'edit any grand_hero block content' + - 'edit any image block content' - 'edit any image media' + - 'edit any media_grid block content' - 'edit any page content' - 'edit any post content' + - 'edit any post_list block content' - 'edit any profile content' + - 'edit any pull_quote block content' + - 'edit any quick_links block content' + - 'edit any tabs block content' + - 'edit any text block content' + - 'edit any video block content' - 'edit any video media' + - 'edit any view block content' + - 'edit any webform block content' - 'edit any webform submission' + - 'edit any wrapped_image block content' - 'edit own background_video media' - 'edit own document media' - 'edit own embed media' @@ -179,39 +249,63 @@ permissions: - 'publish any content' - 'publish editable content' - 'revert all revisions' + - 'revert any accordion block content revisions' + - 'revert any button_link block content revisions' + - 'revert any callout block content revisions' + - 'revert any content_spotlight block content revisions' + - 'revert any cta_banner block content revisions' + - 'revert any custom_cards block content revisions' + - 'revert any directory block content revisions' + - 'revert any divider block content revisions' + - 'revert any embed block content revisions' + - 'revert any event_list block content revisions' + - 'revert any gallery block content revisions' + - 'revert any grand_hero block content revisions' + - 'revert any image block content revisions' + - 'revert any media_grid block content revisions' + - 'revert any post_list block content revisions' + - 'revert any pull_quote block content revisions' + - 'revert any quick_links block content revisions' + - 'revert any tabs block content revisions' + - 'revert any text block content revisions' + - 'revert any video block content revisions' + - 'revert any view block content revisions' + - 'revert any webform block content revisions' + - 'revert any wrapped_image block content revisions' - 'revert event revisions' - 'revert page revisions' - 'revert post revisions' - 'revert profile revisions' - 'unpublish any content' - 'unpublish editable content' - - 'update any accordion block content' - - 'update any button_link block content' - - 'update any callout block content' - - 'update any content_spotlight block content' - - 'update any cta_banner block content' - - 'update any custom_cards block content' - - 'update any divider block content' - - 'update any embed block content' - - 'update any event_list block content' - - 'update any gallery block content' - - 'update any grand_hero block content' - - 'update any image block content' - 'update any media' - - 'update any media_grid block content' - - 'update any post_list block content' - - 'update any pull_quote block content' - - 'update any quick_links block content' - - 'update any tabs block content' - - 'update any text block content' - - 'update any video block content' - - 'update any view block content' - - 'update any webform block content' - - 'update any wrapped_image block content' - 'update media' - 'view all media revisions' - 'view all revisions' + - 'view any accordion block content history' + - 'view any button_link block content history' + - 'view any callout block content history' + - 'view any content_spotlight block content history' + - 'view any cta_banner block content history' + - 'view any custom_cards block content history' + - 'view any directory block content history' + - 'view any divider block content history' + - 'view any embed block content history' + - 'view any event_list block content history' + - 'view any gallery block content history' + - 'view any grand_hero block content history' + - 'view any image block content history' + - 'view any media_grid block content history' + - 'view any post_list block content history' + - 'view any pull_quote block content history' + - 'view any quick_links block content history' + - 'view any tabs block content history' + - 'view any text block content history' + - 'view any video block content history' + - 'view any view block content history' + - 'view any webform block content history' - 'view any webform submission' + - 'view any wrapped_image block content history' - 'view editoria11y checker' - 'view event revisions' - 'view own unpublished content' diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.block_content.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.block_content.yml index cf9fc9ae26..96c0ef6a53 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.block_content.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.block_content.yml @@ -8,7 +8,7 @@ dependencies: _core: default_config_hash: jvd5Pu6jy-lra4oMr-mR7zuY6CVDv9CaNeoj0Y70gV4 id: block_content -label: 'Custom block library' +label: 'Content blocks' module: views description: 'Find and manage custom blocks.' tag: default @@ -209,6 +209,15 @@ display: date_format: short custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 operations: id: operations table: block_content @@ -291,7 +300,7 @@ display: access: type: perm options: - perm: 'administer blocks' + perm: 'access block library' cache: type: tag options: { } @@ -523,14 +532,15 @@ display: position: 1 display_options: display_extenders: { } - path: admin/structure/block/block-content + path: admin/content/block menu: type: tab - title: 'Custom block library' - description: '' + title: Blocks + description: 'Create and edit block content.' weight: 0 + expanded: false menu_name: admin - parent: block.admin_display + parent: system.admin_content context: '0' cache_metadata: max-age: -1 diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.content.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.content.yml index 45dcb2bcfd..1d64abd51e 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.content.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.content.yml @@ -421,6 +421,15 @@ display: date_format: short custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.export_media.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.export_media.yml index 58a2db6ec3..393bcba071 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.export_media.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.export_media.yml @@ -378,6 +378,15 @@ display: date_format: medium custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.export_taxonomy.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.export_taxonomy.yml index b2a935e93e..7ad684f5b3 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.export_taxonomy.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.export_taxonomy.yml @@ -378,6 +378,15 @@ display: date_format: medium custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.files.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.files.yml index 20012bfb88..ee49d5d5cc 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.files.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.files.yml @@ -335,6 +335,15 @@ display: date_format: medium custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 changed: id: changed table: file_managed @@ -391,6 +400,15 @@ display: date_format: medium custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 count: id: count table: file_usage diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.glossary.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.glossary.yml index c4bc774ba2..b5c42a1640 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.glossary.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.glossary.yml @@ -183,6 +183,15 @@ display: date_format: long custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 pager: type: mini options: diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_events.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_events.yml index 5f24d19abf..3df1788022 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_events.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_events.yml @@ -581,6 +581,15 @@ display: date_format: short custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_pages.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_pages.yml index eddf75a3b9..4371b8b030 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_pages.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_pages.yml @@ -401,6 +401,15 @@ display: date_format: short custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_posts.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_posts.yml index 016b6e4d9e..7b68c2edd1 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_posts.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_posts.yml @@ -512,6 +512,15 @@ display: date_format: short custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_profiles.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_profiles.yml index 78b0b3fe6e..83a922c675 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_profiles.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.manage_profiles.yml @@ -523,6 +523,15 @@ display: date_format: medium custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.media.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.media.yml index 388cdd7743..c3a4f5338b 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.media.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.media.yml @@ -378,6 +378,15 @@ display: date_format: short custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.media_library.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.media_library.yml index 868eb2c157..63dea800a4 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.media_library.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.media_library.yml @@ -1224,6 +1224,15 @@ display: date_format: short custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 access: type: perm options: diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.section_library.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.section_library.yml index 861c366974..927e6fc6e7 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.section_library.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.section_library.yml @@ -405,6 +405,15 @@ display: date_format: medium custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true @@ -472,6 +481,15 @@ display: date_format: medium custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.webform_submissions.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.webform_submissions.yml index 74564ac194..f77230524a 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.webform_submissions.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.webform_submissions.yml @@ -216,6 +216,15 @@ display: date_format: medium custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true @@ -979,6 +988,15 @@ display: date_format: medium custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true @@ -1046,6 +1064,15 @@ display: date_format: medium custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true @@ -1901,6 +1928,15 @@ display: date_format: medium custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true @@ -1968,6 +2004,15 @@ display: date_format: medium custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true @@ -2735,6 +2780,15 @@ display: date_format: medium custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true @@ -2802,6 +2856,15 @@ display: date_format: medium custom_date_format: '' timezone: '' + tooltip: + date_format: '' + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 group_column: value group_columns: { } group_rows: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/ys_alert.settings.yml b/web/profiles/custom/yalesites_profile/config/sync/ys_alert.settings.yml index e410f51d8b..911080cd5b 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/ys_alert.settings.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/ys_alert.settings.yml @@ -2,7 +2,7 @@ alert_types: - id: announcement label: Announcement - description: 'Announcement alerts are for sharing information relevant to the current site users'' actions and goals they are seeking to accomplish. This includes planned outages, closures, important deadlines, and COVID-19 info and regulations.' + description: "Announcement alerts are for sharing information relevant to the current site users' actions and goals they are seeking to accomplish. This includes planned outages, closures, important deadlines, and COVID-19 info and regulations." - id: marketing label: Marketing @@ -10,7 +10,7 @@ alert_types: - id: emergency label: Emergency - description: 'Emergency alerts are for sharing information vital to the average user''s current situation. This includes lockdown/safety information, severe weather that requires people to take shelter, or other events with possible detrimental effects on ones safety. Only use this type of alert in the case of an extreme emergency.' + description: "Emergency alerts are for sharing information vital to the average user's current situation. This includes lockdown/safety information, severe weather that requires people to take shelter, or other events with possible detrimental effects on ones safety. Only use this type of alert in the case of an extreme emergency." alert: id: 1660263375 headline: 'Optional banner for displaying an announcement or notice' diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install index 273fc459a8..d577aa06e1 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.install @@ -15,6 +15,7 @@ use Drupal\Component\Utility\Xss; */ function ys_core_update_9001() { $query = \Drupal::entityQuery('block_content') + ->accessCheck(FALSE) ->condition('type', 'quick_links') ->allRevisions(); diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_layouts/src/UpdateExistingNodes.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_layouts/src/UpdateExistingNodes.php index 87f7431757..5490409db5 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_layouts/src/UpdateExistingNodes.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_layouts/src/UpdateExistingNodes.php @@ -61,7 +61,9 @@ public function updateExistingPageMeta() { if ($this->pageMetaSection instanceof Section) { // Find all page nodes to update existing. - $nids = \Drupal::entityQuery('node')->condition('type', 'page')->execute(); + $nids = \Drupal::entityQuery('node') + ->accessCheck(FALSE) + ->condition('type', 'page')->execute(); foreach ($nids as $nid) { $node = Node::load($nid); @@ -117,7 +119,9 @@ public function updateExistingPageMeta() { */ public function updateExistingPageLock() { // Find all page nodes to update existing. - $nids = \Drupal::entityQuery('node')->condition('type', 'page')->execute(); + $nids = \Drupal::entityQuery('node') + ->accessCheck(FALSE) + ->condition('type', 'page')->execute(); foreach ($nids as $nid) { $node = Node::load($nid); @@ -227,7 +231,9 @@ public function updateExistingPostMeta() { if ($this->postMetaSection instanceof Section) { // Find all post nodes to update existing. - $nids = \Drupal::entityQuery('node')->condition('type', 'post')->execute(); + $nids = \Drupal::entityQuery('node') + ->accessCheck(FALSE) + ->condition('type', 'post')->execute(); foreach ($nids as $nid) { $node = Node::load($nid); @@ -295,7 +301,9 @@ public function updateExistingEventMeta() { if ($this->eventMetaSection instanceof Section) { // Find all event nodes to update existing. - $nids = \Drupal::entityQuery('node')->condition('type', 'event')->execute(); + $nids = \Drupal::entityQuery('node') + ->accessCheck(FALSE) + ->condition('type', 'event')->execute(); foreach ($nids as $nid) { $node = Node::load($nid); diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/css/levers.css b/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/css/levers.css index 9a7ab4b480..ac617b99e0 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/css/levers.css +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_themes/css/levers.css @@ -410,3 +410,16 @@ color: var(--darkest-gray); padding: var(--size-spacing-5); } + +/* Drupal 10 fix */ + +#drupal-off-canvas + .ys-themes--global-settings + :is(#drupal-off-canvas-wrapper input[type="radio"]) + + label, +#drupal-off-canvas + .ys-themes--global-settings + :is(#drupal-off-canvas-wrapper input[type="checkbox"]) + + label { + display: block; +} diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/assets/css/views-basic.css b/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/assets/css/views-basic.css index df8999ceda..a6fb5d07cd 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/assets/css/views-basic.css +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/assets/css/views-basic.css @@ -3,15 +3,18 @@ */ /* General styles */ -.views-basic--params { +.views-basic--params, +#drupal-off-canvas-wrapper .views-basic--params { display: none; } -.views-basic--parameter-preview { +.views-basic--parameter-preview, +#drupal-off-canvas-wrapper .views-basic--parameter-preview { margin-top: 1rem; } -.glb-form-type--radio { +.glb-form-type--radio, +#drupal-off-canvas-wrapper .glb-form-type--radio { display: flex; flex-direction: column; width: 100%; @@ -24,6 +27,7 @@ } /* Chosen dropdown selected color contrast fix */ + /* ******************************************* */ .chosen-container .chosen-results { color: var(--gin-color-info); @@ -32,10 +36,12 @@ .chosen-container-multi .chosen-drop .result-selected { color: var(--gin-color-green); } + /* ************ Contrast fix end ************ */ /* visually hide the inputs */ -.layout-builder-configure-block .grouped-items .glb-form-type--radio input { +.layout-builder-configure-block .grouped-items .glb-form-type--radio input, +#drupal-off-canvas-wrapper .layout-builder-configure-block .grouped-items .glb-form-type--radio input { border: 0; clip: rect(0 0 0 0); height: 1px; @@ -47,7 +53,8 @@ } /* base for labels */ -.glb-form-type--radio label.glb-form-item__label.glb-option { +.glb-form-type--radio label.glb-form-item__label.glb-option, +#drupal-off-canvas-wrapper .glb-form-type--radio label.glb-form-item__label.glb-option { display: flex !important; align-items: center; flex-direction: column; @@ -63,251 +70,438 @@ margin-bottom: var(--size-spacing-4); } -.glb-form-type--radio label.glb-form-item__label.glb-option:hover { +.glb-form-type--radio label.glb-form-item__label.glb-option:hover, +#drupal-off-canvas-wrapper .glb-form-type--radio label.glb-form-item__label.glb-option:hover { border-color: var(--darkest-gray); } - /****** /******** Input styles *******/ -/*views-basic--group-user-selection*/ +/* views-basic--group-user-selection */ -#drupal-off-canvas .layout-builder-configure-block { +#drupal-off-canvas-wrapper .layout-builder-configure-block, +#drupal-off-canvas:not(.drupal-off-canvas-reset) + .layout-builder-configure-block { width: 100%; } -.grouped-items .fieldset__wrapper { +.grouped-items .fieldset__wrapper, +#drupal-off-canvas-wrapper .grouped-items .fieldset__wrapper { display: flex; flex-direction: column; } -#drupal-off-canvas .layout-builder-configure-block legend { +#drupal-off-canvas-wrapper .layout-builder-configure-block legend, +#drupal-off-canvas:not(.drupal-off-canvas-reset) + .layout-builder-configure-block + legend { margin-bottom: var(--size-spacing-4); } -#drupal-off-canvas .layout-builder-configure-block .glb-form-item__label { +#drupal-off-canvas-wrapper + .layout-builder-configure-block + .glb-form-item__label, +#drupal-off-canvas:not(.drupal-off-canvas-reset) + .layout-builder-configure-block + .glb-form-item__label { font-size: 1rem !important; } - /* /** in sidebar */ -/*views-basic--group-user-selection*/ -#drupal-off-canvas.ui-dialog-content div.glb-form-item__description { +/* views-basic--group-user-selection */ +#drupal-off-canvas-wrapper.ui-dialog-content div.glb-form-item__description, +#drupal-off-canvas:not(.drupal-off-canvas-reset).ui-dialog-content + div.glb-form-item__description { margin-top: 0.5rem; } -#drupal-off-canvas.ui-dialog-content div.counter { +#drupal-off-canvas-wrapper.ui-dialog-content div.counter, +#drupal-off-canvas:not(.drupal-off-canvas-reset).ui-dialog-content div.counter { margin-top: 1rem; } -#drupal-off-canvas .fieldset, -#drupal-off-canvas .views-basic--group-user-selection .grouped-items { - display: flex; - flex-direction: column; +/* +/** in modal +*/ +#layout-builder-modal .grouped-items, +#drupal-off-canvas-wrapper #layout-builder-modal .grouped-items { width: 100%; } -.grouped-items .glb-form-composite .fieldset__wrapper { - border-top: 0.15rem solid var(--color-gray-500); -} - -.glb-fieldset__legend--composite .glb-fieldset__label { - font-size: 1rem; -} - -#drupal-off-canvas .views-basic--group-user-selection .grouped-items .fieldset--group .fieldset__wrapper--group .glb-form-radios { - display: flex; - flex-wrap: wrap; - justify-content: start; - gap: 0.75rem; -} - -#drupal-off-canvas .views-basic--group-user-selection .grouped-items .fieldset--group .fieldset__wrapper--group .glb-form-radios .glb-form-type--radio { +#layout-builder-modal .grouped-items .glb-form-type--radio, +#drupal-off-canvas-wrapper #layout-builder-modal .grouped-items .glb-form-type--radio { width: auto; } -/* first column */ -#drupal-off-canvas .grouped-items .fieldset--group .fieldset__wrapper--group .glb-form-type--radio label { - width: 110px; - height: 150px; +#drupal-off-canvas-wrapper .fieldset, +#drupal-off-canvas:not(.drupal-off-canvas-reset) .fieldset, +#drupal-off-canvas-wrapper .views-basic--group-user-selection .grouped-items, +#drupal-off-canvas:not(.drupal-off-canvas-reset) + .views-basic--group-user-selection + .grouped-items { + display: flex; + flex-direction: column; + width: 100%; } -/* while other items look great, the term-operators text was getting cut off - * so we need to adjust the label width and height for the term operators - */ -#drupal-off-canvas .grouped-items .fieldset--group .fieldset__wrapper--group .glb-form-type--radio input.term-operator-item + label { - width: 130px !important; - height: 150px !important; +.grouped-items .glb-form-composite .fieldset__wrapper, +#drupal-off-canvas-wrapper .grouped-items .glb-form-composite .fieldset__wrapper { + border-top: 0.15rem solid var(--color-gray-500); } -/* second column */ -#drupal-off-canvas .grouped-items .fieldset--group.views-basic--view-mode .fieldset__wrapper--group .glb-form-type--radio label { - width: 175px; - height: 200px; +.glb-fieldset__legend--composite .glb-fieldset__label, +#drupal-off-canvas-wrapper .glb-fieldset__legend--composite .glb-fieldset__label { + font-size: 1rem; } +/****** +/******** Label and fieldset styles +*******/ /* -/** in modal +/***** I want to show: */ -#layout-builder-modal .grouped-items { - width: 100%; -} -#layout-builder-modal .grouped-items .glb-form-type--radio { - width: auto; +/* Posts */ +.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="post"] + + label, +#drupal-off-canvas-wrapper .form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="post"] + + label { + background-image: url("../icons/content-type-post.svg"); + background-repeat: no-repeat; + background-position: center 4rem; } -/* first column */ -#layout-builder-modal .grouped-items .fieldset--group { - flex: 1 0 52.5%; +/* Events */ +.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="event"] + + label, +#drupal-off-canvas-wrapper .form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="event"] + + label { + background-image: url("../icons/content-type-event.svg"); + background-repeat: no-repeat; + background-position: center 4rem; } -#layout-builder-modal .grouped-items .fieldset--group .fieldset__wrapper--group .glb-form-type--radio label { - width: 125px; - height: 150px; +.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="page"] + + label, +#drupal-off-canvas-wrapper .form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="page"] + + label { + background-image: url("../icons/content-type-page.svg"); + background-repeat: no-repeat; + background-position: center 4rem; } -#layout-builder-modal .grouped-items .fieldset--group .fieldset__wrapper--group .form-boolean-group { - display: flex; - flex-direction: row; - gap: 1rem; - width: 100%; +/* Profiles */ +.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="profile"] + + label, +#drupal-off-canvas-wrapper .form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="profile"] + + label { + background-image: url("../icons/content-type-profile.svg"); + background-repeat: no-repeat; + background-position: center 4rem; } -/* second column */ -#layout-builder-modal .grouped-items #edit-view-mode { - display: flex; - flex: 1 auto; - width: 100%; -} +/* +/***** As: +*/ -#layout-builder-modal .grouped-items #edit-view-mode .fieldset--group { - flex: 1 auto; +/* Card */ +.views-basic--view-mode input[value="card"] + label, +#drupal-off-canvas-wrapper .views-basic--view-mode input[value="card"] + label { + background-image: url("../icons/display-type-card-grid.svg"); + background-repeat: no-repeat; + background-position: center 4rem; } -#layout-builder-modal .grouped-items #edit-view-mode .fieldset--group .fieldset__wrapper--group .glb-form-type--radio label { - width: 170px; - height: 150px; +/* List */ +.views-basic--view-mode input[value="list_item"] + label, +#drupal-off-canvas-wrapper .views-basic--view-mode input[value="list_item"] + label { + background-image: url("../icons/display-type-list-view.svg"); + background-repeat: no-repeat; + background-position: center 4rem; } +/* Condensed */ +.views-basic--view-mode input[value="condensed"] + label, +#drupal-off-canvas-wrapper .views-basic--view-mode input[value="condensed"] + label { + background-image: url("../icons/display-type-condensed.svg"); + background-repeat: no-repeat; + background-position: center 0; + background-size: 150%; +} -/****** -/******** Label and fieldset styles -*******/ +/* Directory */ +.views-basic--view-mode input[value="directory"] + label, +#drupal-off-canvas-wrapper .views-basic--view-mode input[value="directory"] + label { + background-image: url("../icons/display-type-directory.svg"); + background-repeat: no-repeat; + background-position: center 1rem; + background-size: 120%; +} .layout-builder-configure-block .grouped-items fieldset:focus-visible, +#drupal-off-canvas-wrapper .layout-builder-configure-block .grouped-items fieldset:focus-visible, .layout-builder-configure-block .grouped-items fieldset:focus-within, +#drupal-off-canvas-wrapper .layout-builder-configure-block .grouped-items fieldset:focus-within, .layout-builder-configure-block .grouped-items label:focus-visible, -.layout-builder-configure-block .grouped-items input[type="submit"].button--primary:focus { +#drupal-off-canvas-wrapper .layout-builder-configure-block .grouped-items label:focus-visible, +.layout-builder-configure-block + .grouped-items + input[type="submit"].button--primary:focus, +#drupal-off-canvas-wrapper .layout-builder-configure-block + .grouped-items + input[type="submit"].button--primary:focus { outline: var(--size-thickness-2) solid var(--color-link-base); outline-offset: var(--size-thickness-2); } -.layout-builder-configure-block .form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types:hover label, -.layout-builder-configure-block .form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types:focus label, -.layout-builder-configure-block .form-item-settings-block-form-group-user-selection-entity-and-view-mode-view-mode:hover label, -.layout-builder-configure-block .form-item-settings-block-form-group-user-selection-entity-and-view-mode-view-mode:focus label { +.layout-builder-configure-block + .form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types:hover + label, +#drupal-off-canvas-wrapper .layout-builder-configure-block + .form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types:hover + label, +.layout-builder-configure-block + .form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types:focus + label, +#drupal-off-canvas-wrapper .layout-builder-configure-block + .form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types:focus + label, +.layout-builder-configure-block + .form-item-settings-block-form-group-user-selection-entity-and-view-mode-view-mode:hover + label, +#drupal-off-canvas-wrapper .layout-builder-configure-block + .form-item-settings-block-form-group-user-selection-entity-and-view-mode-view-mode:hover + label, +.layout-builder-configure-block + .form-item-settings-block-form-group-user-selection-entity-and-view-mode-view-mode:focus + label, +#drupal-off-canvas-wrapper .layout-builder-configure-block + .form-item-settings-block-form-group-user-selection-entity-and-view-mode-view-mode:focus + label { background-color: var(--dark-theme-gray); border-color: var(--darkest-gray); } -.layout-builder-configure-block .glb-form-type--radio input[checked="checked"] + label, -.layout-builder-configure-block .glb-form-type--radio input[checked="checked"] + label:hover, -.layout-builder-configure-block .glb-form-type--radio:hover input[checked="checked"] + label { +/* Pages */ +.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="page"][checked="checked"] + + label, +#drupal-off-canvas-wrapper .form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="page"][checked="checked"] + + label { background-color: var(--darkest-gray); - color: var(--wool) !important; -} - - -/* -/***** I want to show: -*/ - -/* Posts */ -.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types input[value="post"] + label { - background-image: url('../icons/content-type-post.svg'); - background-repeat: no-repeat; - background-position: center 4rem; + color: var(--wool); } -.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types input[value="post"][checked="checked"] + label { +/* Profiles */ +.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="profile"][checked="checked"] + + label, +#drupal-off-canvas-wrapper .form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="profile"][checked="checked"] + + label { background-color: var(--darkest-gray); color: var(--wool); } - /* Events */ -.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types input[value="event"] + label { - background-image: url('../icons/content-type-event.svg'); - background-repeat: no-repeat; - background-position: center 4rem; +.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="event"][checked="checked"] + + label, +#drupal-off-canvas-wrapper .form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="event"][checked="checked"] + + label { + background-color: var(--darkest-gray); + color: var(--wool); } -.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types input[value="event"][checked="checked"] + label { +.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="post"][checked="checked"] + + label, +#drupal-off-canvas-wrapper .form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types + input[value="post"][checked="checked"] + + label { background-color: var(--darkest-gray); color: var(--wool); } -/* Pages */ -.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types input[value="page"] + label { - background-image: url('../icons/content-type-page.svg'); - background-repeat: no-repeat; - background-position: center 4rem; +#drupal-off-canvas-wrapper + .views-basic--group-user-selection + .grouped-items + .fieldset--group + .fieldset__wrapper--group + .glb-form-radios, +#drupal-off-canvas:not(.drupal-off-canvas-reset) + .views-basic--group-user-selection + .grouped-items + .fieldset--group + .fieldset__wrapper--group + .glb-form-radios { + display: flex; + flex-wrap: wrap; + justify-content: start; + gap: 0.75rem; } -.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types input[value="page"][checked="checked"] + label { +.layout-builder-configure-block + .glb-form-type--radio + input[checked="checked"] + + label, +#drupal-off-canvas-wrapper .layout-builder-configure-block + .glb-form-type--radio + input[checked="checked"] + + label, +.layout-builder-configure-block + .glb-form-type--radio + input[checked="checked"] + + label:hover, +#drupal-off-canvas-wrapper .layout-builder-configure-block + .glb-form-type--radio + input[checked="checked"] + + label:hover, +.layout-builder-configure-block + .glb-form-type--radio:hover + input[checked="checked"] + + label, +#drupal-off-canvas-wrapper .layout-builder-configure-block + .glb-form-type--radio:hover + input[checked="checked"] + + label { background-color: var(--darkest-gray); - color: var(--wool); + color: var(--wool) !important; } -/* Profiles */ -.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types input[value="profile"] + label { - background-image: url('../icons/content-type-profile.svg'); - background-repeat: no-repeat; - background-position: center 4rem; +#drupal-off-canvas-wrapper + .views-basic--group-user-selection + .grouped-items + .fieldset--group + .fieldset__wrapper--group + .glb-form-radios + .glb-form-type--radio, +#drupal-off-canvas:not(.drupal-off-canvas-reset) + .views-basic--group-user-selection + .grouped-items + .fieldset--group + .fieldset__wrapper--group + .glb-form-radios + .glb-form-type--radio { + width: auto; } -.form-item-settings-block-form-group-user-selection-entity-and-view-mode-entity-types input[value="profile"][checked="checked"] + label { - background-color: var(--darkest-gray); - color: var(--wool); +#layout-builder-modal + .grouped-items + .fieldset--group + .fieldset__wrapper--group + .glb-form-type--radio + label { + width: 125px; + height: 150px; } -/* -/***** As: -*/ +/* first column */ +#drupal-off-canvas-wrapper + .grouped-items + .fieldset--group + .fieldset__wrapper--group + .glb-form-type--radio + label, +#drupal-off-canvas:not(.drupal-off-canvas-reset) + .grouped-items + .fieldset--group + .fieldset__wrapper--group + .glb-form-type--radio + label { + width: 110px; + height: 150px; +} -/* Card */ -.views-basic--view-mode input[value="card"] + label { - background-image: url('../icons/display-type-card-grid.svg'); - background-repeat: no-repeat; - background-position: center 4rem; +/* while other items look great, the term-operators text was getting cut off + * so we need to adjust the label width and height for the term operators + */ + +/* second column */ +#drupal-off-canvas-wrapper + .grouped-items + .fieldset--group.views-basic--view-mode + .fieldset__wrapper--group + .glb-form-type--radio + label, +#drupal-off-canvas:not(.drupal-off-canvas-reset) + .grouped-items + .fieldset--group.views-basic--view-mode + .fieldset__wrapper--group + .glb-form-type--radio + label { + width: 175px; + height: 200px; } -/* List */ -.views-basic--view-mode input[value="list_item"] + label { - background-image: url('../icons/display-type-list-view.svg'); - background-repeat: no-repeat; - background-position: center 4rem; +#drupal-off-canvas-wrapper + .grouped-items + .fieldset--group + .fieldset__wrapper--group + .glb-form-type--radio + input.term-operator-item + + label, +#drupal-off-canvas:not(.drupal-off-canvas-reset) + .grouped-items + .fieldset--group + .fieldset__wrapper--group + .glb-form-type--radio + input.term-operator-item + + label { + width: 130px !important; + height: 150px !important; } -/* Condensed */ -.views-basic--view-mode input[value="condensed"] + label { - background-image: url('../icons/display-type-condensed.svg'); - background-repeat: no-repeat; - background-position: center 0; - background-size: 150%; +/* first column */ +#layout-builder-modal .grouped-items .fieldset--group { + flex: 1 0 52.5%; } -/* Directory */ -.views-basic--view-mode input[value="directory"] + label { - background-image: url('../icons/display-type-directory.svg'); - background-repeat: no-repeat; - background-position: center 1rem; - background-size: 120%; +#layout-builder-modal + .grouped-items + .fieldset--group + .fieldset__wrapper--group + .form-boolean-group { + display: flex; + flex-direction: row; + gap: 1rem; + width: 100%; +} + +/* second column */ +#layout-builder-modal .grouped-items #edit-view-mode { + display: flex; + flex: 1 auto; + width: 100%; +} + +#layout-builder-modal .grouped-items #edit-view-mode .fieldset--group { + flex: 1 auto; +} + +#layout-builder-modal + .grouped-items + #edit-view-mode + .fieldset--group + .fieldset__wrapper--group + .glb-form-type--radio + label { + width: 170px; + height: 150px; } diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/src/Plugin/Field/FieldWidget/ViewsBasicDefaultWidget.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/src/Plugin/Field/FieldWidget/ViewsBasicDefaultWidget.php index 0f2605d626..3101d5a2d2 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/src/Plugin/Field/FieldWidget/ViewsBasicDefaultWidget.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/src/Plugin/Field/FieldWidget/ViewsBasicDefaultWidget.php @@ -126,6 +126,7 @@ public function formElement( 'class' => [ 'views-basic--group-user-selection', ], + 'data-drupal-ck-style-fence' => '', ], '#weight' => 10, ]; diff --git a/web/sites/default/services.yml b/web/sites/default/services.yml old mode 100755 new mode 100644 diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index b045c2c12e..90c9aa2f46 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -37,5 +37,16 @@ include $local_settings; } +/** + * If there is a site-specific settings file, then include it + */ +if (isset($_ENV['PANTHEON_SITE_NAME'])) { + $site_settings = __DIR__ . "/settings." . $_ENV['PANTHEON_SITE_NAME'] . ".php"; + + if (file_exists($site_settings)) { + include $site_settings; + } +} + // Set the install profile as the source of site config. $settings['config_sync_directory'] = 'profiles/custom/yalesites_profile/config/sync'; From bdb0fdfe2de6feedc0b86ca6bb8281cd68d3b734 Mon Sep 17 00:00:00 2001 From: Hector Lopez Date: Fri, 17 Nov 2023 12:55:44 -0700 Subject: [PATCH 29/91] feat(YALB-656): enable email matcher in default linkit profile (#485) Co-authored-by: Jim Vomero --- .../config/sync/linkit.linkit_profile.default.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/config/sync/linkit.linkit_profile.default.yml b/web/profiles/custom/yalesites_profile/config/sync/linkit.linkit_profile.default.yml index 7a9e0f0f64..15e660341a 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/linkit.linkit_profile.default.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/linkit.linkit_profile.default.yml @@ -21,7 +21,7 @@ matchers: substitution_type: canonical limit: 100 include_unpublished: false - weight: 0 + weight: -9 9a7ef5fd-456e-45c4-b6be-7b2f60f82084: id: 'entity:file' uuid: 9a7ef5fd-456e-45c4-b6be-7b2f60f82084 @@ -37,4 +37,9 @@ matchers: show_dimensions: false show_thumbnail: false thumbnail_image_style: null - weight: 0 + weight: -8 + 90c3f3be-adc6-4ba4-93cc-24915c7aa69d: + id: email + uuid: 90c3f3be-adc6-4ba4-93cc-24915c7aa69d + settings: { } + weight: -10 From b9e28e9f2179c739d06b3509bc16cbcd57c7e430 Mon Sep 17 00:00:00 2001 From: Joe Tower Date: Fri, 17 Nov 2023 15:51:16 -0600 Subject: [PATCH 30/91] fix(YALB-1578): use full pager on search page * fix(YALB-1578): use full pager on search page * fix(YALB-1625): update display mode for profile ct --------- Co-authored-by: Jim Vomero --- .../yalesites_profile/config/sync/views.view.search.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/profiles/custom/yalesites_profile/config/sync/views.view.search.yml b/web/profiles/custom/yalesites_profile/config/sync/views.view.search.yml index 9827ffc37f..ede11ae221 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/views.view.search.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/views.view.search.yml @@ -97,7 +97,7 @@ display: multi_type: separator multi_separator: ', ' pager: - type: mini + type: full options: offset: 0 items_per_page: 10 @@ -106,6 +106,8 @@ display: tags: next: ›› previous: ‹‹ + first: '« First' + last: 'Last »' expose: items_per_page: false items_per_page_label: 'Items per page' @@ -114,6 +116,7 @@ display: items_per_page_options_all_label: '- All -' offset: false offset_label: Offset + quantity: 9 exposed_form: type: basic options: @@ -207,6 +210,7 @@ display: event: search_result page: search_result post: search_result + profile: search_result query: type: search_api_query options: From 4a0c90a69a8809ebf1104c2fd112a800bb0eea52 Mon Sep 17 00:00:00 2001 From: Hector Lopez Date: Fri, 17 Nov 2023 20:22:00 -0700 Subject: [PATCH 31/91] feat(YALB-1537): install and enable multiple_fields_remove_button module (#486) Co-authored-by: Jim Vomero --- web/profiles/custom/yalesites_profile/composer.json | 1 + .../custom/yalesites_profile/config/sync/core.extension.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/web/profiles/custom/yalesites_profile/composer.json b/web/profiles/custom/yalesites_profile/composer.json index b5de00ad1a..43a1ce1ad6 100644 --- a/web/profiles/custom/yalesites_profile/composer.json +++ b/web/profiles/custom/yalesites_profile/composer.json @@ -62,6 +62,7 @@ "drupal/metatag": "2.0.0", "drupal/migrate_plus": "6.0.1", "drupal/migrate_tools": "6.0.2", + "drupal/multiple_fields_remove_button": "^2.2", "drupal/multivalue_form_element": "1.0-beta6", "drupal/node_revision_delete": "2.0.0-alpha2", "drupal/override_node_options": "2.7", diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.extension.yml b/web/profiles/custom/yalesites_profile/config/sync/core.extension.yml index 8f51697110..530f1042f0 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.extension.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.extension.yml @@ -84,6 +84,7 @@ module: migrate: 0 migrate_plus: 0 migrate_tools: 0 + multiple_fields_remove_button: 0 multivalue_form_element: 0 mysql: 0 node: 0 From 5193ce7e9e9de44b0bf18ffdb270fa707c8e759e Mon Sep 17 00:00:00 2001 From: Jim Vomero Date: Mon, 20 Nov 2023 13:28:41 -0500 Subject: [PATCH 32/91] fix (YALB-1584): update dashboard content (#488) --- .../YaleSitesDashboardResourcesBlock.php | 27 ------ .../Block/YaleSitesSupportFormBlock.php | 83 ------------------- .../ys-dashboard-resources.html.twig | 2 - .../ys_core/templates/ys-dashboard.html.twig | 29 +++++++ .../templates/ys-social-links.html.twig | 17 ---- .../templates/ys-support-form.html.twig | 6 -- .../modules/custom/ys_core/ys_core.module | 8 -- .../ys/ys-dashboard-resources.html.twig | 18 ---- .../templates/ys/ys-dashboard.html.twig | 6 -- 9 files changed, 29 insertions(+), 167 deletions(-) delete mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Plugin/Block/YaleSitesDashboardResourcesBlock.php delete mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Plugin/Block/YaleSitesSupportFormBlock.php delete mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-dashboard-resources.html.twig delete mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-social-links.html.twig delete mode 100644 web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-support-form.html.twig delete mode 100644 web/themes/custom/ys_admin_theme/templates/ys/ys-dashboard-resources.html.twig delete mode 100644 web/themes/custom/ys_admin_theme/templates/ys/ys-dashboard.html.twig diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Plugin/Block/YaleSitesDashboardResourcesBlock.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Plugin/Block/YaleSitesDashboardResourcesBlock.php deleted file mode 100644 index 24cadc873e..0000000000 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Plugin/Block/YaleSitesDashboardResourcesBlock.php +++ /dev/null @@ -1,27 +0,0 @@ - 'ys_dashboard_resources', - ]; - } - -} diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Plugin/Block/YaleSitesSupportFormBlock.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Plugin/Block/YaleSitesSupportFormBlock.php deleted file mode 100644 index dade0e5ba7..0000000000 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Plugin/Block/YaleSitesSupportFormBlock.php +++ /dev/null @@ -1,83 +0,0 @@ -get('config.factory'), - $container->get('request_stack'), - $container->get('current_user'), - ); - } - - /** - * {@inheritdoc} - */ - public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, RequestStack $request_stack, AccountInterface $account) { - parent::__construct($configuration, $plugin_id, $plugin_definition); - $this->siteSettings = $config_factory->get('system.site'); - $this->request = $request_stack->getCurrentRequest(); - $this->account = $account; - } - - /** - * {@inheritdoc} - */ - public function build() { - $userAgent = $_SERVER['HTTP_USER_AGENT']; - $siteURL = $this->request->getSchemeAndHttpHost(); - $siteName = $this->siteSettings->get('name'); - $currentUserName = $this->account->getAccountName(); - $currentUserRoles = implode(", ", $this->account->getRoles()); - return [ - '#theme' => 'ys_support_form', - '#link' => "https://yale.service-now.com/it?id=incident_form&prefill_u_business_service=e9688dcd6fbb31007ee2abcf9f3ee40c&prefill_u_category=b74b15c16ffb31007ee2abcf9f3ee4b3&prefill_short_description=Yalesites%20Service%20Request:%20{$siteURL}&prefill_description=Please%20enter%20your%20support%20request%20here:%0d%0d%0d%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0dDiagnostic%20info%20(do%20not%20edit%20this%20section)%0dSite Name:%20{$siteName}%0dUser Name:%20{$currentUserName}%0dUser Roles:%20{$currentUserRoles}%0dUser-agent:%20{$userAgent}%0d%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D", - ]; - } - -} diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-dashboard-resources.html.twig b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-dashboard-resources.html.twig deleted file mode 100644 index a59725ee42..0000000000 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-dashboard-resources.html.twig +++ /dev/null @@ -1,2 +0,0 @@ -

Resources

-A resource to help you create useful, usable websites. diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-dashboard.html.twig b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-dashboard.html.twig index a4f1f32a1b..7d012a6910 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-dashboard.html.twig +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-dashboard.html.twig @@ -1,3 +1,32 @@
Welcome to the YaleSites dashboard. + {{ drupal_view('content', 'block_1') }} +

Resources

+
+ +

Report Feedback or a Bug

+ + yalesitesupgradeprogram@yale.edu +
diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-social-links.html.twig b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-social-links.html.twig deleted file mode 100644 index b928583d93..0000000000 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-social-links.html.twig +++ /dev/null @@ -1,17 +0,0 @@ -{# - # Available Variables: - # - icons (array) - # - url: url the icon links to - # - name: Visually hidden text (for screen readers) - # - icon: the actual image - #} - - diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-support-form.html.twig b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-support-form.html.twig deleted file mode 100644 index 3b5c16152b..0000000000 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/templates/ys-support-form.html.twig +++ /dev/null @@ -1,6 +0,0 @@ -{# - # Available Variables: - # - link (string) - #} - -Start a Support Request diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module index 5c62009014..cc975505a2 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module @@ -30,17 +30,9 @@ function ys_core_theme($existing, $type, $theme, $path): array { 'items' => [], ], ], - 'ys_support_form' => [ - 'variables' => [ - 'link' => NULL, - ], - ], 'ys_dashboard' => [ 'variables' => [], ], - 'ys_dashboard_resources' => [ - 'variables' => [], - ], 'ys_social_links' => [ 'variables' => [ 'icons' => [], diff --git a/web/themes/custom/ys_admin_theme/templates/ys/ys-dashboard-resources.html.twig b/web/themes/custom/ys_admin_theme/templates/ys/ys-dashboard-resources.html.twig deleted file mode 100644 index 904eaa59f5..0000000000 --- a/web/themes/custom/ys_admin_theme/templates/ys/ys-dashboard-resources.html.twig +++ /dev/null @@ -1,18 +0,0 @@ -

Resources

- - diff --git a/web/themes/custom/ys_admin_theme/templates/ys/ys-dashboard.html.twig b/web/themes/custom/ys_admin_theme/templates/ys/ys-dashboard.html.twig deleted file mode 100644 index c2460ac46f..0000000000 --- a/web/themes/custom/ys_admin_theme/templates/ys/ys-dashboard.html.twig +++ /dev/null @@ -1,6 +0,0 @@ -
- Welcome to the YaleSites dashboard. - {{ drupal_view('content', 'block_1') }} - {{ drupal_block('dashboard_resources_block') }} - {{ drupal_block('support_form_block') }} -
From c7e9906d193b2be587da3fc4e57977d3d79b0849 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Mon, 20 Nov 2023 16:34:47 -0800 Subject: [PATCH 33/91] feat(YALB-1574): Update alt text for header settings icons --- .../custom/ys_core/src/Form/HeaderSettingsForm.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php index 6124d632f7..b49ff11525 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/HeaderSettingsForm.php @@ -105,7 +105,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#options' => [ 'basic' => $this->t('Basic Nav') . 'Basic header icon showing a site title and a simplified navigation.', 'mega' => $this->t('Mega Nav') . 'Mega header icon showing a site title and a flyout style mega menu.', - 'focus' => $this->t('Focus Nav') . 'TKTKTK', + 'focus' => $this->t('Focus Nav') . 'Focus header icon showing single level navigation and simplified header.', ], '#title' => $this->t('Header variation'), '#default_value' => ($headerConfig->get('header_variation')) ? $headerConfig->get('header_variation') : 'basic', @@ -228,9 +228,9 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form['nav_position_container']['nav_position'] = [ '#type' => 'radios', '#options' => [ - 'left' => $this->t('Left') . 'Basic header icon showing a site title and a simplified navigation.', - 'center' => $this->t('Center') . 'Mega header icon showing a site title and a flyout style mega menu.', - 'right' => $this->t('Right') . 'TKTKTK', + 'left' => $this->t('Left') . 'Icon showing a left aligned main navigation menu and left aligned site title above the navigation.', + 'center' => $this->t('Center') . 'Icon showing a center aligned main navigation menu and centered site title above the navigation.', + 'right' => $this->t('Right') . 'Icon showing a right aligned main navigation menu and left aligned site title on the same level as the main navigation.', ], '#title' => $this->t('Navigation Position'), '#description' => $this->t('Justifies the menu to the left, center, or right.'), From 22b1ddbcfb42f4962483ba2a0f5336d413c372f3 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Tue, 21 Nov 2023 10:29:24 -0800 Subject: [PATCH 34/91] fix(YALB-1574): Fix linkit new id key --- .../modules/custom/ys_alert/src/Form/AlertSettings.php | 2 +- .../custom/ys_core/src/Form/FooterSettingsForm.php | 8 ++++---- .../modules/custom/ys_core/src/Form/SiteSettingsForm.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/src/Form/AlertSettings.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/src/Form/AlertSettings.php index 0a964ef99b..2c2c654a10 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/src/Form/AlertSettings.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/src/Form/AlertSettings.php @@ -185,7 +185,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#autocomplete_route_name' => 'linkit.autocomplete', '#default_value' => $config->get('alert.link_url'), '#autocomplete_route_parameters' => [ - 'linkit_profile' => 'default', + 'linkit_profile_id' => 'default', ], ]; diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/FooterSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/FooterSettingsForm.php index 741b95edfd..8e0027aadf 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/FooterSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/FooterSettingsForm.php @@ -171,7 +171,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#description' => $this->t('Type the URL or autocomplete for internal paths.'), '#autocomplete_route_name' => 'linkit.autocomplete', '#autocomplete_route_parameters' => [ - 'linkit_profile' => 'default', + 'linkit_profile_id' => 'default', ], ], @@ -201,7 +201,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#description' => $this->t('Type the URL or autocomplete for internal paths.'), '#autocomplete_route_name' => 'linkit.autocomplete', '#autocomplete_route_parameters' => [ - 'linkit_profile' => 'default', + 'linkit_profile_id' => 'default', ], '#default_value' => ($footerConfig->get('content.school_logo_url')) ? $footerConfig->get('content.school_logo_url') : '/', ]; @@ -237,7 +237,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#description' => $this->t('Type the URL or autocomplete for internal paths.'), '#autocomplete_route_name' => 'linkit.autocomplete', '#autocomplete_route_parameters' => [ - 'linkit_profile' => 'default', + 'linkit_profile_id' => 'default', ], ], 'link_title' => [ @@ -257,7 +257,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#description' => $this->t('Type the URL or autocomplete for internal paths.'), '#autocomplete_route_name' => 'linkit.autocomplete', '#autocomplete_route_parameters' => [ - 'linkit_profile' => 'default', + 'linkit_profile_id' => 'default', ], ], 'link_title' => [ diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php index 247f28acad..0e57b2e3bb 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php @@ -137,7 +137,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#default_value' => $siteConfig->get('page')['front'], '#required' => TRUE, '#autocomplete_route_parameters' => [ - 'linkit_profile' => 'default', + 'linkit_profile_id' => 'default', ], ]; From 6b344c520361c619ccd4971ecd2bf8cf1f3e5b17 Mon Sep 17 00:00:00 2001 From: David Blankenship <128765777+dblanken-yale@users.noreply.github.com> Date: Wed, 22 Nov 2023 08:39:36 -0500 Subject: [PATCH 35/91] YALB-1574: Branding: Header Variation Backend Front Page Alias Fix (#491) * fix(YALB-1574): front page alias shows header This attempts to fix a bug that was found with the header implementation. isFrontPage does not seem to take into account aliases. We get around this by getting the node id of the page, the alias of the page, and the current front page that is set in site settings. We then determine if it is the front page if the location set in the site settings matches either the node id path or the alias path, or if isFrontPage thinks it's a front page. References: https://www.drupal.org/project/drupal/issues/1503146 --- .../modules/custom/ys_core/ys_core.module | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module index dd0a380fee..35974787b8 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.module @@ -155,7 +155,14 @@ function ys_core_preprocess_region(&$variables) { 'alt' => $focusHeaderImageMedia->get('field_media_image')->first()->get('alt')->getValue(), ], ]; - $variables['site_header__background_image'] = (\Drupal::service('path.matcher')->isFrontPage()) ? $focusHeaderImageRender : FALSE; + + $path = \Drupal::service('path.current')->getPath(); + $alias = \Drupal::service('path_alias.manager')->getAliasByPath($path); + $frontPage = \Drupal::config('system.site')->get('page.front'); + + // See if the path is the front page. + $isFrontPage = ($alias == $frontPage || $path == $frontPage || \Drupal::service('path.matcher')->isFrontPage()); + $variables['site_header__background_image'] = $isFrontPage ? $focusHeaderImageRender : FALSE; } } From e5b22743d1e84504ff7f624bd85330ee88549c90 Mon Sep 17 00:00:00 2001 From: Hector Lopez Date: Wed, 22 Nov 2023 16:54:57 -0700 Subject: [PATCH 36/91] feat(YALB-1169): enable the anchor_links module and add the anchor_links library --- composer.json | 13 +++++++++++++ web/profiles/custom/yalesites_profile/composer.json | 1 + 2 files changed, 14 insertions(+) diff --git a/composer.json b/composer.json index 635bbee003..814ef99738 100644 --- a/composer.json +++ b/composer.json @@ -10,6 +10,18 @@ "drupal": { "type": "composer", "url": "https://packages.drupal.org/8" + }, + "ckeditor5-anchor-drupal": { + "type": "package", + "package": { + "name": "northernco/ckeditor5-anchor-drupal", + "version": "0.3.0", + "type": "drupal-library", + "dist": { + "url": "https://registry.npmjs.org/@northernco/ckeditor5-anchor-drupal/-/ckeditor5-anchor-drupal-0.3.0.tgz", + "type": "tar" + } + } } }, "require": { @@ -20,6 +32,7 @@ "drupal/core-recommended": "^10", "drush/drush": "^11 || ^12", "oomphinc/composer-installers-extender": "^2.0", + "northernco/ckeditor5-anchor-drupal": "^0.3.0", "pantheon-systems/drupal-integrations": "^10", "yalesites-org/yalesites_profile": "*" }, diff --git a/web/profiles/custom/yalesites_profile/composer.json b/web/profiles/custom/yalesites_profile/composer.json index 66416813e8..499de307ec 100644 --- a/web/profiles/custom/yalesites_profile/composer.json +++ b/web/profiles/custom/yalesites_profile/composer.json @@ -11,6 +11,7 @@ "drupal/address": "1.12", "drupal/admin_toolbar": "3.4.1", "drupal/allowed_formats": "3.0", + "drupal/anchor_link": "3.0.x-dev@dev", "drupal/auto_entitylabel": "3.0", "drupal/autosave_form": "1.4", "drupal/better_exposed_filters": "6.0.3", From c3a6cb98d5d115643ede8899d7dc53387b6b78f7 Mon Sep 17 00:00:00 2001 From: Hector Lopez Date: Mon, 27 Nov 2023 09:08:41 -0700 Subject: [PATCH 37/91] feat(YALB-1169): enable anchor links in the basic and restricted text formats --- .../yalesites_profile/config/sync/core.extension.yml | 1 + .../config/sync/editor.editor.basic_html.yml | 2 ++ .../config/sync/editor.editor.restricted_html.yml | 1 + .../config/sync/filter.format.basic_html.yml | 10 +++++----- .../config/sync/filter.format.restricted_html.yml | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/config/sync/core.extension.yml b/web/profiles/custom/yalesites_profile/config/sync/core.extension.yml index 530f1042f0..dd1116e372 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/core.extension.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/core.extension.yml @@ -6,6 +6,7 @@ module: admin_toolbar: 0 admin_toolbar_tools: 0 allowed_formats: 0 + anchor_link: 0 auto_entitylabel: 0 better_exposed_filters: 0 block: 0 diff --git a/web/profiles/custom/yalesites_profile/config/sync/editor.editor.basic_html.yml b/web/profiles/custom/yalesites_profile/config/sync/editor.editor.basic_html.yml index 5716f12005..60efd65bcd 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/editor.editor.basic_html.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/editor.editor.basic_html.yml @@ -18,6 +18,8 @@ settings: - '|' - link - '|' + - anchor + - '|' - bulletedList - numberedList - outdent diff --git a/web/profiles/custom/yalesites_profile/config/sync/editor.editor.restricted_html.yml b/web/profiles/custom/yalesites_profile/config/sync/editor.editor.restricted_html.yml index 1626e54fcf..a33d588afa 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/editor.editor.restricted_html.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/editor.editor.restricted_html.yml @@ -15,6 +15,7 @@ settings: - italic - '|' - link + - anchor plugins: linkit_extension: linkit_enabled: true diff --git a/web/profiles/custom/yalesites_profile/config/sync/filter.format.basic_html.yml b/web/profiles/custom/yalesites_profile/config/sync/filter.format.basic_html.yml index 33b90851c4..bd02ed8b5e 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/filter.format.basic_html.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/filter.format.basic_html.yml @@ -17,7 +17,7 @@ filters: status: true weight: -10 settings: - allowed_html: '