Skip to content

Conversation

@LuisSanchez
Copy link
Contributor

@LuisSanchez LuisSanchez commented Jan 28, 2026

SUMMARY

Removes the Stream style option from Bar charts while keeping it for Area and Line charts.

  • Removed Stream option from Bar charts: The "Stacked Style" dropdown for Bar charts now only shows "None" and "Stack" (Stream removed).
  • Backward compatibility: Existing Bar charts with Stream style remain unchanged; the option no longer appears when editing.
  • Chart type switching: When switching from a Streamed Area/Line chart to a Bar chart, the Stream value is reset to null.

Note: previous tests were flattened on "superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Bar/controlPanel.test.ts"

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE

89481-before

AFTER

89481-after-1.mov

TESTING INSTRUCTIONS

  1. Create a chart or edit a previously created one.
  2. Go to Customize -> Stacked Style
  3. Steam must not appear.

When changing from a line chart (or another one that can have Stream style) to a bar chart, the bar chart must not appear with Stream style.

ADDITIONAL INFORMATION

  • Has associated issue: Remove the Stream Style Option for Bar Charts #33820
  • 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

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 28, 2026

Code Review Agent Run #8e558f

Actionable Suggestions - 0
Review Details
  • Files reviewed - 3 · Commit Range: d0d9584..d0d9584
    • superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx
    • superset-frontend/plugins/plugin-chart-echarts/src/constants.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Bar/controlPanel.test.ts
  • 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

@netlify
Copy link

netlify bot commented Jan 28, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit d0d9584
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/697a8bab13cf110008587488
😎 Deploy Preview https://deploy-preview-37532--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

const stackControl: any = getControl('stack');
expect(stackControl).toBeDefined();
expect(stackControl.config).toBeDefined();
expect(stackControl.config.choices).toBe(BarChartStackControlOptions);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: The test asserts reference equality with toBe for choices against BarChartStackControlOptions; if the control panel clones or creates an identical array rather than reusing the same reference, the test will fail even though values are correct — use a deep equality assertion instead. [logic error]

Severity Level: Major ⚠️
- ❌ Unit test failure in Bar controlPanel test file.
- ⚠️ CI job may fail blocking merges.
Suggested change
expect(stackControl.config.choices).toBe(BarChartStackControlOptions);
expect(stackControl.config.choices).toEqual(BarChartStackControlOptions);
Steps of Reproduction ✅
1. Run the Jest test suite targeting this file:

   - npm/yarn test -- test/Timeseries/Bar/controlPanel.test.ts

   - The test with the assertion is at
   superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Bar/controlPanel.test.ts:132-137
   (test name: "should use BarChartStackControlOptions for stack control").

2. The test imports controlPanel at line 19: import controlPanel from
'../../../src/Timeseries/Regular/Bar/controlPanel';

   - getControl (defined at line 27) locates the 'stack' control and reads
   stackControl.config.choices.

3. If the implementation of src/Timeseries/Regular/Bar/controlPanel constructs a new array
(structurally identical) instead of reusing the exported constant from src/constants
(BarChartStackControlOptions, imported at lines 20-23), then stackControl.config.choices
!== BarChartStackControlOptions.

4. The assertion at line 136 uses toBe (reference equality) and will fail with a Jest diff
showing different object references even though array contents match; replacing with
toEqual prevents this brittle failure.
Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Bar/controlPanel.test.ts
**Line:** 136:136
**Comment:**
	*Logic Error: The test asserts reference equality with `toBe` for `choices` against `BarChartStackControlOptions`; if the control panel clones or creates an identical array rather than reusing the same reference, the test will fail even though values are correct — use a deep equality assertion instead.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 29, 2026

Code Review Agent Run #e1b455

Actionable Suggestions - 0
Review Details
  • Files reviewed - 3 · Commit Range: d0d9584..52f297c
    • superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx
    • superset-frontend/plugins/plugin-chart-echarts/src/constants.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Bar/controlPanel.test.ts
  • Files skipped - 0
  • Tools
    • 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

Copy link
Contributor

@alexandrusoare alexandrusoare left a comment

Choose a reason for hiding this comment

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

LGTM - just some nits

// Should have a description that includes D3 time format docs
expect(timeFormatControl.config.description).toContain('D3');
});
test('should have proper control configuration for x_axis_time_format', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about combining some of the tests? For example for x_axis_time_format, we can check all the properties in one test since we are not interacting with it rather than having 3-4 separate tests

['color_scheme'],
['time_shift_color'],
...showValueSection,
[showValueControl],
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can do the conditional inside plugins/plugin-chart-echarts/src/controls.tsx L:186?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants