Skip to content

Conversation

@gabotorresruiz
Copy link
Contributor

@gabotorresruiz gabotorresruiz commented Aug 27, 2025

SUMMARY

This PR addresses theming and visual issues in Time-series charts while significantly improving the TimeTable component architecture through comprehensive refactoring:

Theming Fixes:

  • Fixed visual styling issues in Time-series charts
  • Resolved functional bugs affecting chart rendering
  • Improved consistency with Ant Design theming tokens

Component Structure Improvements:

  • Converted JavaScript files to TypeScript files
  • Split monolithic TimeTable component into smaller, testable components
  • Extracted inline components into separate modules with dedicated test files
  • Reorganized utility functions into dedicated folders with comprehensive tests

BEFORE/AFTER SCREENSHOTS

Before:
wrong_icon

After:
correct_icon


Before:
time_series_wrong

After:
time_series_correct


Before:
wrong_info_icon

After:
correct_info_icon


Before:
wrong_visual_drag

After:
correct_visual_drag


Before:
image

After:
image


Before:
bad_visuals_dark_mode_period_pivot

After:
image

TESTING INSTRUCTIONS

  1. Navigate to a Time-series Table chart (or create a new one)
  2. Verify charts render correctly with proper theming
  3. Test value cell formatting and color coding functionality
  • You can also test that the Time-series Period Pivot chart is also rendering as expected with theming

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

@korbit-ai
Copy link

korbit-ai bot commented Aug 27, 2025

Korbit doesn't automatically review large (3000+ lines changed) pull requests such as this one. If you want me to review anyway, use /korbit-review.

@gabotorresruiz
Copy link
Contributor Author

/korbit-review

@dosubot dosubot bot added change:frontend Requires changing the frontend viz:charts:timetable Related to the Time Table chart labels Aug 27, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Performance Inefficient Array Reversal ▹ view ✅ Fix detected
Performance Redundant Type Conversions Per Render ▹ view ✅ Fix detected
Performance Inefficient Array Length Access ▹ view ✅ Fix detected
Performance Suboptimal Array Slice Usage ▹ view ✅ Fix detected
Performance Memoize URL Template Rendering ▹ view ✅ Fix detected
Design Mixed presentation and data transformation concerns ▹ view ✅ Fix detected
Functionality Unsafe Type Assertion in MetricOption ▹ view ✅ Fix detected
Performance Inefficient Double Iteration for Sum Calculation ▹ view ✅ Fix detected
Security Unsafe URL Template Rendering ▹ view 🧠 Not in scope
Functionality Incorrect Time Value Sorting ▹ view ✅ Fix detected
Files scanned

Due to the exceptionally large size of this PR, I've limited my review to the following files:

File Path Reviewed
superset-frontend/src/visualizations/TimeTable/components/LeftCell/index.ts
superset-frontend/packages/superset-ui-core/src/validator/validateNonEmpty.ts
superset-frontend/packages/superset-ui-core/src/components/Tooltip/index.tsx
superset-frontend/src/visualizations/TimeTable/components/Sparkline/index.ts
superset-frontend/src/visualizations/TimeTable/components/ValueCell/index.ts
superset-frontend/src/visualizations/TimeTable/components/SparklineCell/index.ts
superset-frontend/src/visualizations/TimeTable/components/FormattedNumber/index.ts
superset-frontend/src/visualizations/TimeTable/utils/colorUtils/index.ts
superset-frontend/src/visualizations/TimeTable/utils/rowProcessing/index.ts
superset-frontend/src/visualizations/TimeTable/utils/sortUtils/index.ts
superset-frontend/src/visualizations/TimeTable/constants.ts
superset-frontend/packages/superset-ui-core/src/components/IconTooltip/index.tsx
superset-frontend/src/visualizations/TimeTable/utils/sparklineHelpers/index.ts
superset-frontend/src/visualizations/TimeTable/utils/valueCalculations/index.ts
superset-frontend/src/visualizations/TimeTable/utils/sparklineDataUtils/index.ts
superset-frontend/src/visualizations/TimeTable/components/LeftCell/mustache.d.ts
superset-frontend/src/visualizations/TimeTable/index.ts
superset-frontend/src/visualizations/TimeTable/components/index.ts
superset-frontend/src/visualizations/TimeTable/components/FormattedNumber/FormattedNumber.tsx
superset-frontend/src/visualizations/TimeTable/utils/rowProcessing/rowProcessing.ts
superset-frontend/src/visualizations/TimeTable/utils/index.ts
superset-frontend/src/visualizations/TimeTable/types.ts
superset-frontend/src/visualizations/TimeTable/components/LeftCell/LeftCell.tsx
superset-frontend/src/visualizations/TimeTable/components/Sparkline/Sparkline.tsx
superset-frontend/src/visualizations/TimeTable/components/ValueCell/ValueCell.tsx
superset-frontend/src/visualizations/TimeTable/utils/colorUtils/colorUtils.ts
superset-frontend/src/visualizations/TimeTable/utils/sortUtils/sortUtils.ts
superset-frontend/plugins/legacy-preset-chart-nvd3/src/ReactNVD3.jsx
superset-frontend/src/visualizations/TimeTable/utils/sparklineDataUtils/sparklineDataUtils.ts
superset-frontend/src/visualizations/TimeTable/utils/sparklineHelpers/sparklineHelpers.ts
superset-frontend/src/explore/components/ControlHeader.tsx
superset-frontend/src/visualizations/TimeTable/utils/valueCalculations/valueCalculations.ts
superset-frontend/src/components/SQLEditorWithValidation/index.tsx
superset-frontend/src/explore/components/controls/CollectionControl/index.jsx
superset-frontend/src/visualizations/TimeTable/TimeTable.tsx
superset-frontend/src/explore/components/controls/OptionControls/index.tsx
superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.jsx
superset-frontend/src/visualizations/TimeTable/components/SparklineCell/SparklineCell.tsx
superset-frontend/src/explore/components/ControlPanelsContainer.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.

