Conversation
|
This PR would require some refactoring. Moving to draft for now. Will pick it up from here later when prioritized. |
|
@djbarnwal : Can you please take this one up ? |
The previous lockfile regen ran with the repo's `.npmrc` `prefer-offline=true`, so npm resolved the tree from the local cache: `resolved`/`integrity` fields were stripped and platform-specific optional dependencies outside darwin were dropped. CI's `npm ci` on linux-x64 then had no `@rolldown/binding-linux-x64-gnu` to install, so every step loading `svelte.config.js` failed with "Cannot find native binding". Restored the lockfile from `main` and regenerated with `--prefer-online`, leaving just the `mapbox-gl` entry as the diff. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
| component.specStore.update((s) => ({ ...s })); | ||
| } | ||
|
|
||
| $: if (mapReady && rows.length > 0 && mapRenderDeps) { |
There was a problem hiding this comment.
rows.length check is meant for query is loaded or not? It skips update if filters results in 0 rows. Better to check corresponding isPending directly
| map.setPaintProperty("polygons-outline", "line-color", outlineColor); | ||
| map.setPaintProperty("polygons-outline", "line-width", 2); | ||
|
|
||
| if (geoJson.features.length > 0) { |
There was a problem hiding this comment.
This will update the focus on each filter change, feels intrusive.
How about we allow to set initial view for the map in editing? We never call fitBounds after initial load.
| let mapContainer: HTMLDivElement; | ||
| let map: mapboxgl.Map | null = null; | ||
|
|
||
| const MAPBOX_TOKEN = |
There was a problem hiding this comment.
We need a better way to manage the token. @himadrisingh any suggestions?
| if (cm) measures.push({ name: cm }); | ||
| if (spec.size_measure) measures.push({ name: spec.size_measure }); | ||
|
|
||
| const enabled = |
There was a problem hiding this comment.
Does it make sense to query without a measure? If not then lets check measures as well?
| @@ -0,0 +1,403 @@ | |||
| <script lang="ts"> | |||
There was a problem hiding this comment.
Since this a new component, lets move to svelte5
| @@ -0,0 +1,109 @@ | |||
| <script lang="ts"> | |||
There was a problem hiding this comment.
Same here, move to svelte5
Checklist: