Skip to content

Commit

Permalink
Dp 19120 global nav drupal changes (#392)
Browse files Browse the repository at this point in the history
* DP-19120: header navigation changes

* Template changes

* Adding changelog

* Adding default conf

* phpcs issue fix

* adjust theming templates for additional changes done in Mayflower

* DP-19328 Hamburgermenu for binder page (#406)

* update the <head> content generation logic in /themes/custom/mass_theme/templates/layout/page--node--without-main.html.twig for binder page

* add changelog for DP-19328

* remove commented out code

* update the menu label change in Mayflower

* match MF change in theming

* DP-19876: Contextual login links are missing in branch with new global nav (#468)

* DP-19876: Contextual links fix

* DP-19876: Added changelog

Co-authored-by: Tom Fleming <tom@lastcallmedia.com>

* DP-20203 Missing alert overlay in info details page (#490)

* add alert overlay container to page--node--without-main.html.twig

* add changelog for DP-20203

* Added back header_mixed_urls setting - DP-19120

* Resolve DP-19120 merge conflicts (#492)

* config change and changelog (#479)

* DP 20094 help text change for data resource type field (#480)

* help text changes

* changelog

* simple text change to trigger rebuild

* changelog update and remove old changelog files

* Add data fields to service_page (#474)

* Add data fields to service_page

* Use related terms

* Add support for service_page in mass_related_terms token.

* add field to be used for description

* conditional logic and form layout changes

* Fix coding standards.

Co-authored-by: Joe Galluccio <joseph.galluccio@state.ma.us>

* Remove balancer in Terraform (#481)

* Remove balancer IP address.

* Add changelog

* try uppercase

* Declare the variable again. Add logging

* Remove super verbose logging.

* Upper

* Dp 20172 promo button text size (#486)

* config changes

* changelog

* Add changelog (#485)

* DP-19747 - Reduce log noise (#484)

* Remove debug loggings.

* Add changelog

* CS

* Fix doc comment.

* bool

* Update basic iframe URL so that node ID is correctly passed to Supers… (#483)

* Update basic iframe URL so that node ID is correctly passed to Superset filter.

* changelog.

* fixing syntax on changelog

Co-authored-by: joeg8612 <joseph.galluccio@state.ma.us>

* DP-19787: Fix the needs attention views (#476)

* DP-19787: Fix the needs attention views

The calls to superset were calling a non-existant old view.
In addition, the superset API has changed and this decreases
the batch size from 1000 to 500 to eliminate timeouts.

* DP-19787: Add changelog

* DP-19787: Increase the cron timeout for superset queue items

* DP-19787: Restart mass_superset queue

* Added changelog - DP-19120

Co-authored-by: joeg8612 <joseph.galluccio@state.ma.us>
Co-authored-by: CircleCI Deployment Bot <circleci@example.com>
Co-authored-by: Moshe Weitzman <weitzman@tejasa.com>
Co-authored-by: Yukiko Gannett <yukikogannett@gmail.com>
Co-authored-by: adamcogbill <33554893+adamcogbill@users.noreply.github.com>
Co-authored-by: Robert Stephens <roberttstephens@gmail.com>

Co-authored-by: Yukiko Gannett <yukikogannett@gmail.com>
Co-authored-by: Tom Fleming <tom@lastcallmedia.com>
Co-authored-by: joeg8612 <joseph.galluccio@state.ma.us>
Co-authored-by: CircleCI Deployment Bot <circleci@example.com>
Co-authored-by: Moshe Weitzman <weitzman@tejasa.com>
Co-authored-by: adamcogbill <33554893+adamcogbill@users.noreply.github.com>
Co-authored-by: Robert Stephens <roberttstephens@gmail.com>
  • Loading branch information
8 people committed Oct 20, 2020
1 parent 70e80a6 commit 1aab315
Show file tree
Hide file tree
Showing 25 changed files with 707 additions and 43 deletions.
44 changes: 44 additions & 0 deletions changelogs/DP-19120.yml
@@ -0,0 +1,44 @@
#
# Write your changelog entry here. Every pull request must have a changelog yml file.
#
# Change types:
# #############################################################################
# You can use one of the following types:
# - Added: For new features.
# - Changed: For changes to existing functionality.
# - Deprecated: For soon-to-be removed features.
# - Removed: For removed features.
# - Fixed: For any bug fixes.
# - Security: In case of vulnerabilities.
#
# Format
# #############################################################################
# The format is crucial. Please follow the examples below. For reference, the requirements are:
# - All 3 parts are required and you must include "Type", "description" and "issue".
# - "Type" must be left aligned and followed by a colon.
# - "description" must be indented with 2 spaces followed by a colon
# - "issue" must be indented with 4 spaces followed by a colon.
# - "issue" is for the Jira ticket number only e.g. DP-1234
# - No extra spaces, indents, or blank lines are allowed.
#
# Example:
# #############################################################################
# Fixed:
# - description: Fixes scrolling on edit pages in Safari.
# issue: DP-13314
#
# You may add more than 1 description & issue for each type using the following format:
# Changed:
# - description: Automating the release branch.
# issue: DP-10166
# - description: Second change item that needs a description.
# issue: DP-19875
# - description: Third change item that needs a description along with an issue.
# issue: DP-19843
#
Added:
- description: Adding new hamburger navigation header and ability to choose between hamburger and mixed version headers.
issue: DP-19120
Fixed:
- description: Resolved merge conflicts
issue: DP-19120
41 changes: 41 additions & 0 deletions changelogs/DP-19328.yml
@@ -0,0 +1,41 @@
#
# Write your changelog entry here. Every pull request must have a changelog yml file.
#
# Change types:
# #############################################################################
# You can use one of the following types:
# - Added: For new features.
# - Changed: For changes to existing functionality.
# - Deprecated: For soon-to-be removed features.
# - Removed: For removed features.
# - Fixed: For any bug fixes.
# - Security: In case of vulnerabilities.
#
# Format
# #############################################################################
# The format is crucial. Please follow the examples below. For reference, the requirements are:
# - All 3 parts are required and you must include "Type", "description" and "issue".
# - "Type" must be left aligned and followed by a colon.
# - "description" must be indented with 2 spaces followed by a colon
# - "issue" must be indented with 4 spaces followed by a colon.
# - "issue" is for the Jira ticket number only e.g. DP-1234
# - No extra spaces, indents, or blank lines are allowed.
#
# Example:
# #############################################################################
# Fixed:
# - description: Fixes scrolling on edit pages in Safari.
# issue: DP-13314
#
# You may add more than 1 description & issue for each type using the following format:
# Changed:
# - description: Automating the release branch.
# issue: DP-10166
# - description: Second change item that needs a description.
# issue: DP-19875
# - description: Third change item that needs a description along with an issue.
# issue: DP-19843
#
Changed:
- description: Update the <head> content generation logic in /themes/custom/mass_theme/templates/layout/page--node--without-main.html.twig for binder page.
issue: DP-19328
41 changes: 41 additions & 0 deletions changelogs/DP-19876.yml
@@ -0,0 +1,41 @@
#
# Write your changelog entry here. Every pull request must have a changelog yml file.
#
# Change types:
# #############################################################################
# You can use one of the following types:
# - Added: For new features.
# - Changed: For changes to existing functionality.
# - Deprecated: For soon-to-be removed features.
# - Removed: For removed features.
# - Fixed: For any bug fixes.
# - Security: In case of vulnerabilities.
#
# Format
# #############################################################################
# The format is crucial. Please follow the examples below. For reference, the requirements are:
# - All 3 parts are required and you must include "Type", "description" and "issue".
# - "Type" must be left aligned and followed by a colon.
# - "description" must be indented with 2 spaces followed by a colon
# - "issue" must be indented with 4 spaces followed by a colon.
# - "issue" is for the Jira ticket number only e.g. DP-1234
# - No extra spaces, indents, or blank lines are allowed.
#
# Example:
# #############################################################################
# Fixed:
# - description: Fixes scrolling on edit pages in Safari.
# issue: DP-13314
#
# You may add more than 1 description & issue for each type using the following format:
# Changed:
# - description: Automating the release branch.
# issue: DP-10166
# - description: Second change item that needs a description.
# issue: DP-19875
# - description: Third change item that needs a description along with an issue.
# issue: DP-19843
#
Fixed:
- description: Contextual menu class selector modified to reflect new navigation structure.
issue: DP-19876
41 changes: 41 additions & 0 deletions changelogs/DP-20203.yml
@@ -0,0 +1,41 @@
#
# Write your changelog entry here. Every pull request must have a changelog yml file.
#
# Change types:
# #############################################################################
# You can use one of the following types:
# - Added: For new features.
# - Changed: For changes to existing functionality.
# - Deprecated: For soon-to-be removed features.
# - Removed: For removed features.
# - Fixed: For any bug fixes.
# - Security: In case of vulnerabilities.
#
# Format
# #############################################################################
# The format is crucial. Please follow the examples below. For reference, the requirements are:
# - All 3 parts are required and you must include "Type", "description" and "issue".
# - "Type" must be left aligned and followed by a colon.
# - "description" must be indented with 2 spaces followed by a colon
# - "issue" must be indented with 4 spaces followed by a colon.
# - "issue" is for the Jira ticket number only e.g. DP-1234
# - No extra spaces, indents, or blank lines are allowed.
#
# Example:
# #############################################################################
# Fixed:
# - description: Fixes scrolling on edit pages in Safari.
# issue: DP-13314
#
# You may add more than 1 description & issue for each type using the following format:
# Changed:
# - description: Automating the release branch.
# issue: DP-10166
# - description: Second change item that needs a description.
# issue: DP-19875
# - description: Third change item that needs a description along with an issue.
# issue: DP-19843
#
Changed:
- description: Add a container for alert overlay to mass_theme/templates/layout/page--node--without-main.html.twig.
issue: DP-20203
2 changes: 1 addition & 1 deletion conf/drupal/config/block.block.ajaxpattern_2.yml
Expand Up @@ -10,7 +10,7 @@ dependencies:
id: ajaxpattern_2
theme: mass_theme
region: header
weight: -5
weight: -1
provider: null
plugin: mayflower_ajax_pattern
settings:
Expand Down
2 changes: 1 addition & 1 deletion conf/drupal/config/block.block.currentrevisionstate.yml
Expand Up @@ -9,7 +9,7 @@ dependencies:
id: currentrevisionstate
theme: mass_theme
region: header
weight: -6
weight: -2
provider: null
plugin: current_revision
settings:
Expand Down
2 changes: 1 addition & 1 deletion conf/drupal/config/block.block.mainnavigation.yml
Expand Up @@ -11,7 +11,7 @@ dependencies:
id: mainnavigation
theme: mass_theme
region: header
weight: -7
weight: -4
provider: null
plugin: 'system_menu_block:main'
settings:
Expand Down
25 changes: 25 additions & 0 deletions conf/drupal/config/block.block.mainnavigation_2.yml
@@ -0,0 +1,25 @@
uuid: e8296972-ee4f-4e4f-a871-d36eac8ddbdf
langcode: en
status: true
dependencies:
config:
- system.menu.main
module:
- system
theme:
- mass_theme
id: mainnavigation_2
theme: mass_theme
region: header
weight: -5
provider: null
plugin: 'system_menu_block:main'
settings:
id: 'system_menu_block:main'
label: 'Main navigation'
provider: system
label_display: '0'
level: 1
depth: 0
expand_all_items: false
visibility: { }
25 changes: 25 additions & 0 deletions conf/drupal/config/block.block.mainnavigation_3.yml
@@ -0,0 +1,25 @@
uuid: 8ea45ff3-6459-4e34-8f95-c868ebde5a8c
langcode: en
status: true
dependencies:
config:
- system.menu.main
module:
- system
theme:
- mass_theme
id: mainnavigation_3
theme: mass_theme
region: header
weight: -3
provider: null
plugin: 'system_menu_block:main'
settings:
id: 'system_menu_block:main'
label: 'Main navigation'
provider: system
label_display: '0'
level: 1
depth: 0
expand_all_items: false
visibility: { }
1 change: 1 addition & 0 deletions conf/drupal/config/mass_utility.settings.yml
@@ -1 +1,2 @@
allowed_urls: "https://www.youtube.com/\r\nhttps://docs.digital.mass.gov\r\nhttps://public.dep.state.ma.us/\r\nhttps://calendar.google.com/\r\nhttps://dashboards.digital.mass.gov/\r\nhttps://docs.google.com/\r\nhttps://drive.google.com/\r\nhttps://fusiontables.googleusercontent.com/\r\nhttps://libraryh3lp.com/\r\nhttps://mass-eoeea.maps.arcgis.com/\r\nhttps://massgov.formstack.com/forms/sample\r\nhttps://massgov.github.io\r\nhttps://public.tableau.com/\r\nhttps://www.google.com/\r\nhttps://www.massdot.state.ma.us/\r\nhttps://www.massmarinefisheries.net/\r\nhttps://www.youtube.com/\r\nhttps://youtu.be/\r\nhttps://memamaps.maps.arcgis.com/\r\nhttps://maps.google.com/\r\nhttps://licensing.reg.state.ma.us/\r\nhttps://hwy.massdot.state.ma.us/\r\nhttps://cognos10.hhs.state.ma.us/\r\nhttps://code.highcharts.com/\r\nhttps://eoeea.maps.arcgis.com/\r\nhttps://eeaonline.eea.state.ma.us/\r\nhttps://gis.massdot.state.ma.us/\r\nhttps://dotfeeds.state.ma.us/\r\nhttps://massgis.maps.arcgis.com/\r\nhttps://recollect.net/\r\nhttp://massdot.maps.arcgis.com/\r\nhttps://massdot.maps.arcgis.com/\r\nhttps://calculator.digital.mass.gov/\r\nhttps://api.recollect.net/\r\nhttps://www.eia.gov/beta/states/iframe\r\nhttps://mdphgis.maps.arcgis.com/\r\nhttps://app.powerbigov.us/\r\nhttps://calc.a4we.org/\r\nhttps://w.soundcloud.com/"
header_mixed_urls: "<front>\r\n"
2 changes: 1 addition & 1 deletion docroot/modules/custom/mass_content/js/contextual-nav.js
Expand Up @@ -7,5 +7,5 @@
'use strict';
var $contextual_nav = $('.contextual-nav').html();
$('.contextual-nav').detach();
$('li.js-util-nav-toggle:last-child .ma__utility-nav__content-body').prepend($contextual_nav);
$('.js-util-nav-toggle').next().find('.ma__utility-nav__content-body').prepend($contextual_nav);
})(window, document, jQuery);
Expand Up @@ -33,3 +33,10 @@ mass_utility.extra_files:
parent: system.admin_reports
description: 'List of files on the file system that are unknown to Drupal'
weight: 11

mass_utility.header:
title: 'Header'
route_name: mass_utility.header
parent: mass_utility.configuration
description: 'List of internal links that will receive Header version with mixed navigation.'
weight: 1
Expand Up @@ -6,3 +6,7 @@ access clean file managed config page:
title: 'Access clean file managed config page'
description: 'Allows access to the configuration page to manage file_managed table cleaning.'
restrict access: true
access header config page:
title: 'Access Header config page'
description: 'Allows access to the Header configuration page.'
restrict access: true
8 changes: 8 additions & 0 deletions docroot/modules/custom/mass_utility/mass_utility.routing.yml
Expand Up @@ -41,3 +41,11 @@ mass_utility.clean_file_managed.configuration:
_title: 'Clean File Managed table'
requirements:
_permission: 'access administration pages'

mass_utility.header:
path: '/admin/config/mass/header'
defaults:
_form: 'Drupal\mass_utility\Form\HeaderConfigForm'
_title: 'Header'
requirements:
_permission: 'access header config page'
64 changes: 64 additions & 0 deletions docroot/modules/custom/mass_utility/src/Form/HeaderConfigForm.php
@@ -0,0 +1,64 @@
<?php

namespace Drupal\mass_utility\Form;

use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;

/**
* Header Configuration form class.
*/
class HeaderConfigForm extends ConfigFormBase {

/**
* {@inheritdoc}
*/
public function getFormId() {
return 'mass_utility_header_config_form';
}

/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$form = parent::buildForm($form, $form_state);
$config = $this->config('mass_utility.settings');

$form['header_mixed_urls'] = [
'#type' => 'textarea',
'#title' => $this->t('URLs for mixed version navigation'),
'#description' => $this->t("Input the URLs that should be rendered with mixed version of navigation, one per line with leading slash relative URLs (e.g. /personal-income-tax). %front refers to a Homepage.", [
'%front' => '<front>',
]),
'#default_value' => $config->get('header_mixed_urls'),
'#rows' => 15,
];

return $form;
}

/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this->config('mass_utility.settings');

// Trim out any blank lines.
$urls_raw = $form_state->getValue('header_mixed_urls');
$header_mixed_urls = preg_replace("/(\r?\n){2,}/", "\n", $urls_raw);
$config->set('header_mixed_urls', $header_mixed_urls);
$config->save();

parent::submitForm($form, $form_state);
}

/**
* Return the configuration names.
*/
protected function getEditableConfigNames() {
return [
'mass_utility.settings',
];
}

}

0 comments on commit 1aab315

Please sign in to comment.