Skip to content

Commit

Permalink
Merge branch 'YALB-sept-release-fixes' into YALB-email-copy-change-to…
Browse files Browse the repository at this point in the history
…-button
  • Loading branch information
joetower authored Sep 20, 2023
2 parents f4ed686 + 277564f commit 3019517
Show file tree
Hide file tree
Showing 13 changed files with 72 additions and 11 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ _Notes:_
- `confim` Imports the current config files to your database.
- `local:theme-link` Run this script once to establish `npm link`s to all of the frontend-related repositories.
- `local:cl-dev` Enables a frontend developer to work across all of the repositories (`yalesites-project`, `atomic`, and `component-library-twig`) in an environment configured to support both Storybook development, and have the changes reflected in the Drupal instance. Note: This also wires up the Tokens repo, but if you want to watch for changes there, you'll have to run the `npm run develop` script inside the Tokens directory.
.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ field_name: field_menu_top_level_link_cta
entity_type: menu_link_content
bundle: main
label: 'Mega Menu Top Level Link Text'
description: 'Mega Menu level one links display this link text alongside the Menu link title. If empty, defaults to "Explore all".'
description: 'Mega Menu level one links display this link text alongside the Menu link title. If empty, defaults to "Explore [Menu Item Title]".'
required: false
translatable: false
default_value: { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ third_party_settings:
external: ''
name: Affiliation
vid: affiliation
description: ''
description: 'A vocabulary used to classify a profile based on their affiliation with Yale, such as "Staff", "Faculty", "Student", etc." for affiliation description.'
weight: 0
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
background-color: #6f6f6f !important;
}

.ys-core-footer-settings-form .form-element {
width: 100%;
}

.ys-core-footer-settings-form .preview-icon {
width: 190px;
height: 137px;
}

.ys-core-footer-settings-form .claro-details.form-disabled {
pointer-events: none;
user-select: none;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$form['footer_variation'] = [
'#type' => 'radios',
'#options' => [
'basic' => $this->t('Basic') . '<img src="/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/footer-basic.svg" alt="Basic footer icon showing a small Yale logo, and gray placeholders for copyright and social media icons.">',
'mega' => $this->t('Mega') . '<img src="/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/footer-mega.svg" alt="Mega footer icon with gray placeholders for more information than the basic footer.">',
'basic' => $this->t('Basic') . '<img src="/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/footer-basic.svg" class="preview-icon" alt="Basic footer icon showing a small Yale logo, and gray placeholders for copyright and social media icons.">',
'mega' => $this->t('Mega') . '<img src="/profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/footer-mega-2.svg" class="preview-icon" alt="Mega footer icon with gray placeholders for more information than the basic footer.">',
],
'#title' => $this->t('Footer variation'),
'#default_value' => ($footerConfig->get('footer_variation')) ? $footerConfig->get('footer_variation') : 'basic',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function ys_core_preprocess_menu(&$variables) {
$clonedMenuItem['list__item__is_heading'] = TRUE;

// Get the CTA text from menu item extras field.
$clonedMenuItem['heading_cta'] = $clonedMenuItem['entity']->get('field_menu_top_level_link_cta')->value ?: t('Explore all');
$clonedMenuItem['heading_cta'] = $clonedMenuItem['entity']->get('field_menu_top_level_link_cta')->value ?: t('Explore @title', ['@title' => $clonedMenuItem['title']]);

// Add cloned item to the beginning of the menu.
array_unshift($menuItem['below'], $clonedMenuItem);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* Install, update and uninstall functions for the module.
*/

use Drupal\migrate\MigrateExecutable;
use Drupal\migrate\MigrateMessage;

/**
* Implements hook_uninstall().
*/
Expand All @@ -24,3 +27,15 @@ function ys_starterkit_uninstall() {

}
}

/**
* Implements hook_update().
*/
function ys_starterkit_update_9001() {
// Adds starter taxonomy terms.
if (!\Drupal::service('config.installer')->isSyncing()) {
$migration = \Drupal::service('plugin.manager.migration')->createInstance('ys_terms');
$executable = new MigrateExecutable($migration, new MigrateMessage());
$executable->import();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ behind the a.toolbar-icon element. */
z-index: -1;
}

/* Push down the body when secondary menu is present */
.gin--horizontal-toolbar.toolbar-horizontal.toolbar-fixed {
padding-top: calc(var(--gin-toolbar-secondary-height) + var(--gin-toolbar-y-offset)) !important;
}

/* Update toolbar icons */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,20 @@ public function getView($type, $params) {
// Set operator: "+" is "OR" and "," is "AND".
$operator = $paramsDecoded['operator'] ?? '+';

// Fix for older setting terms for nodes not saved with the new storage.
if (isset($termsIncludeArray[0]) && is_array($termsIncludeArray[0])) {
foreach ($termsIncludeArray as $terms) {
$termsIncludeArrayFixed[] = $terms['target_id'];
}
$termsIncludeArray = $termsIncludeArrayFixed;
}
if (isset($termsExcludeArray[0]) && is_array($termsExcludeArray[0])) {
foreach ($termsExcludeArray as $terms) {
$termsExcludeArrayFixed[] = $terms['target_id'];
}
$termsExcludeArray = $termsExcludeArrayFixed;
}
// End fix.
$termsInclude = (count($termsIncludeArray) != 0) ? implode($operator, $termsIncludeArray) : 'all';
$termsExclude = (count($termsExcludeArray) != 0) ? implode($operator, $termsExcludeArray) : NULL;

Expand Down
9 changes: 5 additions & 4 deletions web/themes/custom/ys_admin_theme/css/gin-custom.css

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

2 changes: 1 addition & 1 deletion web/themes/custom/ys_admin_theme/css/gin-custom.css.map

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

5 changes: 5 additions & 0 deletions web/themes/custom/ys_admin_theme/scss/gin-custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -439,4 +439,9 @@
background-color: var(--darkest-gray);
}

/* MaxLength */
.gin--dark-mode .error strong {
color: var(--wool);
}

/* stylelint-enable */

0 comments on commit 3019517

Please sign in to comment.