-
Notifications
You must be signed in to change notification settings - Fork 16.5k
feat(ag-grid-table): Enable Time Shift feature for AG Grid Table #37072
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
Conversation
The Time Shift (time comparison) feature was already implemented in the AG Grid Table plugin but was gated behind the TableV2TimeComparisonEnabled feature flag. This commit enables the feature and adds dashboard override support to bring AG Grid Table to full parity with the normal Table plugin. Changes: - Removed feature flag checks from controlPanel.tsx and transformProps.ts - Added extra_form_data.time_compare override logic in buildQuery.ts so dashboard-level time shifts can override chart-level settings - Added merge() for extra_form_data in transformProps.ts to properly propagate dashboard filter overrides to the chart This allows users to: - Use Time Comparison controls in Aggregate mode (1 week ago, 1 month ago, etc.) - See expanded columns (Main, #, △, %) for each metric - Have dashboard filters override chart-level time shift settings Related PRs: #33947, #34014
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review Agent Run #727e7f
Actionable Suggestions - 1
-
superset-frontend/plugins/plugin-chart-ag-grid-table/src/buildQuery.ts - 1
- Incorrect override logic · Line 125-130
Review Details
-
Files reviewed - 3 · Commit Range:
d87b930..d87b930- superset-frontend/plugins/plugin-chart-ag-grid-table/src/buildQuery.ts
- superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx
- superset-frontend/plugins/plugin-chart-ag-grid-table/src/transformProps.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 evan@preset.io.
Documentation & Help
| if ( | ||
| extra_form_data?.time_compare && | ||
| !timeOffsets.includes(extra_form_data.time_compare) | ||
| ) { | ||
| timeOffsets = [extra_form_data.time_compare]; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The added condition prevents overriding when the dashboard time_compare value is already present in the chart's timeOffsets array, but the comment indicates dashboard should OVERRIDE chart settings. This could lead to inconsistent behavior where dashboard filters don't take precedence if the value matches one in the chart's multiple shifts. If dashboard sets a single shift, it should always replace the chart's timeOffsets.
Code suggestion
Check the AI-generated fix before applying
| if ( | |
| extra_form_data?.time_compare && | |
| !timeOffsets.includes(extra_form_data.time_compare) | |
| ) { | |
| timeOffsets = [extra_form_data.time_compare]; | |
| } | |
| if (extra_form_data?.time_compare) { | |
| timeOffsets = [extra_form_data.time_compare]; | |
| } |
Code Review Run #727e7f
Should Bito avoid suggestions like this for future reviews? (Manage Rules)
- Yes, avoid them
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
CodeAnt AI finished reviewing your PR. |
Code Review Agent Run #4d9883Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
The Time Shift (time comparison) feature was already implemented in the AG Grid Table plugin but was gated behind the TableV2TimeComparisonEnabled feature flag. This commit enables the feature and adds dashboard override support to bring AG Grid Table to full parity with the normal Table plugin.
Changes:
This allows users to:
Related PRs: #33947, #34014
SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION