This is an automated email from the ASF dual-hosted git repository.
elizabeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 635b7a6a4d fix(loading): improve loading screen theming for dark mode
support (#35129)
635b7a6a4d is described below
commit 635b7a6a4d4ef2267cb3377abdac161a6a51ebea
Author: Elizabeth Thompson <[email protected]>
AuthorDate: Fri Oct 3 16:51:56 2025 -0700
fix(loading): improve loading screen theming for dark mode support (#35129)
Co-authored-by: Claude <[email protected]>
---
.../test/chart/components/SuperChartCore.test.tsx | 8 +++++++-
.../FiltersConfigModal/FiltersConfigModal.test.tsx | 6 +++---
superset/templates/superset/spa.html | 22 ++++++++++++++++------
3 files changed, 26 insertions(+), 10 deletions(-)
diff --git
a/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx
b/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx
index 454319dc30..c026099d13 100644
---
a/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx
+++
b/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx
@@ -203,7 +203,13 @@ describe('SuperChartCore', () => {
);
await waitFor(() => {
- expect(container).toBeEmptyDOMElement();
+ // Should not render any chart content, only the antd App wrapper
+ expect(
+ container.querySelector('.test-component'),
+ ).not.toBeInTheDocument();
+ expect(
+ container.querySelector('[data-test="chart-container"]'),
+ ).not.toBeInTheDocument();
});
});
});
diff --git
a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx
b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx
index 6995a0747d..01c50755ff 100644
---
a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx
+++
b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx
@@ -346,9 +346,9 @@ test('validates the pre-filter value', async () => {
jest.runOnlyPendingTimers();
jest.useRealTimers();
- await waitFor(() => {
- expect(screen.getByText(PRE_FILTER_REQUIRED_REGEX)).toBeInTheDocument();
- });
+ expect(
+ await screen.findByText(PRE_FILTER_REQUIRED_REGEX),
+ ).toBeInTheDocument();
}, 50000); // Slow-running test, increase timeout to 50 seconds.
// eslint-disable-next-line jest/no-disabled-tests
diff --git a/superset/templates/superset/spa.html
b/superset/templates/superset/spa.html
index 5352b16efa..787ed88256 100644
--- a/superset/templates/superset/spa.html
+++ b/superset/templates/superset/spa.html
@@ -30,6 +30,20 @@
{% block head_meta %}{% endblock %}
+ <style>
+ body {
+ background: #fff;
+ color: #000;
+ }
+
+ @media (prefers-color-scheme: dark) {
+ body {
+ background: #000;
+ color: #fff;
+ }
+ }
+ </style>
+
{% block head_css %}
{% for favicon in favicons %}
<link
@@ -85,14 +99,10 @@
<!-- Custom URL from theme -->
<img
src="{{ tokens.brandSpinnerUrl }}"
- alt="Loading..."
+ alt=""
+ aria-label="Loading"
style="{{ spinner_style }}"
/>
- {% else %}
- <!-- Fallback: This should rarely happen with new logic -->
- <div style="{{ spinner_style }}">
- Loading...
- </div>
{% endif %}
</div>
{% endblock %}