Loving Korbit!? Share us on LinkedIn Reddit and X

@gabotorresruiz gabotorresruiz force-pushed the fix/time-series-table-visuals branch from 30871f0 to 887ccb9 Compare August 27, 2025 18:49
@gabotorresruiz gabotorresruiz force-pushed the fix/time-series-table-visuals branch from 887ccb9 to ab7d74f Compare August 27, 2025 19:09
@github-actions
Copy link
Contributor

@sadpandajoe Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments

(Array.isArray(v) && v.length === 0)
) {
return t('cannot be empty');
return t('Cannot be empty');
Copy link
Member

Choose a reason for hiding this comment

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

Did we confirm that this isn't in any translation files that need to be updated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You’re right, but I don’t think we should handle this here. I’ll revert the change, and we can address it later in a separate ticket along with the necessary translation updates.

@github-actions
Copy link
Contributor

@sadpandajoe Ephemeral environment spinning up at http://50.112.49.144:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup.

body: {
overflow: 'hidden',
textOverflow: 'ellipsis',
textAlign: 'center',
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 this affect all tooltips? Do we want everything to be center aligned?

Copy link
Member

Choose a reason for hiding this comment

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

yup careful on touching core components as will ripple through the app...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, my bad @sadpandajoe @mistercrunch. I was just testing something. I still think tooltip texts looks better center-aligned lol, but that’s not my call to make. Reverting this change

@sadpandajoe
Copy link
Member

@kasiazjc @yousoph i've spun up an ephemeral if you'd like to take a look at it

@gabotorresruiz gabotorresruiz force-pushed the fix/time-series-table-visuals branch from b04dabd to 8ae1898 Compare August 28, 2025 02:31
@github-actions
Copy link
Contributor

@sadpandajoe Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments

@github-actions
Copy link
Contributor

@sadpandajoe Ephemeral environment spinning up at http://44.251.1.215:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup.

Comment on lines -50 to -51
mouseEnterDelay={0.3}
mouseLeaveDelay={0.15}
Copy link
Member

Choose a reason for hiding this comment

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

Do we not need these delays anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @msyavuz! If we want this to behave the same as the other tooltips, we don’t need those delays. If we prefer to keep two different behaviors, we can leave it as is.

Looping in @kasiazjc and @yousoph to hear their thoughts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @msyavuz, I went a step further, I added support for configuring those delays when needed, while keeping the same default values if nothing is passed. This way, the problem should be solved without changing the existing behavior. Please take a look at my latest commit --> 6281e5f

@msyavuz msyavuz added 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR and removed testenv-up labels Sep 1, 2025
@github-actions github-actions bot added 🎪 6281e5f 🚦 building Environment 6281e5f status: building 🎪 6281e5f 📅 2025-09-01T19-28 Environment 6281e5f created at 2025-09-01T19-28 🎪 6281e5f ⌛ 24h Environment 6281e5f expires after 24h 🎪 6281e5f 🤡 msyavuz Environment 6281e5f requested by msyavuz and removed 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR labels Sep 1, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2025

🎪 Showtime is building environment on GHA for 6281e5f

@github-actions github-actions bot added 🎪 6281e5f 🚦 deploying Environment 6281e5f status: deploying 🎪 6281e5f 🚦 running Environment 6281e5f status: running 🎪 🎯 6281e5f Active environment pointer - 6281e5f is receiving traffic and removed 🎪 6281e5f 🚦 building Environment 6281e5f status: building 🎪 6281e5f 🚦 deploying Environment 6281e5f status: deploying 🎪 6281e5f 🚦 running Environment 6281e5f status: running 🎪 🎯 6281e5f Active environment pointer - 6281e5f is receiving traffic labels Sep 1, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2025

🎪 Showtime deployed environment on GHA for 6281e5f

Environment: http://34.219.194.154:8080 (admin/admin)
Lifetime: 24h auto-cleanup
Updates: New commits create fresh environments automatically

@github-actions github-actions bot added the 🎪 6281e5f 🌐 34.219.194.154:8080 Environment 6281e5f URL: http://34.219.194.154:8080 (click to visit) label Sep 1, 2025
Copy link
Member

@msyavuz msyavuz left a comment

Choose a reason for hiding this comment

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

LGTM! Tested and works fine.

@msyavuz msyavuz merged commit d183969 into apache:master Sep 2, 2025
70 checks passed
sadpandajoe pushed a commit that referenced this pull request Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:frontend Requires changing the frontend packages plugins size/XXL viz:charts:timetable Related to the Time Table chart 🎪 6281e5f 🤡 msyavuz Environment 6281e5f requested by msyavuz 🎪 6281e5f 🚦 running Environment 6281e5f status: running 🎪 6281e5f ⌛ 24h Environment 6281e5f expires after 24h 🎪 6281e5f 🌐 34.219.194.154:8080 Environment 6281e5f URL: http://34.219.194.154:8080 (click to visit) 🎪 6281e5f 📅 2025-09-01T19-28 Environment 6281e5f created at 2025-09-01T19-28

Projects

Development

Successfully merging this pull request may close these issues.

4 participants