Skip to content

Improve color scale legend layout and hover details - #11239

Merged
ibgreen merged 5 commits into
masterfrom
codex/color-scale-legend-descriptions
Nov 19, 2026
Merged

ibgreen merged 5 commits into
masterfrom
codex/color-scale-legend-descriptions

Conversation

@ibgreen

@ibgreen ibgreen commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Change List

  • Compact legend rows and align labels with scale bars
  • Show rounded values, swatches, and scale descriptions on hover
  • Add optional wrapping for categorical swatches
  • Demonstrate categorical, continuous, and quantile scales
  • Update documentation and widget tests

Verified with lint, Chromium widget tests, and the local website preview.


Note

Low Risk
Changes are isolated to the experimental color scale widget's presentation and interaction layers, with no impact on core rendering or data processing.

Overview
Enhances _ColorScaleWidget with interactive hover and focus inspections, a compact two-column grid aligning layer labels alongside scales, and a new categoricalLayout configuration option.

Continuous color ramps and quantile bins now display a portal-rendered tooltip (ColorSample) showing sampled values or break ranges, color swatches, scale classifications, and descriptions. Quantile bins also receive keyboard focus and accessibility attributes.

Adds support for wrapping categorical swatches horizontally via categoricalLayout: 'wrap'. Viewport width bounds, disclosure caret indicators, and corresponding widget tests and documentation have also been added.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 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-19T15:28:22.809523Z 94cab41 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.

@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: 94cab4171c

ℹ️ 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".

Comment thread modules/widgets/src/stylesheet.css Resolved
Comment thread modules/widgets/src/stylesheet.css Resolved
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no outstanding issues were found.

Summary

The PR makes color legends more compact and adds clearer hover and keyboard details.

  • Color ramps and quantile bins show their values and colors on hover.
  • Scale names sit beside compact bars, with quantile colors kept in view.
  • Category swatches can wrap across rows.

The previous findings are addressed. No new issues found.

Reviews (4) · Last reviewed commit: "Contain scrolling on the legend scrollpo..." · Reviewed by Greptile

Comment thread modules/widgets/src/stylesheet.css Resolved
Comment thread modules/widgets/src/stylesheet.css Resolved
Comment thread modules/widgets/src/stylesheet.css Resolved
@coveralls

coveralls commented Nov 19, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 82.638% (-0.01%) from 82.648% — codex/color-scale-legend-descriptions into master

@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 13ac619. Configure here.

Comment thread modules/widgets/src/stylesheet.css Resolved
@ibgreen
ibgreen merged commit 158ea86 into master Nov 19, 2026
9 checks passed
@ibgreen
ibgreen deleted the codex/color-scale-legend-descriptions branch November 19, 2026 16:05

@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 02bcefe after merge; follow-ups below. No P1s.

The legend no longer disappears while accessors re-evaluate: _getResolvedColorScales() keeps the last applied scales, and a test covers it. The panel and hover sample use the --menu-* theme variables.

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


Generated by Claude Code

Comment on lines +225 to +226
aria-label={description}
tabIndex={0}

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: Screen readers may announce nothing when a bin gets focus. ARIA 1.2 does not allow aria-label on a span with no role, and browsers often ignore it. The continuous ramp has no keyboard path to its hover value.

Could we give each bin role="img", and make the ramp focusable with arrow-key steps?

Details
  • aria-label="Quantile scale" on the wrapping div (line 220) has the same problem.
  • Still the same on master (color-scale-widget.tsx:256-261).

Generated by Claude Code

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