superset icon indicating copy to clipboard operation
superset copied to clipboard

feat(viz-type): Ag grid table plugin Integration

Open amaannawab923 opened this issue 7 months ago • 21 comments

SUMMARY

FEATURE_CHART_PLUGINS_EXPERIMENTAL=true

This pr integrates the whole ag grid table with parity to Superset Tables with all of its functionalities as listed below:

  1. Server Pagination
  2. Server Side Sorting
  3. Server Side Search
  4. Server Side Page Size Change
  5. Percentage Metrics
  6. Row limits constraints as per Superset table (Max: 500k rows with server pagination & 100k rows without server pagination)
  7. Time Comparison with Time Shift Controls as per Superset table
  8. Timestamp Formatting
  9. Allowing the columns to be re arranged 10 . Column Customisation - ( Column Alignment , Formatting , Currency Formatting)
  10. Cell bars
  11. Custom Conditional Formatter
  12. Cross Filtering

Below is the current State of Ag Grid table with all of the features:

Screenshot 2025-06-12 at 10 45 45 AM

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

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

amaannawab923 avatar May 19 '25 14:05 amaannawab923

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

korbit-ai[bot] avatar May 19 '25 14:05 korbit-ai[bot]

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.

korbit-ai[bot] avatar May 19 '25 14:05 korbit-ai[bot]

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

github-actions[bot] avatar May 21 '25 20:05 github-actions[bot]

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

github-actions[bot] avatar May 21 '25 20:05 github-actions[bot]

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

github-actions[bot] avatar May 22 '25 11:05 github-actions[bot]

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

github-actions[bot] avatar May 22 '25 11:05 github-actions[bot]

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

github-actions[bot] avatar May 22 '25 20:05 github-actions[bot]

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

github-actions[bot] avatar May 22 '25 20:05 github-actions[bot]

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

github-actions[bot] avatar Jun 06 '25 14:06 github-actions[bot]

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

github-actions[bot] avatar Jun 06 '25 14:06 github-actions[bot]

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

github-actions[bot] avatar Jun 12 '25 13:06 github-actions[bot]

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

github-actions[bot] avatar Jun 12 '25 13:06 github-actions[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 72.88%. Comparing base (76d897e) to head (00b2587). Report is 2088 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #33517       +/-   ##
===========================================
+ Coverage   60.48%   72.88%   +12.40%     
===========================================
  Files        1931      559     -1372     
  Lines       76236    40426    -35810     
  Branches     8568     4247     -4321     
