From a93e85ce5265664c9fb7734281d73262173c4dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20D=C3=ADaz=20Soto?= Date: Wed, 30 Oct 2024 16:16:56 -0600 Subject: [PATCH] chore(shs-5886): remove hs_row module --- ...ragraph.hs_row.field_hs_row_components.yml | 29 --- ...rage.paragraph.field_hs_row_components.yml | 19 -- .../paragraphs.paragraphs_type.hs_row.yml | 8 - .../modules/hs_row/hs_row.info.yml | 14 -- .../modules/hs_row/hs_row.install | 22 --- .../modules/hs_row_display/Gruntfile.js | 169 ------------------ ..._form_display.paragraph.hs_row.default.yml | 35 ---- ..._view_display.paragraph.hs_row.default.yml | 25 --- .../hs_row_display/css/hs_row_display.css | 1 - .../hs_row_display/hs_row_display.info.yml | 9 - .../hs_row_display.libraries.yml | 6 - .../hs_row_display/hs_row_display.module | 42 ----- .../hs_row_display/scss/hs_row_display.scss | 61 ------- 13 files changed, 440 deletions(-) delete mode 100644 docroot/modules/humsci/hs_paragraph_types/modules/hs_row/config/install/field.field.paragraph.hs_row.field_hs_row_components.yml delete mode 100644 docroot/modules/humsci/hs_paragraph_types/modules/hs_row/config/install/field.storage.paragraph.field_hs_row_components.yml delete mode 100644 docroot/modules/humsci/hs_paragraph_types/modules/hs_row/config/install/paragraphs.paragraphs_type.hs_row.yml delete mode 100644 docroot/modules/humsci/hs_paragraph_types/modules/hs_row/hs_row.info.yml delete mode 100644 docroot/modules/humsci/hs_paragraph_types/modules/hs_row/hs_row.install delete mode 100644 docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/Gruntfile.js delete mode 100644 docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/config/optional/core.entity_form_display.paragraph.hs_row.default.yml delete mode 100644 docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/config/optional/core.entity_view_display.paragraph.hs_row.default.yml delete mode 100644 docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/css/hs_row_display.css delete mode 100644 docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/hs_row_display.info.yml delete mode 100644 docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/hs_row_display.libraries.yml delete mode 100644 docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/hs_row_display.module delete mode 100644 docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/scss/hs_row_display.scss diff --git a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/config/install/field.field.paragraph.hs_row.field_hs_row_components.yml b/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/config/install/field.field.paragraph.hs_row.field_hs_row_components.yml deleted file mode 100644 index bacaf9b983..0000000000 --- a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/config/install/field.field.paragraph.hs_row.field_hs_row_components.yml +++ /dev/null @@ -1,29 +0,0 @@ -langcode: en -status: true -dependencies: - config: - - field.storage.paragraph.field_hs_row_components - - paragraphs.paragraphs_type.hs_row - module: - - entity_reference_revisions -id: paragraph.hs_row.field_hs_row_components -field_name: field_hs_row_components -entity_type: paragraph -bundle: hs_row -label: Components -description: '' -required: false -translatable: false -default_value: { } -default_value_callback: '' -settings: - handler: 'default:paragraph' - handler_settings: - negate: 1 - target_bundles: - hs_row: hs_row - target_bundles_drag_drop: - row: - enabled: true - weight: 8 -field_type: entity_reference_revisions diff --git a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/config/install/field.storage.paragraph.field_hs_row_components.yml b/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/config/install/field.storage.paragraph.field_hs_row_components.yml deleted file mode 100644 index 7562f3e134..0000000000 --- a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/config/install/field.storage.paragraph.field_hs_row_components.yml +++ /dev/null @@ -1,19 +0,0 @@ -langcode: en -status: true -dependencies: - module: - - entity_reference_revisions - - paragraphs -id: paragraph.field_hs_row_components -field_name: field_hs_row_components -entity_type: paragraph -type: entity_reference_revisions -settings: - target_type: paragraph -module: entity_reference_revisions -locked: false -cardinality: 4 -translatable: true -indexes: { } -persist_with_no_fields: false -custom_storage: false diff --git a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/config/install/paragraphs.paragraphs_type.hs_row.yml b/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/config/install/paragraphs.paragraphs_type.hs_row.yml deleted file mode 100644 index 9145aad112..0000000000 --- a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/config/install/paragraphs.paragraphs_type.hs_row.yml +++ /dev/null @@ -1,8 +0,0 @@ -langcode: en -status: true -dependencies: { } -id: hs_row -label: Row -icon_uuid: null -description: 'Add multiple paragraphs in the same row.' -behavior_plugins: { } diff --git a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/hs_row.info.yml b/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/hs_row.info.yml deleted file mode 100644 index 74d6639398..0000000000 --- a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/hs_row.info.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: 'H&S Row Paragraph' -description: 'A paragraph type with a simple image.' -core_version_requirement: ^9.4 || ^10 -type: module -version: 8.2.7 -package: 'Humanities & Sciences' -dependencies: - - allowed_formats - - field_group - - link - - media - - paragraphs - - stanford_media - - text diff --git a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/hs_row.install b/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/hs_row.install deleted file mode 100644 index 2db5772e8d..0000000000 --- a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/hs_row.install +++ /dev/null @@ -1,22 +0,0 @@ -install(['hs_row_display']); - } - catch (Exception $e) { - \Drupal::messenger() - ->addError(t('Unable to set initial display settings for Row Paragraph')); - } - -} diff --git a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/Gruntfile.js b/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/Gruntfile.js deleted file mode 100644 index 0ba5302c84..0000000000 --- a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/Gruntfile.js +++ /dev/null @@ -1,169 +0,0 @@ -/** - * @file - */ -module.exports = function(grunt) { - - // This is where we configure each task that we'd like to run. - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - watch: { - // This is where we set up all the tasks we'd like grunt to watch for changes. - scripts: { - files: ['js/source/**/*.js'], - tasks: ['uglify', 'drush:ccall'], - options: { - spawn: false, - }, - }, - images: { - files: ['images/source/*.{png,jpg,gif}'], - tasks: ['imagemin'], - options: { - spawn: false, - } - }, - vector: { - files: ['images/source/**/*.svg'], - tasks: ['svgmin'], - options: { - spawn: false, - } - }, - css: { - files: ['scss/**/*.scss', 'scss/**/**/*.scss','patterns/**/**/scss/*.scss'], - tasks: ['sass'], - options: { - interrupt: true - } - }, - twig: { - files: ['templates/**/*.html.twig'], - tasks: ['uglify', 'svgmin', 'imagemin', 'sass', 'drush:ccall'] - } - }, - uglify: { - // This is for minifying all of our scripts. - options: { - sourceMap: true, - mangle: false - }, - my_target: { - files: [{ - expand: true, - cwd: 'js/source', - src: '{,*/}*.js', - dest: 'js/build' - }] - } - }, - imagemin: { - // This will optimize all of our images for the web. - dynamic: { - files: [{ - expand: true, - cwd: 'img/source/', - src: ['{,*/}*.{png,jpg,gif}' ], - dest: 'img/optimized/' - }] - } - }, - svgmin: { - options: { - plugins: [{ - removeViewBox: false - }, { - removeUselessStrokeAndFill: false - }] - }, - dist: { - files: [{ - expand: true, - cwd: 'images/source/', - src: ['{,*/}*.svg' ], - dest: 'images/optimized/' - }] - } - }, - sass: { - // This will compile all of our sass files - // Additional configuration options can be found at https://github.com/sindresorhus/grunt-sass - options: { - includePaths: [ - "scss", - "node_modules/bourbon/core", - "node_modules/bourbon-neat/app/assets/stylesheets", - "node_modules/neat-omega/core", - "node_modules/decanter/scss", - "node_modules", - ], - sourceMap: false, - // This controls the compiled css and can be changed to nested, compact or compressed. - outputStyle: 'compressed', - precision: 10 - }, - dist: { - files: { - // Files are compiled individually so they may be included - // conditionally using logic built in to the theme template or module. - - // BASE - 'css/hs_row_display.css': 'scss/hs_row_display.scss', - } - } - }, - drush: { - ccall: { - args: ['cache-rebuild', 'all'] - } - }, - browserSync: { - dev: { - bsFiles: { - src : [ - 'css/**/*.css', - 'templates/**/*.twig', - 'images/optimized/**/*.{png,jpg,gif,svg}', - 'js/build/**/*.js', - '*.theme' - ] - }, - options: { - watchTask: true, - // reloadDelay: 1000, - // reloadDebounce: 500, - reloadOnRestart: true, - logConnections: true, - injectChanges: false // Depends on enabling the link_css module - } - } - }, - availabletasks: { - tasks: { - options: { - filter: "include", - tasks: [ - 'browserSync', 'imagemin', 'sass', 'svgmin', 'uglify', 'watch', 'devmode' - ] - } - } - } - }); - - // This is where we tell Grunt we plan to use this plug-in. - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-imagemin'); - grunt.loadNpmTasks('grunt-svgmin'); - grunt.loadNpmTasks('grunt-sass'); - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-browser-sync'); - grunt.loadNpmTasks('grunt-available-tasks'); - grunt.loadNpmTasks('grunt-drush'); - - // My tasks. - grunt.registerTask('devmode', "Watch and BrowserSync all in one.", ['browserSync', 'watch']); - - // This is where we tell Grunt what to do when we type "grunt" into the terminal. - // Note: if you'd like to run and of the tasks individually you can do so by typing 'grunt mytaskname' alternatively - // you can type 'grunt watch' to automatically track your files for changes. - grunt.registerTask('default', ['availabletasks']); -}; diff --git a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/config/optional/core.entity_form_display.paragraph.hs_row.default.yml b/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/config/optional/core.entity_form_display.paragraph.hs_row.default.yml deleted file mode 100644 index 51a9a14b5d..0000000000 --- a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/config/optional/core.entity_form_display.paragraph.hs_row.default.yml +++ /dev/null @@ -1,35 +0,0 @@ -langcode: en -status: true -dependencies: - config: - - field.field.paragraph.hs_row.field_hs_row_components - - paragraphs.paragraphs_type.hs_row - module: - - paragraphs -id: paragraph.hs_row.default -targetEntityType: paragraph -bundle: hs_row -mode: default -content: - field_hs_row_components: - type: paragraphs - weight: 0 - settings: - title: 'Row Component' - title_plural: 'Row Components' - edit_mode: closed - closed_mode: summary - autocollapse: all - add_mode: dropdown - form_display_mode: default - default_paragraph_type: _none - features: - duplicate: duplicate - collapse_edit_all: collapse_edit_all - add_above: '0' - third_party_settings: { } - region: content -hidden: - created: true - status: true - uid: true diff --git a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/config/optional/core.entity_view_display.paragraph.hs_row.default.yml b/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/config/optional/core.entity_view_display.paragraph.hs_row.default.yml deleted file mode 100644 index 6b35bdc1db..0000000000 --- a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/config/optional/core.entity_view_display.paragraph.hs_row.default.yml +++ /dev/null @@ -1,25 +0,0 @@ -langcode: en -status: true -dependencies: - config: - - field.field.paragraph.hs_row.field_hs_row_components - - paragraphs.paragraphs_type.hs_row - module: - - entity_reference_revisions - - layout_builder - - layout_discovery -id: paragraph.hs_row.default -targetEntityType: paragraph -bundle: hs_row -mode: default -content: - field_hs_row_components: - type: entity_reference_revisions_entity_view - weight: 0 - label: hidden - settings: - view_mode: default - link: '' - third_party_settings: { } - region: content -hidden: { } diff --git a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/css/hs_row_display.css b/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/css/hs_row_display.css deleted file mode 100644 index 9cf8a62a23..0000000000 --- a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/css/hs_row_display.css +++ /dev/null @@ -1 +0,0 @@ -.field-hs-row-components{display:flex;flex-wrap:wrap;justify-content:space-between}.field-hs-row-components.counted-items-2>div{width:100%;margin:0}@media screen and (min-width: 768px){.field-hs-row-components.counted-items-2>div{width:calc(50% - 25px);margin-bottom:0}}.field-hs-row-components.counted-items-3>div{width:100%;margin:0}@media screen and (min-width: 768px){.field-hs-row-components.counted-items-3>div{width:calc(50% - 25px);margin-bottom:0}}@media screen and (min-width: 960px){.field-hs-row-components.counted-items-3>div{width:calc(33.334% - 30px)}}.field-hs-row-components.counted-items-4>div{width:100%;margin:0}@media screen and (min-width: 768px){.field-hs-row-components.counted-items-4>div{width:calc(50% - 25px);margin-bottom:0}}@media screen and (min-width: 960px){.field-hs-row-components.counted-items-4>div{width:calc(33.334% - 30px)}}@media screen and (min-width: 1200px){.field-hs-row-components.counted-items-4>div{width:calc(25% - 35px)}} diff --git a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/hs_row_display.info.yml b/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/hs_row_display.info.yml deleted file mode 100644 index 207e40b183..0000000000 --- a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/hs_row_display.info.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: 'H&S Row Paragraph Display' -description: 'A paragraph type with a simple image.' -core_version_requirement: ^9.4 || ^10 -type: module -version: 8.2.7 -package: 'Humanities & Sciences' -hidden: true -dependencies: - - hs_row diff --git a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/hs_row_display.libraries.yml b/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/hs_row_display.libraries.yml deleted file mode 100644 index 11938b09d7..0000000000 --- a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/hs_row_display.libraries.yml +++ /dev/null @@ -1,6 +0,0 @@ - -hs_row: - version: VERSION - css: - base: - css/hs_row_display.css: {} diff --git a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/hs_row_display.module b/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/hs_row_display.module deleted file mode 100644 index af7a01b855..0000000000 --- a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/hs_row_display.module +++ /dev/null @@ -1,42 +0,0 @@ -hasField('field_paragraph_style')) { - $row_style = $paragraph->get('field_paragraph_style')->getString(); - - if (!empty($row_style)) { - $variables['attributes']['class'][] = 'hs-paragraph-style hs-paragraph-style--' . $row_style; - } - } -} - -/** - * Implements hook_ENTITY_TYPE_view(). - */ -function hs_row_display_paragraph_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) { - if ($entity->bundle() == 'hs_row') { - $build['#attached']['library'][] = 'hs_row_display/hs_row'; - } -} - -/** - * Implements hook_preprocess_HOOK(). - */ -function hs_row_display_preprocess_field(&$variables) { - if ($variables['element']['#field_name'] == 'field_hs_row_components') { - $variables['attributes']['class'][] = 'counted-items-' . count($variables['items']); - } -} diff --git a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/scss/hs_row_display.scss b/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/scss/hs_row_display.scss deleted file mode 100644 index 17f9cd06ca..0000000000 --- a/docroot/modules/humsci/hs_paragraph_types/modules/hs_row/modules/hs_row_display/scss/hs_row_display.scss +++ /dev/null @@ -1,61 +0,0 @@ -@import 'decanter-no-markup'; - -.field-hs-row-components { - display: flex; - flex-wrap: wrap; - justify-content: space-between; - - &.counted-items-2 { - > div { - width: 100%; - - @include margin(0); - - @include media(768px) { - width: calc(50% - 25px); - - @include margin(null null 0 null); - } - } - } - - &.counted-items-3 { - > div { - width: 100%; - - @include margin(0); - - @include media(768px) { - width: calc(50% - 25px); - - @include margin(null null 0 null); - } - - @include media(960px) { - width: calc(33.334% - 30px); - } - } - } - - &.counted-items-4 { - > div { - width: 100%; - - @include margin(0); - - @include media(768px) { - width: calc(50% - 25px); - - @include margin(null null 0 null); - } - - @include media(960px) { - width: calc(33.334% - 30px); - } - - @include media(1200px) { - width: calc(25% - 35px); - } - } - } -}