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

refactor: Removes 5.0 approved legacy charts #31582

Merged

Conversation

michael-s-molina
Copy link
Member

@michael-s-molina michael-s-molina commented Dec 20, 2024

SUMMARY

As part of the 5.0 breaking window, this PR executes the following proposals:

I decided to do it all in a single PR to have a single migration for the charts. There's also many code blocks that were removed that touches multiple visualization types at the same time and it would be more complex to remove it in parts. Another important factor was the ability to execute the tests once, given that we need to check if the example charts are loaded correctly. In summary, the benefits outweigh the review complexity.

TESTING INSTRUCTIONS

  • Check the examples are loaded correctly
  • Check that the charts in your production environment are all migrated and loaded correctly

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

Description by Korbit AI

What change is being made?

Remove legacy charts (Area, Bar, Event Flow, Heatmap, Histogram, Line, Sankey, and Sankey Loop) and migrate them to their ECharts counterparts, while updating relevant tests and dependencies.

Why are these changes being made?

The legacy charts were deprecated and have been fully migrated to ECharts versions to take advantage of modern features and better maintainability, except for Event Flow and Sankey Loop charts, which have been removed due to not being actively maintained or widely used. This refactor reduces codebase clutter and ensures developers work with up-to-date and supported charting tools.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

Copy link

korbit-ai bot commented Dec 20, 2024

Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment /korbit-review.

Your admin can change your review schedule in the Korbit Console

@rusackas
Copy link
Member

@michael-s-molina michael-s-molina force-pushed the remove-approved-legacy-charts branch 2 times, most recently from efb5f49 to 80d3f75 Compare January 7, 2025 14:28
@@ -255,13 +243,16 @@ function saveExploreColorScheme(
cy.wait('@chartUpdate');
}

// FIXME: Skipping some tests as ECharts are rendered using Canvas and we cannot inspect the elements
Copy link
Member Author

Choose a reason for hiding this comment

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

@geido The color scheme tests were using a legacy chart to check the applied colors. Given that ECharts are rendered using Canvas, we'll need a solution to be able to inspect the elements. I'm skipping these tests for now and adding a FIXME comment.

Copy link
Member

Choose a reason for hiding this comment

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

It feels like we could optimize this test, too, and use example dashboards to do fewer round trips between Dashboard and Chart Editor (though, maybe optimization is secondary, and round trip testing is a worthy effort too ¯_(ツ)_/¯)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that's a good suggestion. One option I can think of to overcome the ECharts canvas problem and be able to identify color changes would be to use the Word Cloud plugin which is pure HTML. I believe the solution for this problem should be resolved in a follow-up PR. I already sent a message to @geido about this.

@michael-s-molina michael-s-molina force-pushed the remove-approved-legacy-charts branch 2 times, most recently from 159e19c to 9f29d94 Compare January 8, 2025 13:08
@github-actions github-actions bot added the risk:db-migration PRs that require a DB migration label Jan 8, 2025
@michael-s-molina michael-s-molina marked this pull request as ready for review January 8, 2025 13:08
@dosubot dosubot bot added risk:breaking-change Issues or PRs that will introduce breaking changes viz:charts Namespace | Anything related to viz types labels Jan 8, 2025
@michael-s-molina michael-s-molina force-pushed the remove-approved-legacy-charts branch from 424459a to 5cb926f Compare January 9, 2025 12:51
@michael-s-molina michael-s-molina force-pushed the remove-approved-legacy-charts branch from 5cb926f to a68cd5b Compare January 9, 2025 13:29
Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

PR of the year! Or at least the best one of the upcoming release!

@michael-s-molina
Copy link
Member Author

@betodealmeida @eschutho @mistercrunch Can you stamp this PR as code owners?

@michael-s-molina michael-s-molina merged commit 399b709 into apache:master Jan 9, 2025
51 checks passed
@rusackas
Copy link
Member

rusackas commented Jan 9, 2025

WOOHOO!!!!!

@ryepezb1
Copy link

cuando lanzan superset 5 ??

@michael-s-molina
Copy link
Member Author

@ryepezb1 You check the schedule for major releases in our Release Process.

sfirke pushed a commit to sfirke/superset that referenced this pull request Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies:npm packages plugins review:draft risk:breaking-change Issues or PRs that will introduce breaking changes risk:db-migration PRs that require a DB migration size/XXL viz:charts Namespace | Anything related to viz types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants