From 68f83f6de03005ed999796302a7211b87e3965ba Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Fri, 2 Sep 2022 17:12:31 -0400 Subject: [PATCH 01/14] ISTWCMS-5740: adding dashboard gulptask --- dashboards.js | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 dashboards.js diff --git a/dashboards.js b/dashboards.js new file mode 100644 index 0000000..23de0e3 --- /dev/null +++ b/dashboards.js @@ -0,0 +1,46 @@ +'use strict'; + +// Include gulp +const { src, dest } = require('gulp'); + +// Include Our Plugins +const sass = require('gulp-sass')(require('sass')); +const prefix = require('gulp-autoprefixer'); +const rename = require('gulp-rename'); +const minify = require('gulp-minify'); +const clean = require('gulp-clean-css'); + +/** + * Error handler function so we can see when errors happen. + * @param {object} err error that was thrown + * @returns {undefined} + */ +function handleError(err) { + // eslint-disable-next-line no-console + console.error(err.toString()); + this.emit('end'); +} + +// Export our tasks. +module.exports = { + + // Compile Sass. + compileDashboards: function() { + return src([ + './src/patterns/global.scss', + './src/patterns/01-core/**/*.scss', + './src/patterns/03-layouts/layout/**/*.scss', + './src/patterns/04-components/00-cms-styles/dashboards/*.scss', + './src/patterns/04-components/form-view-search/*.scss' + ]) + .pipe(sass.sync({ + includePaths: ['node_modules'], + outputStyle: 'expanded' + }).on('error', handleError)) + .pipe(prefix({ cascade: false })) + .pipe(rename(function(path) { path.dirname = ''; return path;})) + .pipe(clean()) + .pipe(rename('dashboard.css')) + .pipe(dest('./dist/css')); + } +}; -- GitLab From 5d44c12b66b2a83f9e8b8902b647e01a2489bcdb Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Wed, 7 Sep 2022 06:50:06 -0400 Subject: [PATCH 02/14] ISTWCMS-5740: renaming gulp task file for dashboard --- dashboards.js => dashboard.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename dashboards.js => dashboard.js (100%) diff --git a/dashboards.js b/dashboard.js similarity index 100% rename from dashboards.js rename to dashboard.js -- GitLab From 8ee0c366ecebb540975fe0aed32855b910c99478 Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Wed, 7 Sep 2022 06:52:38 -0400 Subject: [PATCH 03/14] ISTWCMS-5740: coding standards --- dashboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard.js b/dashboard.js index 23de0e3..d37304f 100644 --- a/dashboard.js +++ b/dashboard.js @@ -25,7 +25,7 @@ function handleError(err) { module.exports = { // Compile Sass. - compileDashboards: function() { + compileDashboards: function () { return src([ './src/patterns/global.scss', './src/patterns/01-core/**/*.scss', @@ -38,7 +38,7 @@ module.exports = { outputStyle: 'expanded' }).on('error', handleError)) .pipe(prefix({ cascade: false })) - .pipe(rename(function(path) { path.dirname = ''; return path;})) + .pipe(rename(function (path) { path.dirname = ''; return path;})) .pipe(clean()) .pipe(rename('dashboard.css')) .pipe(dest('./dist/css')); -- GitLab From cb69f2b128cd8f7be6299537e09d2d2ef05c435a Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Wed, 7 Sep 2022 07:11:23 -0400 Subject: [PATCH 04/14] ISTWCMS-5740: adding script tasks to compile dashboard --- build_ohana.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build_ohana.sh b/build_ohana.sh index 296920c..308ac91 100755 --- a/build_ohana.sh +++ b/build_ohana.sh @@ -77,9 +77,12 @@ echo "************************************************************************** echo "Done running npm install." echo "**************************************************************************************" -echo "Setting up es lint ..." +echo "Setting up es lint and gulp ..." rm .eslintignore ln -s ../.eslintignore .eslintignore +ln -s ../dashboards.js gulp-tasks/dashboard.js +sed '3 i const { compileDashboard } = require(\'./gulp-tasks/dashboard\');' gulpfile.js +sed -i 's/parallel(compileSass, compileJS)/parallel(compileSass, compileJS, compileDashboard)/g' gulpfile.js echo "**************************************************************************************" echo "Done setting up es lint." -- GitLab From 1079561441ce1e58d5e568d42d75952600ad931c Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Wed, 7 Sep 2022 07:15:43 -0400 Subject: [PATCH 05/14] ISTWCMS-5740: updating script to replace with special characters --- build_ohana.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_ohana.sh b/build_ohana.sh index 308ac91..7d5b5a3 100755 --- a/build_ohana.sh +++ b/build_ohana.sh @@ -81,7 +81,7 @@ echo "Setting up es lint and gulp ..." rm .eslintignore ln -s ../.eslintignore .eslintignore ln -s ../dashboards.js gulp-tasks/dashboard.js -sed '3 i const { compileDashboard } = require(\'./gulp-tasks/dashboard\');' gulpfile.js +sed '3 i const { compileDashboard } = require\(\'\.\/gulp-tasks\/dashboard\'\);' gulpfile.js sed -i 's/parallel(compileSass, compileJS)/parallel(compileSass, compileJS, compileDashboard)/g' gulpfile.js echo "**************************************************************************************" echo "Done setting up es lint." -- GitLab From e99d0dcd9d6cc952211e4e4c4a51e12d5f6a3d7d Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Wed, 7 Sep 2022 07:17:48 -0400 Subject: [PATCH 06/14] ISTWCMS-5740: protecting more special characters in build ohana script --- build_ohana.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_ohana.sh b/build_ohana.sh index 7d5b5a3..1803a9c 100755 --- a/build_ohana.sh +++ b/build_ohana.sh @@ -82,7 +82,7 @@ rm .eslintignore ln -s ../.eslintignore .eslintignore ln -s ../dashboards.js gulp-tasks/dashboard.js sed '3 i const { compileDashboard } = require\(\'\.\/gulp-tasks\/dashboard\'\);' gulpfile.js -sed -i 's/parallel(compileSass, compileJS)/parallel(compileSass, compileJS, compileDashboard)/g' gulpfile.js +sed -i 's/parallel\(compileSass\, compileJS\)/parallel\(compileSass\, compileJS\, compileDashboard\)/g' gulpfile.js echo "**************************************************************************************" echo "Done setting up es lint." -- GitLab From 0fbbfe8e3a7908140d48f06fa8d48c85a95ed18c Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Wed, 7 Sep 2022 07:24:13 -0400 Subject: [PATCH 07/14] ISTWCMS-5740: fixing dashboard gulp tasks --- build_ohana.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_ohana.sh b/build_ohana.sh index 1803a9c..632e1ec 100755 --- a/build_ohana.sh +++ b/build_ohana.sh @@ -81,8 +81,8 @@ echo "Setting up es lint and gulp ..." rm .eslintignore ln -s ../.eslintignore .eslintignore ln -s ../dashboards.js gulp-tasks/dashboard.js -sed '3 i const { compileDashboard } = require\(\'\.\/gulp-tasks\/dashboard\'\);' gulpfile.js -sed -i 's/parallel\(compileSass\, compileJS\)/parallel\(compileSass\, compileJS\, compileDashboard\)/g' gulpfile.js +sed -i "3 i const { compileDashboard } = require('./gulp-tasks/dashboard');" gulpfile.js +sed -i "s/parallel(compileSass, compileJS)/parallel(compileSass, compileJS, compileDashboard)/g" gulpfile.js echo "**************************************************************************************" echo "Done setting up es lint." -- GitLab From 901bfb561ddaa656e97282cbe981d8978d8e0714 Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Wed, 7 Sep 2022 07:28:37 -0400 Subject: [PATCH 08/14] ISTWCMS-5740: fixing sym link to dashboard js gulp task --- build_ohana.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build_ohana.sh b/build_ohana.sh index 632e1ec..beacc34 100755 --- a/build_ohana.sh +++ b/build_ohana.sh @@ -80,7 +80,9 @@ echo "************************************************************************** echo "Setting up es lint and gulp ..." rm .eslintignore ln -s ../.eslintignore .eslintignore -ln -s ../dashboards.js gulp-tasks/dashboard.js +cd gulp-tasks +ln -s ../../dashboards.js . +cd .. sed -i "3 i const { compileDashboard } = require('./gulp-tasks/dashboard');" gulpfile.js sed -i "s/parallel(compileSass, compileJS)/parallel(compileSass, compileJS, compileDashboard)/g" gulpfile.js echo "**************************************************************************************" -- GitLab From b9bbe7c73467ea6c5ca32b7dc56dc08ec9a36d06 Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Wed, 7 Sep 2022 07:31:02 -0400 Subject: [PATCH 09/14] ISTWCMS-5740: fixing plural on dashbord.js file name --- build_ohana.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_ohana.sh b/build_ohana.sh index beacc34..f2e5b61 100755 --- a/build_ohana.sh +++ b/build_ohana.sh @@ -81,7 +81,7 @@ echo "Setting up es lint and gulp ..." rm .eslintignore ln -s ../.eslintignore .eslintignore cd gulp-tasks -ln -s ../../dashboards.js . +ln -s ../../dashboard.js . cd .. sed -i "3 i const { compileDashboard } = require('./gulp-tasks/dashboard');" gulpfile.js sed -i "s/parallel(compileSass, compileJS)/parallel(compileSass, compileJS, compileDashboard)/g" gulpfile.js -- GitLab From feeabea906030120fa5b2040f3f443bd69c6a5c1 Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Wed, 7 Sep 2022 09:25:22 -0400 Subject: [PATCH 10/14] ISTWCMS-5740: removing plural on compileDashboard function --- dashboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard.js b/dashboard.js index d37304f..98e2df1 100644 --- a/dashboard.js +++ b/dashboard.js @@ -25,7 +25,7 @@ function handleError(err) { module.exports = { // Compile Sass. - compileDashboards: function () { + compileDashboard: function () { return src([ './src/patterns/global.scss', './src/patterns/01-core/**/*.scss', -- GitLab From 50897298925dcbf1a47262e6dbb2bd97f15eb679 Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Wed, 7 Sep 2022 09:37:15 -0400 Subject: [PATCH 11/14] ISTWCMS-5740: using cp rather than ls for dashboard gulp task --- build_ohana.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build_ohana.sh b/build_ohana.sh index f2e5b61..66a7495 100755 --- a/build_ohana.sh +++ b/build_ohana.sh @@ -80,9 +80,7 @@ echo "************************************************************************** echo "Setting up es lint and gulp ..." rm .eslintignore ln -s ../.eslintignore .eslintignore -cd gulp-tasks -ln -s ../../dashboard.js . -cd .. +cp ../dashboard.js gulp-tasks sed -i "3 i const { compileDashboard } = require('./gulp-tasks/dashboard');" gulpfile.js sed -i "s/parallel(compileSass, compileJS)/parallel(compileSass, compileJS, compileDashboard)/g" gulpfile.js echo "**************************************************************************************" -- GitLab From 28f56eac2d4167c88f10a2122e33043085593944 Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Fri, 9 Sep 2022 10:56:13 -0400 Subject: [PATCH 12/14] ISTWCMS-5740: updating name of dashboard css file --- dashboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard.js b/dashboard.js index 98e2df1..38f328a 100644 --- a/dashboard.js +++ b/dashboard.js @@ -40,7 +40,7 @@ module.exports = { .pipe(prefix({ cascade: false })) .pipe(rename(function (path) { path.dirname = ''; return path;})) .pipe(clean()) - .pipe(rename('dashboard.css')) + .pipe(rename('uw-dashboard.min.css')) .pipe(dest('./dist/css')); } }; -- GitLab From b3be9f9581f04e4a4a908c945d60f91e07eec399 Mon Sep 17 00:00:00 2001 From: Martin Leblanc Date: Tue, 13 Sep 2022 09:54:33 -0400 Subject: [PATCH 13/14] ISTWCMS-5740: created dashboard.scss to then call the files in needs, made adjustments to dashboard.js --- dashboard.js | 6 +----- src/patterns/03-layouts/block/_block.scss | 5 +++++ src/patterns/dashboard.scss | 8 ++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 src/patterns/dashboard.scss diff --git a/dashboard.js b/dashboard.js index 38f328a..0084a32 100644 --- a/dashboard.js +++ b/dashboard.js @@ -27,11 +27,7 @@ module.exports = { // Compile Sass. compileDashboard: function () { return src([ - './src/patterns/global.scss', - './src/patterns/01-core/**/*.scss', - './src/patterns/03-layouts/layout/**/*.scss', - './src/patterns/04-components/00-cms-styles/dashboards/*.scss', - './src/patterns/04-components/form-view-search/*.scss' + './src/patterns/dashboard.scss' ]) .pipe(sass.sync({ includePaths: ['node_modules'], diff --git a/src/patterns/03-layouts/block/_block.scss b/src/patterns/03-layouts/block/_block.scss index 5f4fef4..41af080 100644 --- a/src/patterns/03-layouts/block/_block.scss +++ b/src/patterns/03-layouts/block/_block.scss @@ -5,6 +5,11 @@ .block { margin-bottom: var(--grid-gap); + .path-dashboard &, + &.block-page-title-block, + &.block-local-tasks-block { + margin-bottom: 0; + } } // disable margin for layout builder blocks diff --git a/src/patterns/dashboard.scss b/src/patterns/dashboard.scss new file mode 100644 index 0000000..afbf7d3 --- /dev/null +++ b/src/patterns/dashboard.scss @@ -0,0 +1,8 @@ +// @file +// Admin Dashboards styles + +@use '01-core/font-face' as *; +@use '01-core/props' as *; +@use '01-core/utilities' as *; +@use '03-layouts' as *; +@use '04-components/00-cms-styles/dashboards/dashboards' as *; -- GitLab From 279c2a2b855cc2725571f68d1902d63b06f14beb Mon Sep 17 00:00:00 2001 From: Eric Bremner Date: Tue, 13 Sep 2022 14:00:01 -0400 Subject: [PATCH 14/14] ISTWCMS-5740: adding form view search component to dashboard --- src/patterns/dashboard.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/patterns/dashboard.scss b/src/patterns/dashboard.scss index afbf7d3..2828995 100644 --- a/src/patterns/dashboard.scss +++ b/src/patterns/dashboard.scss @@ -6,3 +6,4 @@ @use '01-core/utilities' as *; @use '03-layouts' as *; @use '04-components/00-cms-styles/dashboards/dashboards' as *; +@use '04-components/form-view-search/form-view-search' as *; -- GitLab