From 21a109b1a87947f5195eacb578c710c4bad2f7e8 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 17 Jun 2025 12:13:15 +0200 Subject: [PATCH 1/7] Scripts: Fix build --- scripts/single_build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/single_build.sh b/scripts/single_build.sh index ab10c56189..ffdb0c7458 100755 --- a/scripts/single_build.sh +++ b/scripts/single_build.sh @@ -9,8 +9,7 @@ if [ $# -eq 0 ] fi npm run prep:layeroverview -npm run refresh:layeroverview -npm run generate:layeroverview +npm run reset:layeroverview npm run test npm run generate:layouts @@ -44,7 +43,7 @@ sed -i "s/\/\/ LAYOUT.ADD_CONFIG/layout.enableMoreQuests = false/" index_"$THEME export NODE_OPTIONS=--max-old-space-size=20000 -vite build --sourcemap --config vite_single.config.js || { echo 'Vite build failed' ; exit 1; } +npx vite build --sourcemap --config vite_single.config.js || { echo 'Vite build failed' ; exit 1; } cp -r assets/layers/ dist/assets/layers/ From 7119d98af41eb653bda86609457b78d34cecd769 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 17 Jun 2025 12:33:37 +0200 Subject: [PATCH 2/7] Fix: fix crashes in image related code --- src/UI/Image/ImageOperations.svelte | 2 +- src/UI/Image/NearbyImages.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UI/Image/ImageOperations.svelte b/src/UI/Image/ImageOperations.svelte index 46b8d2dd36..e1123bfa44 100644 --- a/src/UI/Image/ImageOperations.svelte +++ b/src/UI/Image/ImageOperations.svelte @@ -60,7 +60,7 @@ class="pointer-events-none absolute bottom-0 left-0 flex w-full flex-wrap items-end justify-between" >
- +
diff --git a/src/UI/Image/NearbyImages.svelte b/src/UI/Image/NearbyImages.svelte index 9b66d109d6..98e811210f 100644 --- a/src/UI/Image/NearbyImages.svelte +++ b/src/UI/Image/NearbyImages.svelte @@ -157,7 +157,7 @@ type: "Feature", geometry: { type: "Point", coordinates: GeoOperations.centerpointCoordinates(feature) }, properties: { - name: layer.title?.GetRenderValue(feature.properties).Subs(feature.properties).txt, + name: layer.title?.GetRenderValue(feature.properties)?.Subs(feature.properties)?.txt ?? "Feature", focus: true, }, }, From 3c9fcdf425e878a1c5310e00f8811c7cbce4ece3 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 17 Jun 2025 12:33:52 +0200 Subject: [PATCH 3/7] Tactile_model: add subject:wikidata --- .../layers/tactile_model/tactile_model.json | 78 ++++++++++++------- 1 file changed, 49 insertions(+), 29 deletions(-) diff --git a/assets/layers/tactile_model/tactile_model.json b/assets/layers/tactile_model/tactile_model.json index 495afcf8b1..85a75d0e85 100644 --- a/assets/layers/tactile_model/tactile_model.json +++ b/assets/layers/tactile_model/tactile_model.json @@ -7,6 +7,9 @@ "it": "Modelli tattili", "cs": "Hmatové modely" }, + "title": { + "en": "Tactile model" + }, "description": { "en": "Layer showing tactile models, three-dimensional models of the surrounding area.", "de": "Ebene mit dreidimensionalen ertastbaren Modellen der Umgebung.", @@ -63,30 +66,16 @@ "tagRenderings": [ "images", { - "id": "description", + "id": "subject", "question": { - "en": "What does this tactile model show?", - "de": "Was zeigt dieses taktile Modell?", - "ca": "Què mostra aquest model tàctil?", - "it": "Cosa mostra questo modello tattile?", - "cs": "Co tento hmatový model ukazuje?" + "en": "What is depicted by this model?" }, "freeform": { - "key": "blind:description:en", - "placeholder": { - "en": "e.g. Tactile model of the city center", - "de": "z.B. Taktiles Modell des Stadtzentrums", - "ca": "P. ex. Model tàctil del centre de la ciutat", - "it": "es. Modello tattile del centro città", - "cs": "např. hmatový model centra města" - } + "key": "subject:wikidata", + "type": "wikidata" }, "render": { - "en": "Description: {blind:description:en}.", - "de": "Beschreibung: {blind:description:en}.", - "ca": "Descripció: {blind:description:en}.", - "it": "Descrizione: {blind:description:en}.", - "cs": "Popis: {blind:description:en}." + "*": "{wikipedia(subject:wikidata)}" } }, { @@ -143,11 +132,11 @@ "cs": "Tento model má popis v Braillově písmu v {language()}" }, "render_single_language": { - "en": "This model has a braille description in {language}", - "de": "Dieses Modell hat eine Beschreibung in Brailleschrift in {language}", - "ca": "Aquest model té una descripció en braille en {language}", - "it": "Questo modello ha una descrizione in braille in {language}", - "cs": "Tento model má popis v Braillově písmu v {language}" + "en": "This model has a braille description in {language()}", + "de": "Dieses Modell hat eine Beschreibung in Brailleschrift in {language()}", + "ca": "Aquest model té una descripció en braille en {language()}", + "it": "Questo modello ha una descrizione in braille in {language()}", + "cs": "Tento model má popis v Braillově písmu v {language()}" } } } @@ -161,6 +150,9 @@ "it": "Ci sono lettere in rilievo che descrivono il modello?", "cs": "Je tu text vystouplými písmeny popisující model?" }, + "questionHint": { + "en": "Embossed letters are letters as normally read by seeing people, but which are protrude from the surface and might thus also be read by blind people" + }, "mappings": [ { "if": "embossed_letters=yes", @@ -206,11 +198,11 @@ "cs": "Tento model má text vystouplými písmeny v {language()}" }, "render_single_language": { - "en": "This model has embossed letters in {language}", - "de": "Dieses Modell hat geprägte Buchstaben in {language}", - "ca": "Aquest model té lletres en relleu en {language}", - "it": "Questo modello ha lettere in rilievo in {language}", - "cs": "Tento model má text vystouplými písmeny v {language}" + "en": "This model has embossed letters in {language()}", + "de": "Dieses Modell hat geprägte Buchstaben in {language()}", + "ca": "Aquest model té lletres en relleu en {language()}", + "it": "Questo modello ha lettere in rilievo in {language()}", + "cs": "Tento model má text vystouplými písmeny v {language()}" } } } @@ -242,6 +234,34 @@ "cs": "Tento model má měřítko {scale}." } }, + { + "id": "description", + "question": { + "en": "What does this tactile model show?", + "de": "Was zeigt dieses taktile Modell?", + "ca": "Què mostra aquest model tàctil?", + "it": "Cosa mostra questo modello tattile?", + "cs": "Co tento hmatový model ukazuje?" + }, + "freeform": { + "key": "blind:description:en", + "placeholder": { + "en": "e.g. Tactile model of the city center", + "de": "z.B. Taktiles Modell des Stadtzentrums", + "ca": "P. ex. Model tàctil del centre de la ciutat", + "it": "es. Modello tattile del centro città", + "cs": "např. hmatový model centra města" + } + }, + "render": { + "en": "Description: {blind:description:en}.", + "de": "Beschreibung: {blind:description:en}.", + "ca": "Descripció: {blind:description:en}.", + "it": "Descrizione: {blind:description:en}.", + "cs": "Popis: {blind:description:en}." + } + }, + "website" ], "deletion": true, From 6b8bbc9c50f645117752f2277241256c54ee2ad1 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 17 Jun 2025 12:36:53 +0200 Subject: [PATCH 4/7] chore(release): 0.52.0 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32134bd30d..9db2c460d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [0.52.0](https://source.mapcomplete.org/MapComplete/MapComplete/compare/v0.51.12...v0.52.0) (2025-06-17) + + +### Bug Fixes + +* fix crashes in image related code ([7119d98](https://source.mapcomplete.org/MapComplete/MapComplete/commits/7119d98af41eb653bda86609457b78d34cecd769)) + ### [0.51.12](https://source.mapcomplete.org/MapComplete/MapComplete/compare/v0.51.11...v0.51.12) (2025-06-16) diff --git a/package-lock.json b/package-lock.json index a9eb842708..16c649e2e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mapcomplete", - "version": "0.51.12", + "version": "0.52.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mapcomplete", - "version": "0.51.12", + "version": "0.52.0", "hasInstallScript": true, "license": "GPL-3.0-or-later", "dependencies": { diff --git a/package.json b/package.json index 261599a4ec..51db94031b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapcomplete", - "version": "0.51.12", + "version": "0.52.0", "repository": "https://source.mapcomplete.org/MapComplete/MapComplete", "description": "A small website to edit OSM easily", "bugs": "hhttps://source.mapcomplete.org/MapComplete/MapComplete/issues", From d7dbd3a9088055b2a5e49f6b0bd7dd78c2ddf82c Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 17 Jun 2025 13:25:13 +0200 Subject: [PATCH 5/7] Scripts: fix single build --- scripts/single_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/single_build.sh b/scripts/single_build.sh index ffdb0c7458..cca3a449cc 100755 --- a/scripts/single_build.sh +++ b/scripts/single_build.sh @@ -38,7 +38,7 @@ fi rm index.html cp "$THEME.html" index.html -sed -i "s/input,/input: {index:\".\/index.html\", land: \".\/land.html\"}/" vite_single.config.js +sed -i "s/input,/input: {index:\".\/index.html\", land: \".\/land.html\"},/" vite_single.config.js sed -i "s/\/\/ LAYOUT.ADD_CONFIG/layout.enableMoreQuests = false/" index_"$THEME".ts From bfc01dbfe45423c82fda46208c12c6c5beb0e258 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 17 Jun 2025 13:40:06 +0200 Subject: [PATCH 6/7] Scripts: attempt to fix single build --- .forgejo/workflows/deploy_single_theme.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/deploy_single_theme.yml b/.forgejo/workflows/deploy_single_theme.yml index 1bd65d75b6..91956a8563 100644 --- a/.forgejo/workflows/deploy_single_theme.yml +++ b/.forgejo/workflows/deploy_single_theme.yml @@ -33,14 +33,19 @@ jobs: run: | BRANCH=${{ github.ref_name }} THEME=${BRANCH:6} - mv "dist_$THEME" ${{ github.ref_name }} - zip ${{ github.ref_name }}.zip -r ${{ github.ref_name }}/* + zip $THEME.zip -r dist_$THEME/* - name: uploading file - run: scp ${{ github.ref_name }}.zip hetzner:/root/staging/ + run: | + BRANCH=${{ github.ref_name }} + THEME=${BRANCH:6} + scp $THEME.zip hetzner:/root/staging/ - name: unzipping remote file - run: ssh hetzner "cd /root/staging && unzip ${{ github.ref_name }}.zip && rm -rf /root/single_theme_builds/${{ github.ref_name }} && mv /root/staging/${{ github.ref_name }}/ /root/single_theme_builds/ && rm ${{ github.ref_name }}.zip" + run: | + BRANCH=${{ github.ref_name }} + THEME=${BRANCH:6} + ssh hetzner "cd /root/staging && unzip $THEME.zip && rm -rf /root/single_theme_builds/$THEME && mv /root/staging/$THEME/ /root/single_theme_builds/ && rm $THEME.zip" From dac07090b465ff0224fa40bbb83d40b6fec9d320 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 17 Jun 2025 15:03:59 +0200 Subject: [PATCH 7/7] Scripts: attempt to fix single build --- .forgejo/workflows/deploy_single_theme.yml | 2 +- scripts/single_build.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/deploy_single_theme.yml b/.forgejo/workflows/deploy_single_theme.yml index 91956a8563..8b0671397b 100644 --- a/.forgejo/workflows/deploy_single_theme.yml +++ b/.forgejo/workflows/deploy_single_theme.yml @@ -45,7 +45,7 @@ jobs: run: | BRANCH=${{ github.ref_name }} THEME=${BRANCH:6} - ssh hetzner "cd /root/staging && unzip $THEME.zip && rm -rf /root/single_theme_builds/$THEME && mv /root/staging/$THEME/ /root/single_theme_builds/ && rm $THEME.zip" + ssh hetzner "cd /root/staging && unzip $THEME.zip && rm -rf /root/single_theme_builds/$THEME && mv /root/staging/dist_$THEME/ /root/single_theme_builds/$THEME && rm $THEME.zip" diff --git a/scripts/single_build.sh b/scripts/single_build.sh index cca3a449cc..6282fb2ddb 100755 --- a/scripts/single_build.sh +++ b/scripts/single_build.sh @@ -8,7 +8,6 @@ if [ $# -eq 0 ] echo "No arguments given. Expected a themename" fi -npm run prep:layeroverview npm run reset:layeroverview npm run test npm run generate:layouts @@ -39,7 +38,7 @@ rm index.html cp "$THEME.html" index.html sed -i "s/input,/input: {index:\".\/index.html\", land: \".\/land.html\"},/" vite_single.config.js -sed -i "s/\/\/ LAYOUT.ADD_CONFIG/layout.enableMoreQuests = false/" index_"$THEME".ts +sed -i "s/\/\/ LAYOUT.ADD_CONFIG/theme.enableMoreQuests = false/" index_"$THEME".ts export NODE_OPTIONS=--max-old-space-size=20000