Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Member Author

Choose a reason for hiding this comment

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

fix for a flaky test


// eslint-disable-next-line jest/no-disabled-tests
Expand Down
22 changes: 16 additions & 6 deletions superset/templates/superset/spa.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Comment on lines +33 to +45
Copy link

Choose a reason for hiding this comment

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

Redundant CSS causing style conflicts category Performance

Tell me more
What is the issue?

Inline CSS in the head creates redundant style application that conflicts with existing theme-based styling on the body element.

Why this matters

The body element already has inline styling with theme tokens (background-color: {{ tokens.get('colorBgBase', '#ffffff') }}), causing the browser to process and apply multiple conflicting background styles, leading to unnecessary style recalculation and potential visual flashing during theme transitions.

Suggested change ∙ Feature Preview

Remove the inline <style> block and integrate dark mode support directly into the existing body inline style using CSS custom properties or conditional template logic to avoid duplicate style processing:

<body style="margin: 0; padding: 0; background-color: {{ tokens.get('colorBgBase', '#ffffff') }}; color: {{ tokens.get('colorTextBase', '#000000') }};">
Provide feedback to improve future suggestions

Nice Catch Incorrect Not in Scope Not in coding standard Other

💬 Looking for more details? Reply to this comment to chat with Korbit.


{% block head_css %}
{% for favicon in favicons %}
<link
Expand Down Expand Up @@ -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 %}
Expand Down
Loading