Skip to content

Conversation

@gabotorresruiz
Copy link
Contributor

SUMMARY

The Ace Editor text selection highlight in SQL Lab uses colorPrimaryBgHover, which is too similar to the active line color (colorPrimaryBg). This makes text selection nearly invisible, especially when selecting text on the current line.

Changes:

  • Added a new optional theme token colorEditorSelection to SupersetSpecificTokens interface
  • Updated AsyncAceEditor to use colorEditorSelection with fallback to colorPrimaryBgHover for backwards compatibility

This allows theme configurations to specify a distinct selection color while maintaining backwards compatibility with existing themes.

BEFORE/AFTER SCREENSHOTS

Before:
image

image

After:
image

image

TESTING INSTRUCTIONS

  1. Go to SQL Lab
  2. Write some SQL (e.g., SELECT * FROM table)
  3. Select text on that line

To test with a custom color, add to your superset_config.py:

THEME_DEFAULT = {
    "token": {
        "colorEditorSelection": "#fff5cf",
    }
}

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 6, 2026

Code Review Agent Run #47a449

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 044d2a8..044d2a8
    • superset-frontend/packages/superset-core/src/ui/theme/types.ts
    • superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/index.tsx
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot bot added change:frontend Requires changing the frontend global:theming Related to theming Superset labels Jan 6, 2026
@netlify
Copy link

netlify bot commented Jan 6, 2026

Deploy Preview for superset-docs-preview canceled.

Name Link
🔨 Latest commit 8d2abc2
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/695d8efef940cb00084275d9

@codeant-ai-for-open-source
Copy link
Contributor

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Theme persistence
    Ensure this new token is included in theme export/import, default theme objects, and any theme editor/schema. If omitted from serialization or defaults, custom selection colors will be lost when saving/loading themes.

  • Robust fallback
    The new theme token colorEditorSelection is accessed via nullish coalescing to colorPrimaryBgHover. Confirm theme typings (SupersetSpecificTokens) include colorEditorSelection and consider a final hard-coded fallback to avoid passing undefined into CSS if both tokens are missing.

  • Runtime fallback
    The new field's JSDoc states it "Defaults to colorPrimaryBgHover if not specified", but the type addition alone does not implement this fallback. Every consumer (e.g., AsyncAceEditor) must explicitly use a fallback (nullish-coalescing) to avoid regressions when the token is absent in a theme.

  • Selection contrast
    The PR changes only the selection background but does not ensure the selected text color provides sufficient contrast with the new background. Verify selected text remains readable across themes (light/dark and custom colorEditorSelection values).

  • Naming / CSS variable consistency
    Verify the new token's name fits established naming conventions and mapping to generated CSS variables. Confirm downstream code that builds CSS variables or applies tokens handles this property (and its absence) consistently.

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI finished reviewing your PR.

@gabotorresruiz gabotorresruiz force-pushed the fix/sql-lab-highlight-text-color branch from 044d2a8 to 8d2abc2 Compare January 6, 2026 22:38
@pull-request-size pull-request-size bot added size/S and removed size/XS labels Jan 6, 2026
@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 6, 2026

Code Review Agent Run #4f1046

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 8d2abc2..8d2abc2
    • superset-frontend/packages/superset-core/src/ui/theme/types.ts
    • superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/index.tsx
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@gabotorresruiz gabotorresruiz force-pushed the fix/sql-lab-highlight-text-color branch from 8d2abc2 to d0837ad Compare January 7, 2026 17:01
@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.17%. Comparing base (9aff89c) to head (d0837ad).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #36932       +/-   ##
===========================================
+ Coverage        0   68.17%   +68.17%     
===========================================
  Files           0      639      +639     
  Lines           0    47659    +47659     
  Branches        0     5204     +5204     
===========================================
+ Hits            0    32493    +32493     
- Misses          0    13886    +13886     
- Partials        0     1280     +1280     
Flag Coverage Δ
hive 43.09% <ø> (?)
mysql 66.18% <ø> (?)
postgres 66.23% <ø> (?)
presto 46.69% <ø> (?)
python 68.14% <ø> (?)
sqlite 65.94% <ø> (?)
unit 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 7, 2026

Code Review Agent Run #a39927

Actionable Suggestions - 0
Review Details
  • Files reviewed - 3 · Commit Range: d0837ad..d0837ad
    • superset-frontend/packages/superset-core/src/ui/theme/types.ts
    • superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/index.tsx
    • superset/config.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • Eslint (Linter) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:frontend Requires changing the frontend global:theming Related to theming Superset packages size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant