Repository navigation
Conversation
|
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
|
|
@rusackas Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments |
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Redundant Legend Position Restorations ▹ view | 🧠 Not in standard | |
| Race condition in legend position restoration ▹ view | 🧠 Incorrect |
Files scanned
| File Path | Reviewed |
|---|---|
| superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
| // Use requestAnimationFrame instead of setTimeout for better alignment with the browser's rendering cycle | ||
| requestAnimationFrame(() => { | ||
| const echartInstance = echartRef.current?.getEchartInstance(); | ||
| if (echartInstance) { | ||
| echartInstance.dispatchAction({ | ||
| type: 'legendScroll', | ||
| scrollDataIndex: currentLegendPage, | ||
| }); | ||
| } | ||
| }); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
@rusackas Ephemeral environment spinning up at http://35.88.182.12:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup. |
|
Welp... that didn't QUITE work... seems the requestAnimationFrame is not working reliably. We could add a timeout, but this really seems to need an ECharts lifecyle (refreshed) hook of some sort. |
Hey @rusackas https://github.com/apache/superset/pull/27766/files I wrote this pr for this But maybe we can use this pr as reference |
|
Closing in favor of #33779 |
SUMMARY
Updates the ECharts handler to store (and restore) legend page, after someone clicks a legend item, so it doesn't hop back to Page 1.
Fixes #32387
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION