From 605e578fa1c4f3f58fc2707f8089f170d8a38a49 Mon Sep 17 00:00:00 2001 From: Jin Igarashi Date: Fri, 29 Dec 2023 16:01:18 +0000 Subject: [PATCH 1/3] fix: adjust font size option. now normal is 1rem, small is 0.75rem and medium is 1.5rem. --- .changeset/real-ravens-juggle.md | 5 +++ .../src/lib/Accordion/Accordion.stories.ts | 4 +- .../src/lib/Accordion/Accordion.svelte | 7 +++- .../maplibre/OptionalPropertyEditor.svelte | 1 - .../maplibre/circle/VectorCircle.svelte | 26 +++--------- .../fill-extrusion/VectorFillExtrusion.svelte | 21 ++-------- .../maplibre/fill/VectorPolygon.svelte | 10 ++--- .../maplibre/heatmap/VectorHeatmap.svelte | 26 +++--------- .../maplibre/line/VectorLine.svelte | 12 ++---- .../maplibre/raster/RasterLegend.svelte | 42 ++++--------------- .../maplibre/symbol/IconImage.svelte | 1 - .../maplibre/symbol/VectorSymbol.svelte | 14 +++---- .../pages/map/data/DataVectorCard.svelte | 2 +- .../pages/map/layers/LayerTemplate.svelte | 2 +- .../map/layers/vector/VectorLabelPanel.svelte | 32 ++++---------- .../src/components/util/ColorMapPicker.svelte | 1 - .../src/components/util/DataPreview.svelte | 1 - sites/geohub/src/routes/+layout.svelte | 1 - .../src/routes/(app)/+layout.svelte | 1 - 19 files changed, 56 insertions(+), 153 deletions(-) create mode 100644 .changeset/real-ravens-juggle.md diff --git a/.changeset/real-ravens-juggle.md b/.changeset/real-ravens-juggle.md new file mode 100644 index 0000000000..dbdda45572 --- /dev/null +++ b/.changeset/real-ravens-juggle.md @@ -0,0 +1,5 @@ +--- +"@undp-data/svelte-undp-design": patch +--- + +fix: adjust font size option. now normal is 1rem, small is 0.75rem and medium is 1.5rem. diff --git a/packages/svelte-undp-design/src/lib/Accordion/Accordion.stories.ts b/packages/svelte-undp-design/src/lib/Accordion/Accordion.stories.ts index 225b15d868..3afcedcec1 100644 --- a/packages/svelte-undp-design/src/lib/Accordion/Accordion.stories.ts +++ b/packages/svelte-undp-design/src/lib/Accordion/Accordion.stories.ts @@ -21,9 +21,9 @@ const meta = { fontSize: { type: 'string', description: 'Font size of the accordion header title.', - defaultValue: 'medium', + defaultValue: 'normal', control: { type: 'select' }, - options: ['small', 'medium'] + options: ['small', 'normal', 'medium'] }, headerIcon: { type: 'string', diff --git a/packages/svelte-undp-design/src/lib/Accordion/Accordion.svelte b/packages/svelte-undp-design/src/lib/Accordion/Accordion.svelte index 71a47529eb..dbaed71d3a 100644 --- a/packages/svelte-undp-design/src/lib/Accordion/Accordion.svelte +++ b/packages/svelte-undp-design/src/lib/Accordion/Accordion.svelte @@ -1,7 +1,7 @@ @@ -16,7 +16,10 @@ isExpanded = !isExpanded; }} > -

+