===========================================
- Hits        46114    29466    -16648     
+ Misses      28017     9859    -18158     
+ Partials     2105     1101     -1004     
Flag Coverage Δ
hive 47.20% <ø> (-1.95%) :arrow_down:
javascript ?
mysql 71.87% <ø> (?)
postgres 71.93% <ø> (?)
presto 50.96% <ø> (-2.84%) :arrow_down:
python 72.85% <ø> (+9.34%) :arrow_up:
sqlite 71.45% <ø> (?)
unit 100.00% <ø> (+42.36%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Jun 12 '25 13:06 codecov[bot]

@amaannawab923 I'm not seeing any code that was moved to core to avoid duplicating code like we mentioned here. Am I missing anything?

michael-s-molina avatar Jun 12 '25 14:06 michael-s-molina

@amaannawab923 I'm not seeing any code that was moved to core to avoid duplicating code like we mentioned here. Am I missing anything?

@michael-s-molina Would be taking up the whole table migration in stages , So this PR will focus on complete table Parity And the follow up PR will take up Code deduplication for sqllab & Table V2 (Ag grid table) as the Testing efforts required are too much for complete parity with Superset table

And the follow up PR we can have testing efforts for sqllab again so nothing is broken

cc: @geido

amaannawab923 avatar Jun 12 '25 14:06 amaannawab923

@michael-s-molina Would be taking up the whole table migration in stages , So this PR will focus on complete table Parity And the follow up PR will take up Code deduplication for sqllab & Table V2 (Ag grid table) as the Testing efforts required are too much for complete parity with Superset table

@amaannawab923 @geido Are we fully committed with these migrations? The worst thing that can happen is supporting another table in the codebase. This is reminding me of the multiple select versions (7) we had in the past and the huge effort we did to unify them. Currently, with this PR we'll have 4 different table implementations:

- plugin-chart-table
- plugin-chart-ag-grid-table
- src/component/GridTable
- src/components/Table

cc @justinpark @villebro @mistercrunch @rusackas

michael-s-molina avatar Jun 12 '25 14:06 michael-s-molina

@michael-s-molina Would be taking up the whole table migration in stages , So this PR will focus on complete table Parity And the follow up PR will take up Code deduplication for sqllab & Table V2 (Ag grid table) as the Testing efforts required are too much for complete parity with Superset table

@amaannawab923 @geido Are we fully committed with these migrations? The worst thing that can happen is supporting another table in the codebase. This is reminding me of the multiple select versions (7) we had in the past and the huge effort we did to unify them. Currently, with this PR we'll have 4 different table implementations:

- plugin-chart-table
- plugin-chart-ag-grid-table
- src/component/GridTable
- src/components/Table

cc @justinpark @villebro @mistercrunch @rusackas

The migration should be pretty straight forward from here , This Ag Grid table works with the same form data as Superset Table & works out pretty well with all of the features achieving complete parity , the Migration should be pretty easy going forward

amaannawab923 avatar Jun 12 '25 14:06 amaannawab923

Migration should be pretty easy going forward

@amaannawab923 Just to be clear, there are multiple migrations:

  1. Migrating plugin-chart-table to plugin-chart-ag-grid-table
  2. Extracting common parts of plugin-chart-ag-grid-table and GridTable (used in SQL Lab) into a core component to avoid code duplication
  3. Replace src/components/Table with the core implementation

Ideally, we would have a single table component inside core that could be extended to deal with specific things like extra plugin configurations, SQL Lab specific things, etc.

michael-s-molina avatar Jun 12 '25 14:06 michael-s-molina

Migration should be pretty easy going forward

@amaannawab923 Just to be clear, there are multiple migrations:

  1. Migrating plugin-chart-table to plugin-chart-ag-grid-table
  2. Extracting common parts of plugin-chart-ag-grid-table and GridTable (used in SQL Lab) into a component in core to avoid code duplication
  3. Replace src/components/Table with the core implementation

Ideally, we would have a single table component inside core that could be extended to deal with specific things like extra plugin configurations, SQL Lab specific things, etc.

Agreed , i will try my best to wrap up all the migrations in the follow up pr Thanks for listing it down , Will make a note of it & try my best to take care of all of the points Thanks @michael-s-molina

amaannawab923 avatar Jun 12 '25 14:06 amaannawab923

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

github-actions[bot] avatar Jun 13 '25 12:06 github-actions[bot]

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

github-actions[bot] avatar Jun 13 '25 12:06 github-actions[bot]

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

github-actions[bot] avatar Jun 17 '25 11:06 github-actions[bot]

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

github-actions[bot] avatar Jun 17 '25 11:06 github-actions[bot]

This is awesome. I tested it a bit and it seems that text align is not working for string columns. It works for numbers - but only when cell bars are active.

dkrat7 avatar Jun 18 '25 08:06 dkrat7

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

github-actions[bot] avatar Jun 27 '25 09:06 github-actions[bot]

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

github-actions[bot] avatar Jun 27 '25 10:06 github-actions[bot]

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

github-actions[bot] avatar Jul 03 '25 07:07 github-actions[bot]

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

github-actions[bot] avatar Jul 03 '25 07:07 github-actions[bot]

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

github-actions[bot] avatar Jul 04 '25 10:07 github-actions[bot]

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

github-actions[bot] avatar Jul 04 '25 11:07 github-actions[bot]