Skip to content

feat(layers): honor normalized TextLayer accessor colors - #11164

Merged
ibgreen merged 4 commits into
masterfrom
codex/normalized-text-accessors
Nov 18, 2026
Merged

ibgreen merged 4 commits into
masterfrom
codex/normalized-text-accessors

Conversation

@ibgreen

@ibgreen ibgreen commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

For #11146

Change List

  • Convert top-level TextLayer glyph, background, and border colors
  • Preserve built-in defaults and refresh children on Deck toggles
  • Document normalized inputs and test glyph and background forwarding

Verified with yarn lint and nine focused Chromium tests.


Note

Low Risk
Low risk change localized to color accessor forwarding in TextLayer, preserving backward compatibility for existing byte-based defaults and backed by unit tests.

Overview
Updates TextLayer to honor Deck's normalizedColors setting across glyph, background, and border color accessors (getColor, getBackgroundColor, and getBorderColor). Color accessors and plain arrays supplied in normalized 0–1 channels are converted to byte encoding before being passed to child sublayers, while preserving existing built-in byte defaults.

Additionally decorates sublayer color updateTriggers with a helper to ensure sublayer attributes update properly when normalizedColors is toggled.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T22:55:34.148038Z cb52d5a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ibgreen ibgreen mentioned this pull request Nov 17, 2026
22 of 52 tasks

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb52d5ac70

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Adds support for normalized glyph, background, and border colors on top-level TextLayer instances.

  • TextLayer colors now follow Deck's normalized color setting.

No actionable issues found.

Reviews (4) · Last reviewed commit: "Merge branch 'master' of github.com:visg..." · Reviewed by Greptile

@coveralls

coveralls commented Nov 17, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 82.554% (+0.02%) from 82.532% — codex/normalized-text-accessors into master

…ed-text-accessors

# Conflicts:
#	docs/whats-new.md
…ed-text-accessors

# Conflicts:
#	docs/whats-new.md
@ibgreen
ibgreen merged commit cf1d978 into master Nov 18, 2026
9 checks passed
@ibgreen
ibgreen deleted the codex/normalized-text-accessors branch November 18, 2026 00:18

@chrisgervang chrisgervang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 119a02d after merge; follow-ups below. One P1: the glyph, background and border entries still say 0–255. Still true on master. Conversion, defaults and toggle triggers are sound.

Labels: P1 settle before this is merged, P2 can follow, Non-blocking optional.


Generated by Claude Code

Comment on lines +361 to +363
On top-level TextLayer, Deck's [`normalizedColors`](../core/deck.md#normalizedcolors)
also applies to plain arrays and callback results for glyph, background, and border colors.
Omitted alpha is opaque.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P1: This paragraph renders as the end of the outlineColor entry. The getColor, getBackgroundColor and getBorderColor entries still say "Each channel is a number between 0-255", so readers of those entries get the old range.

Could we drop this paragraph and give each of the three entries the ScatterplotLayer sentence?

Details
  • "Channels use the 0–255 range by default. See Deck’s normalizedColors to use 0–1 plain arrays."
  • On master the entries are at text-layer.md:394, :459 and :470.

Generated by Claude Code

Comment thread docs/whats-new.md
IconLayer, PointCloudLayer, and ColumnLayer also honor this setting for color accessors.

SimpleMeshLayer and ScenegraphLayer instance colors honor Deck’s `normalizedColors` option.
Top-level TextLayer glyph, background, and border colors honor Deck’s `normalizedColors` option.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P2: This line and #11156's "Top-level bitmap tints..." sit outside the section's layer list. Lighting (#11171), terrain, 3D tile, fill pattern and vector tile colors are not mentioned.

Could the section be one sentence with the use case and a link to Normalized colors?


Generated by Claude Code

athomct pushed a commit to chesapeake-tech/deck.gl that referenced this pull request Nov 23, 2026
Resolve conflicts with the Arrow accessor and normalized color work on
master:

- text-layer.ts: keep TEXT_ALIGN from this branch and the color helpers
  from visgl#11164. Keep the 'arrow: row' default props from visgl#11219, and give
  getTextAlign and getLetterSpacing the same ArrowAccessor type and
  'arrow: row' default, like every other TextLayer accessor.
- text-layer.spec.ts: keep the letter spacing and alignment tests from
  this branch and the normalized color test from master.
- whats-new.md (no conflict): move the TextLayer entry into the v10
  Layers list. The automatic merge put it below the v10 separator.
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.

3 participants