You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2026/04/28 13:21:51 UTC
(superset) 01/01: fix(theme): set color-scheme on html to fix dark mode scrollbars (#39704)
This is an automated email from the ASF dual-hosted git repository.
michael-s-molina pushed a commit to branch 6.1
in repository https://gitbox.apache.org/repos/asf/superset.git
commit e6110a8c7ba40339d03159115a3f1dc6a33e2fb2
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Tue Apr 28 09:17:11 2026 -0300
fix(theme): set color-scheme on html to fix dark mode scrollbars (#39704)
Co-authored-by: Claude Sonnet 4.6 <no...@anthropic.com>
(cherry picked from commit 7bee2afa8e43372c929fe9640cb0b9be0646e99f)
---
.../packages/superset-core/src/theme/GlobalStyles.tsx | 6 ++++++
tests/integration_tests/queries/api_tests.py | 12 +++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/superset-frontend/packages/superset-core/src/theme/GlobalStyles.tsx b/superset-frontend/packages/superset-core/src/theme/GlobalStyles.tsx
index 33a30a9fa61..7c750d2087f 100644
--- a/superset-frontend/packages/superset-core/src/theme/GlobalStyles.tsx
+++ b/superset-frontend/packages/superset-core/src/theme/GlobalStyles.tsx
@@ -29,14 +29,20 @@ import '@fontsource/ibm-plex-mono/600.css';
/* eslint-enable import/extensions */
import { css, useTheme, Global } from '@emotion/react';
+import { useThemeMode } from './utils/themeUtils';
export const GlobalStyles = () => {
const theme = useTheme();
+ const isDark = useThemeMode();
return (
<Global
key={`global-${theme.colorLink}`}
styles={css`
// SPA
+ html {
+ color-scheme: ${isDark ? 'dark' : 'light'};
+ }
+
html,
body,
#app {
diff --git a/tests/integration_tests/queries/api_tests.py b/tests/integration_tests/queries/api_tests.py
index a4ed1ddc697..86da8432800 100644
--- a/tests/integration_tests/queries/api_tests.py
+++ b/tests/integration_tests/queries/api_tests.py
@@ -97,9 +97,11 @@ class TestQueryApi(SupersetTestCase):
self.get_random_string(),
sql=f"SELECT col1, col2 from table{cx}", # noqa: S608
rows=cx,
- status=QueryStatus.SUCCESS
- if (cx % 2) == 0
- else QueryStatus.RUNNING,
+ status=(
+ QueryStatus.SUCCESS
+ if (cx % 2) == 0
+ else QueryStatus.RUNNING
+ ),
)
)
queries.append(
@@ -433,7 +435,7 @@ class TestQueryApi(SupersetTestCase):
"order_direction": "asc",
"filters": [{"col": "sql_editor_id", "opr": "eq", "value": test_editor_id}],
}
- uri = f"api/v1/query/?q={rison.dumps(arguments)}"
+ uri = f"api/v1/query/?q={prison.dumps(arguments)}"
rv = self.client.get(uri)
assert rv.status_code == 200
data = rv.get_json()
@@ -442,7 +444,7 @@ class TestQueryApi(SupersetTestCase):
# descending should be the reverse
arguments["order_direction"] = "desc"
- uri = f"api/v1/query/?q={rison.dumps(arguments)}"
+ uri = f"api/v1/query/?q={prison.dumps(arguments)}"
rv = self.client.get(uri)
assert rv.status_code == 200
data = rv.get_json()