From fd6a21c781bda7eaf48004ab4b168d3dac8a89ff Mon Sep 17 00:00:00 2001 From: Nick Forbes-Smith Date: Fri, 1 Sep 2023 12:14:31 +1000 Subject: [PATCH 1/9] Replace node-sass with sass --- lib/ReactViews/Analytics/invoke-function.scss | 4 +++- lib/ReactViews/DataCatalog/data-catalog-group.scss | 2 +- lib/ReactViews/Mobile/mobile-header.scss | 2 +- .../StandardUserInterface/standard-user-interface.scss | 8 ++++++-- lib/Sass/common/_variables.scss | 4 ++-- package.json | 4 ++-- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/ReactViews/Analytics/invoke-function.scss b/lib/ReactViews/Analytics/invoke-function.scss index 8e3cb5b6c11..f95e59ea42b 100644 --- a/lib/ReactViews/Analytics/invoke-function.scss +++ b/lib/ReactViews/Analytics/invoke-function.scss @@ -31,7 +31,9 @@ } } -@include empty-module("description") .btn { +@include empty-module("description"); + +.btn { composes: btn from "../../Sass/common/_buttons.scss"; composes: btn-primary from "../../Sass/common/_buttons.scss"; } diff --git a/lib/ReactViews/DataCatalog/data-catalog-group.scss b/lib/ReactViews/DataCatalog/data-catalog-group.scss index 8ffeaf20eb1..b7cb3e0a226 100644 --- a/lib/ReactViews/DataCatalog/data-catalog-group.scss +++ b/lib/ReactViews/DataCatalog/data-catalog-group.scss @@ -112,7 +112,7 @@ .catalog-group { composes: list-reset from "../../Sass/common/_base.scss"; padding-left: $padding; - padding-top: $padding / 2; + padding-top: calc($padding / 2); &--lower-level { margin-left: 20px; border-left: 1px solid $grey-lighter; diff --git a/lib/ReactViews/Mobile/mobile-header.scss b/lib/ReactViews/Mobile/mobile-header.scss index d536a6607c4..faa0eb31ed3 100644 --- a/lib/ReactViews/Mobile/mobile-header.scss +++ b/lib/ReactViews/Mobile/mobile-header.scss @@ -47,7 +47,7 @@ svg { position: absolute; top: $padding; - left: $padding/2; + left: calc($padding / 2); fill: #ffffff; } } diff --git a/lib/ReactViews/StandardUserInterface/standard-user-interface.scss b/lib/ReactViews/StandardUserInterface/standard-user-interface.scss index 660037e054a..e8c8a154c58 100644 --- a/lib/ReactViews/StandardUserInterface/standard-user-interface.scss +++ b/lib/ReactViews/StandardUserInterface/standard-user-interface.scss @@ -80,8 +80,12 @@ // On small screens (mobile), it make be up to 90% of the screen. // In between, it may be up to 90% of the largest mobile screen ($sm), minus a bit to leave room // for the map controls on the right. This is computed in $feature-info-medium-max-size. - $feature-info-medium-max-size: $sm * 0.9 - $feature-info-right-margin * 0.5; - $feature-info-forty-percent-size: $feature-info-medium-max-size * 100 / 40; + $feature-info-medium-max-size: calc( + $sm * 0.9 - $feature-info-right-margin * 0.5 + ); + $feature-info-forty-percent-size: calc( + $feature-info-medium-max-size * 100 / 40 + ); z-index: $front-component-z-index - 20; position: absolute; diff --git a/lib/Sass/common/_variables.scss b/lib/Sass/common/_variables.scss index a69b1182cf9..26a01198883 100644 --- a/lib/Sass/common/_variables.scss +++ b/lib/Sass/common/_variables.scss @@ -182,7 +182,7 @@ $splitter-thumb-width: 40px; // Generated legends $legend-item-width: 30px; $legend-item-height: 16px; -$legend-padding: $legend-item-height / 2; -$legend-spacer-height: $legend-padding / 2; +$legend-padding: calc($legend-item-height / 2); +$legend-spacer-height: calc($legend-padding / 2); $tool-primary-color: $color-primary; diff --git a/package.json b/package.json index 1377af696c0..defda063346 100644 --- a/package.json +++ b/package.json @@ -219,13 +219,13 @@ "klaw-sync": "^4.0.0", "minimist": "^1.2.8", "node-notifier": "^5.1.2", - "node-sass": "^6.0.1", "plugin-error": "^1.0.1", "prettier": "2.7.1", "pretty-quick": "^1.10.0", "react-shallow-testutils": "^3.0.0", "react-test-renderer": "^16.3.2", "regenerator-runtime": "^0.13.2", + "sass": "^1.66.1", "terriajs-server": "^4.0.0", "yaml": "^1.10.0" }, @@ -245,4 +245,4 @@ "build-for-node": "tsc -b tsconfig-node.json", "prepare": "yarn build-for-node && husky install" } -} +} \ No newline at end of file From 6cd0e5d9f037b3e9fd78bafae2634efba5af9aad Mon Sep 17 00:00:00 2001 From: Nick Forbes-Smith Date: Fri, 1 Sep 2023 12:39:30 +1000 Subject: [PATCH 2/9] change CI TerriaMap branch to sass-upgrade --- buildprocess/ci-deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildprocess/ci-deploy.sh b/buildprocess/ci-deploy.sh index d878ab4b7a3..c39c8f1b242 100644 --- a/buildprocess/ci-deploy.sh +++ b/buildprocess/ci-deploy.sh @@ -21,7 +21,7 @@ npm install -g yarn@^1.19.0 # Clone and build TerriaMap, using this version of TerriaJS TERRIAJS_COMMIT_HASH=$(git rev-parse HEAD) -git clone -b main https://github.com/TerriaJS/TerriaMap.git +git clone -b sass-upgrade https://github.com/TerriaJS/TerriaMap.git cd TerriaMap TERRIAMAP_COMMIT_HASH=$(git rev-parse HEAD) sed -i -e 's@"terriajs": ".*"@"terriajs": "'$GITHUB_REPOSITORY'#'${GITHUB_BRANCH}'"@g' package.json From 9b239c4ec8b693f711a21fc7c5a142764916dbad Mon Sep 17 00:00:00 2001 From: Nick Forbes-Smith Date: Fri, 6 Oct 2023 19:00:03 +1100 Subject: [PATCH 3/9] prettier --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 93be5308d3c..259c43d6926 100644 --- a/package.json +++ b/package.json @@ -245,4 +245,4 @@ "build-for-node": "tsc -b tsconfig-node.json", "prepare": "yarn build-for-node && husky install" } -} \ No newline at end of file +} From f52e5fb2261da79b508906f7082cb9f74a13c037 Mon Sep 17 00:00:00 2001 From: Nick Forbes-Smith Date: Fri, 6 Oct 2023 20:00:27 +1100 Subject: [PATCH 4/9] Update changes --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 490d3bb5d76..591658a6da6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,8 @@ #### next release (8.3.7) +- **Breaking change:** Replaced `node-sass` with (dart) `sass` + - You will need to update your `TerriaMap` to use `sass` instead of `node-sass`. - [The next improvement] #### 8.3.6 - 2023-10-03 From 56b742456eee120cd2b1360f2db08928b549438a Mon Sep 17 00:00:00 2001 From: Nick Forbes-Smith Date: Fri, 6 Oct 2023 20:35:24 +1100 Subject: [PATCH 5/9] remove node-sass docs --- doc/contributing/problems-and-solutions.md | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/doc/contributing/problems-and-solutions.md b/doc/contributing/problems-and-solutions.md index f389e97ef33..002ae4db8fb 100644 --- a/doc/contributing/problems-and-solutions.md +++ b/doc/contributing/problems-and-solutions.md @@ -79,24 +79,3 @@ Then run the following to install NodeJS v16 and use it: nvm install 16 nvm use 16 ``` - ---- - -### Problem - -Python errors when building NodeJS dependencies (eg `node-sass`). This is common on M1/M2 macs. - -### Solution - -You may need to install Python2 to build NodeJS dependencies (like `node-sass`) - -We recommend using [`pyenv`](https://github.com/pyenv/pyenv#installation) to install Python2. - -Follow installation instructions [here](https://github.com/pyenv/pyenv#installation). - -Then run the following to install Python 2.7.18 and use it: - -```bash -pyenv install 2.7.18 -pyenv shell 2.7.18 -``` From 0990ca20fb2956b15970fe5fcc87426fc2bd5834 Mon Sep 17 00:00:00 2001 From: Nick Forbes-Smith Date: Sun, 19 Nov 2023 21:05:54 +1100 Subject: [PATCH 6/9] Fix feature-info-template image paths --- .../customizing-data-appearance/feature-info-template.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/connecting-to-data/customizing-data-appearance/feature-info-template.md b/doc/connecting-to-data/customizing-data-appearance/feature-info-template.md index 8ecc4553955..70b6b24ae16 100644 --- a/doc/connecting-to-data/customizing-data-appearance/feature-info-template.md +++ b/doc/connecting-to-data/customizing-data-appearance/feature-info-template.md @@ -30,11 +30,11 @@ The template will replace all occurrences of `{{property}}` with the value of th The result is: - + instead of: - + You can provide a template to use for the name of the collapsible section (eg. to replace `RGB` in the example above), like so: @@ -150,7 +150,7 @@ If `{{Pixel Value}}` equals to `150` and `{{feature.data.layerId}}` to `2`, the For features with time-varying table-based data structures (eg. CSV, SOS2, SDMX-JSON, if there is a time column), the feature info panel also includes a chart of the data over time, eg. - + You can place this chart in your template using `{{terria.timeSeries.chart}}`. Alternatively, you can access the following component information: From b4386ba76163e7c2e5f9540edc3d6095339cd945 Mon Sep 17 00:00:00 2001 From: Nick Forbes-Smith Date: Fri, 1 Dec 2023 09:33:38 +1100 Subject: [PATCH 7/9] update CHANGES --- CHANGES.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 31e2df3a7a5..d6bb3350a38 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,9 @@ # Change Log #### next release (8.4.0) -#### next release (8.3.10) +- **Breaking change:** Replaced `node-sass` with (dart) `sass` + - You will need to update your `TerriaMap` to use `sass` instead of `node-sass`. - [The next improvement] #### 8.3.9 - 2023-11-24 @@ -35,8 +36,6 @@ #### 8.3.7 - 2023-10-26 -- **Breaking change:** Replaced `node-sass` with (dart) `sass` - - You will need to update your `TerriaMap` to use `sass` instead of `node-sass`. - Fix `WebMapServiceCatalogItem` `allowFeaturePicking` - Allow translation of TableStylingWorkflow. - Fix "Remove all" not removing selected/picked features From d213b2c7bab30fac4df40531b4c9dabc34f92e47 Mon Sep 17 00:00:00 2001 From: Nick Forbes-Smith Date: Fri, 1 Dec 2023 10:45:51 +1100 Subject: [PATCH 8/9] swap ci-deploy branch back to main --- buildprocess/ci-deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildprocess/ci-deploy.sh b/buildprocess/ci-deploy.sh index fa0d27ad0ee..17853023a67 100644 --- a/buildprocess/ci-deploy.sh +++ b/buildprocess/ci-deploy.sh @@ -23,7 +23,7 @@ yarn add -W request@2.83.0 # Clone and build TerriaMap, using this version of TerriaJS TERRIAJS_COMMIT_HASH=$(git rev-parse HEAD) -git clone -b sass-upgrade https://github.com/TerriaJS/TerriaMap.git +git clone -b main https://github.com/TerriaJS/TerriaMap.git cd TerriaMap TERRIAMAP_COMMIT_HASH=$(git rev-parse HEAD) sed -i -e 's@"terriajs": ".*"@"terriajs": "'$GITHUB_REPOSITORY'#'${GITHUB_BRANCH}'"@g' package.json From 0c3d3a9b6c3366cd45b28aee129870338b14886c Mon Sep 17 00:00:00 2001 From: Nick Forbes-Smith Date: Fri, 1 Dec 2023 10:48:16 +1100 Subject: [PATCH 9/9] Release 8.4.0 --- CHANGES.md | 7 +++++-- package.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ff76088e3a2..2e43a9182d1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,12 +1,15 @@ # Change Log -#### next release (8.4.0) +#### next release (8.4.1) + +- [The next improvement] + +#### 8.4.0 - 2023-12-01 - **Breaking change:** Replaced `node-sass` with (dart) `sass` - You will need to update your `TerriaMap` to use `sass` instead of `node-sass`. - Added `apiColumns` to `ApiTableCatalogItem` - this can now be used to specify `responseDataPath` per table column. - `ArcGisMapServerCatalogItem` will now use "pre-cached tiles" if available if no (or all) `layers` are specified. -- [The next improvement] #### 8.3.9 - 2023-11-24 diff --git a/package.json b/package.json index 2281a4c6ea5..8cc0a7d79cd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "terriajs", - "version": "8.3.9", + "version": "8.4.0", "description": "Geospatial data visualization platform.", "license": "Apache-2.0", "engines": {