From c53034d305355cc997957a34bbf1619a62238ac2 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sat, 1 Mar 2025 03:45:51 +0100 Subject: [PATCH 1/3] UX: center "data is loading" when adding a new point --- src/UI/Popup/AddNewPoint/AddNewPoint.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/UI/Popup/AddNewPoint/AddNewPoint.svelte b/src/UI/Popup/AddNewPoint/AddNewPoint.svelte index 7a97cad9a..8d7e36cd9 100644 --- a/src/UI/Popup/AddNewPoint/AddNewPoint.svelte +++ b/src/UI/Popup/AddNewPoint/AddNewPoint.svelte @@ -78,7 +78,7 @@ const isLoading = state.dataIsLoading let preciseCoordinate: UIEventSource<{ lon: number; lat: number }> = new UIEventSource(undefined) - let snappedToObject: UIEventSource = new UIEventSource(undefined) + let snappedToObject: UIEventSource = new UIEventSource(undefined) // Small helper variable: if the map is tapped, we should let the 'Next'-button grab some attention as users have to click _that_ to continue, not the map let preciseInputIsTapped = false @@ -172,11 +172,13 @@ {:else if $isLoading} +
+
{:else if selectedPreset === undefined} t.presetInfo.Subs({ tags })} - {state} tags={new And(selectedPreset.preset.tags)} /> From bfd68745169e5489e5622fa1b6dc4fe41019f15b Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 3 Mar 2025 01:13:06 +0100 Subject: [PATCH 2/3] Fix: wikipedia icon links now uses the "link"-special rendering which properly escapes single quotes, fix #2340 --- assets/layers/icons/icons.json | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/assets/layers/icons/icons.json b/assets/layers/icons/icons.json index 36784b3a6..504e4afac 100644 --- a/assets/layers/icons/icons.json +++ b/assets/layers/icons/icons.json @@ -18,7 +18,13 @@ "defaults", "in_favourite" ], - "render": "Wikipedia", + "render": { + "special": { + "type": "link", + "href": "https://wikipedia.org/wiki/{wikipedia}", + "text": "Wikipedia" + } + }, "condition": { "or": [ "wikipedia~*", @@ -29,7 +35,14 @@ { "#": "ignore-image-in-then", "if": "wikipedia=", - "then": "Wikidata" + "then": { + "special": { + "type": "link", + "class": "h-8", + "href": "https://www.wikidata.org/wiki/{wikidata}", + "text": "Wikidata" + } + } } ] }, From 0f897306a0ce15b86e28b56cffdd4bf0aff58b84 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 3 Mar 2025 01:21:06 +0100 Subject: [PATCH 3/3] Actions: automatically add comment on PR --- .forgejo/workflows/deploy_hosted.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.forgejo/workflows/deploy_hosted.yml b/.forgejo/workflows/deploy_hosted.yml index e999c0440..ec949998b 100644 --- a/.forgejo/workflows/deploy_hosted.yml +++ b/.forgejo/workflows/deploy_hosted.yml @@ -62,5 +62,17 @@ jobs: - name: unzipping remote file run: ssh hetzner "cd /root/staging && rm -rf ${{ github.ref_name }} && unzip ${{ github.ref_name }}.zip && rm -rf /root/public/${{ github.ref_name }} && mv /root/staging/${{ github.ref_name }}/ /root/public/ && rm ${{ github.ref_name }}.zip" + - name: Extract PR number + run: echo "PR_NUMBER=$(echo $FORGEJO_REF_NAME | cut -d'/' -f3)" >> $FORGEJO_ENV + + - name: add comment to PR + if: env.PR_NUMBER != '' + run: | + curl -X POST "https://source.mapcomplete.org/api/v1/repos/${FORGEJO_REPOSITORY}/issues/${PR_NUMBER}/comments" \ + -H "Content-Type: application/json" \ + -H "Authorization: token $FORGEJO_TOKEN" \ + -d '{"body": "This PR has been deployed and is (temporarily) available on https://builds.mapcomplete.org/${PR_NUMBER}"}' + env: + FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}