Skip to content

feat: pilot Deck-wide normalized color inputs - #11141

Merged
ibgreen merged 6 commits into
masterfrom
codex/scatterplot-normalized-colors
Nov 16, 2026
Merged

ibgreen merged 6 commits into
masterfrom
codex/scatterplot-normalized-colors

Conversation

@ibgreen

@ibgreen ibgreen commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

For #11146

Background

Apps can opt into 0–1 plain-array colors through a single Deck setting. The pilot covers ScatterplotLayer, LineLayer, and ArcLayer, including accessor fallbacks when those layers use Arrow columns. Built-in byte defaults, typed arrays, binary inputs, and GPU formats retain their encoding.

Change List

  • Add DeckProps.normalizedColors and propagate it through layer context
  • Apply the convention to Scatterplot, Line, and Arc accessors
  • Refresh attributes and column fallbacks when the convention changes
  • Unit tests cover runtime updates, typed inputs, and byte defaults
  • Documentation lists supported layers and byte quantization

Verified with yarn lint, focused Chromium attribute and layer tests, and Node Arrow accessor and lifecycle tests.


Note

Low Risk
The change is an opt-in feature with default-off behavior, preserving existing color conventions and binary data paths.

Overview
Adds a new opt-in normalizedColors boolean prop to Deck (defaulting to false) that configures top-level layers to interpret plain JavaScript arrays in color accessors as normalized 0–1 float channels instead of 0–255 bytes.

Values are clamped and converted to bytes internally for GPU attribute storage and GPU vector column fallbacks. The pilot is scoped to top-level ScatterplotLayer, LineLayer, and ArcLayer; composite sublayers, built-in defaults, typed arrays, binary buffers, and Arrow columns retain their conventional encodings. Attribute updates and column preparations are automatically invalidated and recalculated when normalizedColors changes on Deck.

Reviewed by Cursor Bugbot for commit 25cb7e3. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable new issues remain.

Summary

Adds opt-in Deck.normalizedColors support for plain-array color constants and callbacks in the pilot layers.

  • Top-level color arrays can use 0–1 channels.
  • Arrow-backed layers normalize plain-array color fallbacks too.

All three earlier findings are addressed: the release note and shared-default comments are present, and composite children no longer adopt the top-level color setting. No new actionable issues were found.

Reviews (4) · Last reviewed commit: "Merge master and retain Arrow chunk reus..." · Reviewed by Greptile

@coveralls

coveralls commented Nov 15, 2026 •

Copy link
Copy Markdown

Coverage Status

No base build to compare — codex/scatterplot-normalized-colors into master

@ibgreen ibgreen mentioned this pull request Nov 16, 2026
22 of 52 tasks
@ibgreen ibgreen changed the title feat(layers): add normalizedColors to ScatterplotLayer feat: pilot Deck-wide normalized color inputs Nov 16, 2026
Comment thread modules/core/src/lib/layer.ts Resolved

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 17a4e4c. Configure here.

Comment thread modules/core/src/lib/layer.ts Resolved
@ibgreen
ibgreen merged commit dbfac3d into master Nov 16, 2026
9 checks passed
@ibgreen
ibgreen deleted the codex/scatterplot-normalized-colors branch November 16, 2026 03:38
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.

2 participants