{#if headerIcon} {/if} diff --git a/sites/geohub/src/components/maplibre/OptionalPropertyEditor.svelte b/sites/geohub/src/components/maplibre/OptionalPropertyEditor.svelte index fc170c4e8f..fba763128b 100644 --- a/sites/geohub/src/components/maplibre/OptionalPropertyEditor.svelte +++ b/sites/geohub/src/components/maplibre/OptionalPropertyEditor.svelte @@ -40,7 +40,6 @@ } .tooltip { - font-size: 13px; z-index: 10; min-width: 350px; max-width: 400px; diff --git a/sites/geohub/src/components/maplibre/circle/VectorCircle.svelte b/sites/geohub/src/components/maplibre/circle/VectorCircle.svelte index 4c5486c568..1eb7c8943d 100644 --- a/sites/geohub/src/components/maplibre/circle/VectorCircle.svelte +++ b/sites/geohub/src/components/maplibre/circle/VectorCircle.svelte @@ -64,11 +64,7 @@ {#if !$legendReadonly} - +

@@ -77,11 +73,7 @@ - +
@@ -90,11 +82,7 @@
- +
@@ -103,11 +91,7 @@
- +
@@ -117,7 +101,7 @@
- +
diff --git a/sites/geohub/src/components/maplibre/fill-extrusion/VectorFillExtrusion.svelte b/sites/geohub/src/components/maplibre/fill-extrusion/VectorFillExtrusion.svelte index ce89886170..f80e3075dd 100644 --- a/sites/geohub/src/components/maplibre/fill-extrusion/VectorFillExtrusion.svelte +++ b/sites/geohub/src/components/maplibre/fill-extrusion/VectorFillExtrusion.svelte @@ -62,11 +62,7 @@ {#if !$legendReadonly} - +
@@ -75,11 +71,7 @@
- +
>
@@ -88,11 +80,7 @@
- +
@@ -106,7 +94,6 @@
@@ -120,7 +107,7 @@
- +
diff --git a/sites/geohub/src/components/maplibre/fill/VectorPolygon.svelte b/sites/geohub/src/components/maplibre/fill/VectorPolygon.svelte index 3ea4ffc821..f8cc21b0a8 100644 --- a/sites/geohub/src/components/maplibre/fill/VectorPolygon.svelte +++ b/sites/geohub/src/components/maplibre/fill/VectorPolygon.svelte @@ -60,7 +60,7 @@ {#if !$legendReadonly} - +
@@ -69,11 +69,7 @@
- +
@@ -82,7 +78,7 @@
- +
diff --git a/sites/geohub/src/components/maplibre/heatmap/VectorHeatmap.svelte b/sites/geohub/src/components/maplibre/heatmap/VectorHeatmap.svelte index fe0bd5b1b4..4b1bbcf7c6 100644 --- a/sites/geohub/src/components/maplibre/heatmap/VectorHeatmap.svelte +++ b/sites/geohub/src/components/maplibre/heatmap/VectorHeatmap.svelte @@ -39,11 +39,7 @@ {#if !$legendReadonly} - +
@@ -52,11 +48,7 @@
- +
@@ -68,11 +60,7 @@
- +
@@ -84,11 +72,7 @@
- +
@@ -101,7 +85,7 @@
- +
diff --git a/sites/geohub/src/components/maplibre/line/VectorLine.svelte b/sites/geohub/src/components/maplibre/line/VectorLine.svelte index 857009a2e8..471649b690 100644 --- a/sites/geohub/src/components/maplibre/line/VectorLine.svelte +++ b/sites/geohub/src/components/maplibre/line/VectorLine.svelte @@ -63,7 +63,7 @@ {#if !$legendReadonly} - +
@@ -72,7 +72,7 @@
- +
@@ -81,11 +81,7 @@
- +
@@ -94,7 +90,7 @@
- +
diff --git a/sites/geohub/src/components/maplibre/raster/RasterLegend.svelte b/sites/geohub/src/components/maplibre/raster/RasterLegend.svelte index 525cad0562..3151f0c448 100644 --- a/sites/geohub/src/components/maplibre/raster/RasterLegend.svelte +++ b/sites/geohub/src/components/maplibre/raster/RasterLegend.svelte @@ -163,7 +163,7 @@ {:else} {#if !isRgbTile} - +
{#if !manualClassificationEnabled}
@@ -206,11 +206,7 @@ {/if} {#if !layerHasUniqueValues && !isRgbTile} - +
@@ -220,11 +216,7 @@
{/if} - +
@@ -243,7 +235,7 @@
- +
@@ -252,11 +244,7 @@
- +
@@ -267,11 +255,7 @@
- +
@@ -282,7 +266,7 @@
- +
@@ -291,11 +275,7 @@
- +
@@ -304,11 +284,7 @@
- +
diff --git a/sites/geohub/src/components/maplibre/symbol/IconImage.svelte b/sites/geohub/src/components/maplibre/symbol/IconImage.svelte index 8e9db50b1d..cef04ba753 100644 --- a/sites/geohub/src/components/maplibre/symbol/IconImage.svelte +++ b/sites/geohub/src/components/maplibre/symbol/IconImage.svelte @@ -139,7 +139,6 @@ } .tooltip { - font-size: 13px; z-index: 10; width: 300px; height: 250px; diff --git a/sites/geohub/src/components/maplibre/symbol/VectorSymbol.svelte b/sites/geohub/src/components/maplibre/symbol/VectorSymbol.svelte index d256df9f4e..686f03063b 100644 --- a/sites/geohub/src/components/maplibre/symbol/VectorSymbol.svelte +++ b/sites/geohub/src/components/maplibre/symbol/VectorSymbol.svelte @@ -62,7 +62,7 @@ {#if !$legendReadonly} - +
@@ -71,7 +71,7 @@
- +
@@ -80,7 +80,7 @@
- +
@@ -89,11 +89,7 @@
- +
@@ -114,7 +110,7 @@
- +
diff --git a/sites/geohub/src/components/pages/map/data/DataVectorCard.svelte b/sites/geohub/src/components/pages/map/data/DataVectorCard.svelte index 9d5f985d36..031afe6249 100644 --- a/sites/geohub/src/components/pages/map/data/DataVectorCard.svelte +++ b/sites/geohub/src/components/pages/map/data/DataVectorCard.svelte @@ -118,7 +118,7 @@ 1 ? layer.layer : feature.properties.name} bind:isExpanded - fontSize={isShowInfo ? 'medium' : 'small'} + fontSize={isShowInfo ? 'normal' : 'small'} >
{#if !isExpanded} diff --git a/sites/geohub/src/components/pages/map/layers/LayerTemplate.svelte b/sites/geohub/src/components/pages/map/layers/LayerTemplate.svelte index 3cb93571ef..64c58d1021 100644 --- a/sites/geohub/src/components/pages/map/layers/LayerTemplate.svelte +++ b/sites/geohub/src/components/pages/map/layers/LayerTemplate.svelte @@ -180,7 +180,7 @@ {/if} {clean(layer.name)} diff --git a/sites/geohub/src/components/pages/map/layers/vector/VectorLabelPanel.svelte b/sites/geohub/src/components/pages/map/layers/vector/VectorLabelPanel.svelte index a3bcd00e18..a83737cc1f 100644 --- a/sites/geohub/src/components/pages/map/layers/vector/VectorLabelPanel.svelte +++ b/sites/geohub/src/components/pages/map/layers/vector/VectorLabelPanel.svelte @@ -86,7 +86,7 @@ {#if targetLayer}
- +
@@ -98,7 +98,7 @@ {#if textFieldValue && $map.getLayer(layer.id)} {@const fieldType = getTextFieldDataType($map, layer, textFieldValue)} - +
@@ -107,7 +107,7 @@
- +
@@ -119,7 +119,6 @@ {#if fieldType && ['number', 'float'].includes(fieldType)}
@@ -133,11 +132,7 @@ {/if} - +
- +
@@ -166,11 +157,7 @@
- +
@@ -184,7 +171,6 @@ {#if ['fill', 'line', 'fill-extrusion'].includes(style.type)}
@@ -207,11 +193,7 @@ {/if} - +
diff --git a/sites/geohub/src/components/util/ColorMapPicker.svelte b/sites/geohub/src/components/util/ColorMapPicker.svelte index bfd85d5c03..7a61c32c0f 100644 --- a/sites/geohub/src/components/util/ColorMapPicker.svelte +++ b/sites/geohub/src/components/util/ColorMapPicker.svelte @@ -158,7 +158,6 @@ } .tooltip { - font-size: 13px; z-index: 10; width: 300px; } diff --git a/sites/geohub/src/components/util/DataPreview.svelte b/sites/geohub/src/components/util/DataPreview.svelte index 8a04541265..e368249806 100644 --- a/sites/geohub/src/components/util/DataPreview.svelte +++ b/sites/geohub/src/components/util/DataPreview.svelte @@ -44,7 +44,6 @@ @import 'tippy.js/themes/light.css'; .tooltip { - // font-size: 13px; z-index: 10; width: 400px; } diff --git a/sites/geohub/src/routes/+layout.svelte b/sites/geohub/src/routes/+layout.svelte index e97d92cfeb..f79b5c5129 100644 --- a/sites/geohub/src/routes/+layout.svelte +++ b/sites/geohub/src/routes/+layout.svelte @@ -42,7 +42,6 @@ /* mobile viewport bug fix */ min-height: -webkit-fill-available; font-family: ProximaNova, sans-serif; - font-size: 13px; } html { diff --git a/sites/static-image-api/src/routes/(app)/+layout.svelte b/sites/static-image-api/src/routes/(app)/+layout.svelte index e27d325360..61abe61b60 100644 --- a/sites/static-image-api/src/routes/(app)/+layout.svelte +++ b/sites/static-image-api/src/routes/(app)/+layout.svelte @@ -82,7 +82,6 @@ /* mobile viewport bug fix */ min-height: -webkit-fill-available; font-family: ProximaNova, sans-serif; - font-size: 13px; } html { From 1de13d6e9649f4df2c87a5dd265defac926f9974 Mon Sep 17 00:00:00 2001 From: Jin Igarashi Date: Fri, 29 Dec 2023 16:16:51 +0000 Subject: [PATCH 2/3] fix: made chevron icon for layer tab accordion smaller --- .../pages/map/layers/LayerTemplate.svelte | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sites/geohub/src/components/pages/map/layers/LayerTemplate.svelte b/sites/geohub/src/components/pages/map/layers/LayerTemplate.svelte index 64c58d1021..dbc90da24d 100644 --- a/sites/geohub/src/components/pages/map/layers/LayerTemplate.svelte +++ b/sites/geohub/src/components/pages/map/layers/LayerTemplate.svelte @@ -35,7 +35,6 @@ const dispatch = createEventDispatcher(); export let layer: Layer; - export let hideToggleButton = false; export let showEditButton = false; if (!('isExpanded' in layer)) { @@ -164,20 +163,17 @@
{ - if (hideToggleButton) return; isExpanded = !isExpanded; }} > - {#if !hideToggleButton} -
- -
- {/if} +
+ +
-