Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adds legacy time support for Waterfall chart #26136

Conversation

michael-s-molina
Copy link
Member

SUMMARY

Follow-up of #25557 to add support for legacy time controls in Waterfall charts.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screenshot 2023-11-29 at 15 47 46

TESTING INSTRUCTIONS

1 - Set GENERIC_CHART_AXES feature flag to False
2 - Test if you are able to create a Waterfall chart using the legacy time controls

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

Copy link

codecov bot commented Nov 29, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (b9aaf0f) 58.93% compared to head (e2cdce7) 58.92%.
Report is 4 commits behind head on master.

Files Patch % Lines
...lugin-chart-echarts/src/Waterfall/controlPanel.tsx 0.00% 0 Missing and 2 partials ⚠️
...ugin-chart-echarts/src/Waterfall/transformProps.ts 33.33% 0 Missing and 2 partials ⚠️
...s/plugin-chart-echarts/src/Waterfall/buildQuery.ts 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #26136      +/-   ##
==========================================
- Coverage   58.93%   58.92%   -0.02%     
==========================================
  Files        1941     1941              
  Lines       75873    75888      +15     
  Branches     8447     8454       +7     
==========================================
  Hits        44714    44714              
- Misses      28984    28996      +12     
- Partials     2175     2178       +3     
Flag Coverage Δ
javascript 56.26% <28.57%> (-0.03%) ⬇️

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.

{
label: t('Query'),
expanded: true,
controlSetRows: [
['x_axis'],
['time_grain_sqla'],
[hasGenericChartAxes ? 'x_axis' : null],
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't a row value of null result in an empty DOM placeholder?
How about conditionally appending generic x-axis control?

Suggested change
[hasGenericChartAxes ? 'x_axis' : null],
...(hasGenericChartAxes ? ['x_axis', 'time_grain_sqla'] : []),

Copy link
Member Author

@michael-s-molina michael-s-molina Nov 30, 2023

Choose a reason for hiding this comment

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

Doesn't a row value of null result in an empty DOM placeholder?

It does not. This pattern is used everywhere.

How about conditionally appending generic x-axis control?

We need to add the x_axis and time_grain_sqla into different arrays.

@villebro
Copy link
Member

@michael-s-molina a general observation about this change - as we've already enabled GENERIC_CHART_AXES by default, do we really want to support non-generic mode in new viz types? This adds maintenance burden, and makes the task of deprecating those legacy controls even bigger. As an alternative, maybe we could just disable this chart type if generic chart axes is disabled?

Copy link
Member

@justinpark justinpark left a comment

Choose a reason for hiding this comment

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

LGTM upon @villebro 's approval

@michael-s-molina
Copy link
Member Author

@michael-s-molina a general observation about this change - as we've already enabled GENERIC_CHART_AXES by default, do we really want to support non-generic mode in new viz types? This adds maintenance burden, and makes the task of deprecating those legacy controls even bigger. As an alternative, maybe we could just disable this chart type if generic chart axes is disabled?

@villebro You're correct. I think there's no obligation to support non-generic mode in new viz types. I just did it for this chart because we want it at Airbnb but we didn't enable GENERIC_CHART_AXES yet. Luckily, 4.0 is coming (March 2024) to delete the legacy code and resolve our problems. We'll enable that feature flag by then.

@michael-s-molina michael-s-molina added the v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch label Dec 1, 2023
@michael-s-molina michael-s-molina merged commit f405ba0 into apache:master Dec 1, 2023
31 checks passed
michael-s-molina added a commit that referenced this pull request Dec 4, 2023
josedev-union pushed a commit to Ortege-xyz/studio that referenced this pull request Jan 22, 2024
@mistercrunch mistercrunch added 🍒 3.1.0 🍒 3.1.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Mar 8, 2024
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch 🍒 3.1.0 🍒 3.1.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants