From 0148ac1d2760a872277593a63f3059dafaf49baf Mon Sep 17 00:00:00 2001 From: mitchthorson Date: Thu, 19 Dec 2024 21:11:01 -0500 Subject: [PATCH 1/4] Fix: legend resets thresholds when needed --- src/lib/maps/ColorLegend/ColorLegend.svelte | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/maps/ColorLegend/ColorLegend.svelte b/src/lib/maps/ColorLegend/ColorLegend.svelte index 8fa4af8..79c04b5 100644 --- a/src/lib/maps/ColorLegend/ColorLegend.svelte +++ b/src/lib/maps/ColorLegend/ColorLegend.svelte @@ -190,6 +190,8 @@ : scale.quantiles ? scale.quantiles() // scaleQuantile : scale.domain(); // scaleThreshold + } else { + thresholds = undefined; } $: tickFormatFn = getTickFormatFn(tickFormat, thresholds); From a0a1ecb55a0b4278f96af49db51c675f94012247 Mon Sep 17 00:00:00 2001 From: mitchthorson Date: Thu, 19 Dec 2024 21:11:27 -0500 Subject: [PATCH 2/4] use mousedown instead of click for svg polygon layer --- src/lib/maps/SVGPolygonLayer/SVGPolygonLayer.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/maps/SVGPolygonLayer/SVGPolygonLayer.svelte b/src/lib/maps/SVGPolygonLayer/SVGPolygonLayer.svelte index d089bc2..8c37409 100644 --- a/src/lib/maps/SVGPolygonLayer/SVGPolygonLayer.svelte +++ b/src/lib/maps/SVGPolygonLayer/SVGPolygonLayer.svelte @@ -163,7 +163,7 @@ stroke-width={strokeWidth / $transform.k} d={geoPathFn(feature)} on:mousemove={(e) => handleMousemove(e, feature)} - on:click={(e) => handleClick(e, feature)} + on:mousedown={(e) => handleClick(e, feature)} > {/each} From fe91295a8d536ff5eaf4aedd2d167e5fcf561b63 Mon Sep 17 00:00:00 2001 From: mitchthorson Date: Thu, 19 Dec 2024 21:12:45 -0500 Subject: [PATCH 3/4] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d33993..5b8954d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # @UrbanInstitute/dataviz-components Changelog ## Next +- Fix: Color scale resets ticks when switching from threshold scale to continuous scale +- Patch: SVGPolygonLayer uses mousedown instead of click event ## v0.12.1 - Fix: Add more specificity to several

tags to avoid CSS conflicts between and component styles From 92cc961ca5f67298e295065596d5f43761f5bd24 Mon Sep 17 00:00:00 2001 From: mitchthorson Date: Thu, 19 Dec 2024 21:21:57 -0500 Subject: [PATCH 4/4] change github action runner version --- .github/workflows/storybook-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/storybook-tests.yml b/.github/workflows/storybook-tests.yml index d776c6e..4d7bd4a 100644 --- a/.github/workflows/storybook-tests.yml +++ b/.github/workflows/storybook-tests.yml @@ -1,14 +1,14 @@ -name: 'Storybook Tests' +name: "Storybook Tests" on: push jobs: test: timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: "20.x" - name: Install dependencies run: npm ci - name: Run Vitest tests