Skip to content

Features/UI visual updates - #112

Merged
Jasper-Maris merged 5 commits into
mainfrom
features/ui-visual-updates
Sep 8, 2026
Merged

Jasper-Maris merged 5 commits into
mainfrom
features/ui-visual-updates

Conversation

@Jasper-Maris

@Jasper-Maris Jasper-Maris commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Fixed: #110 #96 #95 #93 #108

Map Viewer now auto selects the first available numeric data column.
When user selects non numeric data column the color palette is set to a solid color (blue by default).
The min/max color value input now behaves like the min/max inputs in the chart/plot options.
Map Viewer no longer draws NaN/NULL values.
Map Viewer shows an info popup about data column selection upon first draw for new query.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Auto colour scale bounds can stay stale after query reruns in auto mode, and one UI text does not match requirements.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the Map Viewer UI state and Legend behavior to improve default colouring, scale control, and missing-value handling.

Changes:

  • Auto-select the first numeric data column for Map Viewer, and fall back to a solid palette for non-numeric columns.
  • Treat legend min/max as nullable “auto” values, and hide points with NULL or NaN values.
  • Replace a placeholder table description string in the query builder table selector.
File summaries
File Description
src/routes/visualisations/map-viewer/+page.svelte Pass auto min/max values to the Legend component.
src/lib/stores/stored-query.ts Change stored map legend min/max to `number
src/lib/components/visualisation/MapViewController.svelte.ts Implement numeric default selection, auto min/max state, solid palette fallback, and hide NULL/NaN points.
src/lib/components/query-builder/QueryBuilderTableSelector.svelte Replace placeholder table description text.
src/lib/components/legend/legend.svelte Support nullable min/max inputs with “auto” placeholder and strip rendering from effective bounds.
src/lib/components/legend/legend-defaults.ts Remove legacy fixed default min/max constants.
src/lib/colors/palettes.ts Add a default solid palette ID for non-numeric column fallback.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 460 to +464
await this.showDataColumn(true, fitCamera);
return;
}

// No valid selection: pick the first pickable column, so points render
// at once instead of leaving the user to open the dropdown first.
// No valid selection: pick the first numeric column, so the legend has a
Comment thread src/lib/components/query-builder/QueryBuilderTableSelector.svelte

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Auto-scale refresh and solid palette fallback need fixes to prevent stale ranges and incorrect colors on re-run.

Review details

Suppressed comments (3)

Previously missed (2) — in code that hasn't changed since the last review.

src/lib/components/visualisation/MapViewController.svelte.ts:462

  • Refresh auto color-scale range when the query result changes and the min or max field is set to auto (null). Otherwise, the map can paint with a stale min/max after a re-run.
    src/lib/components/visualisation/MapViewController.svelte.ts:531
  • Update rgbTable when you switch to the solid fallback palette. Otherwise, the map can paint with the previous palette's RGB table until the page effect runs.

src/lib/components/query-builder/QueryBuilderTableSelector.svelte:81

  • Issue #96 asks for the placeholder to read "No description". This string still differs from the requested text.
                    <p class="table-description">
                         Description not available
                    </p>
  • Files reviewed: 7/7 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@Jasper-Maris
Jasper-Maris merged commit 4453c0e into main Sep 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

map viewer min max values

3 participants