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

feat(sqllab): Replace FilterableTable by AgGrid Table #29900

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

justinpark
Copy link
Member

@justinpark justinpark commented Aug 9, 2024

SUMMARY

Following up #27645, This commit includes the migration of the component used for SQLLab results from the ant-table component to the ag-grid component.
During this process, the existing logic(getWidthsForColumns) that measured column size to adjust the width was removed because it was not only performance-intensive but also unnecessary, as the resizable column option in ag-grid allows users to adjust the width as needed.
Additionally, other property options were modified to ensure compatibility with ag-grid. Moreover, a column menu feature was added, enabling users to pin specific columns and apply filters.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screenshot 2024-08-09 at 7 33 03 AM

After:

Screenshot 2024-08-20 at 11 46 53 AM

Header menu (Actions):

Image

TESTING INSTRUCTIONS

Go to SQL Lab and run a query to explore the data

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

@dosubot dosubot bot added change:frontend Requires changing the frontend sqllab Namespace | Anything related to the SQL Lab labels Aug 9, 2024
@kasiazjc
Copy link
Contributor

@justinpark this looks great! I think I might have asked this question before, so apologies if I did, but for how long custom table settings are kept - just for session and just for this specific query?

@yousoph
Copy link
Member

yousoph commented Aug 12, 2024

/testenv up

Copy link
Contributor

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

@justinpark
Copy link
Member Author

justinpark commented Aug 13, 2024

how long custom table settings are kept - just for session and just for this specific query?

You're right. This will only apply to the current query in the current session. I considered saving it, but I thought it might be better not to, as revisiting the query later when the memory has faded could cause confusion with different items being displayed in the query results.

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 76.47059% with 36 lines in your changes missing coverage. Please review.

Project coverage is 70.95%. Comparing base (76d897e) to head (741b5b1).
Report is 1165 commits behind head on master.

Files with missing lines Patch % Lines
...t-frontend/src/components/GridTable/HeaderMenu.tsx 72.00% 10 Missing and 4 partials ⚠️
...perset-frontend/src/components/GridTable/index.tsx 70.96% 9 Missing ⚠️
...erset-frontend/src/components/GridTable/Header.tsx 85.41% 3 Missing and 4 partials ⚠️
...-frontend/src/components/FilterableTable/index.tsx 73.91% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #29900       +/-   ##
===========================================
+ Coverage   60.48%   70.95%   +10.47%     
===========================================
  Files        1931     2004       +73     
  Lines       76236    80970     +4734     
  Branches     8568     9242      +674     
===========================================
+ Hits        46114    57456    +11342     
+ Misses      28017    21265     -6752     
- Partials     2105     2249      +144     
Flag Coverage Δ
hive 48.78% <ø> (-0.39%) ⬇️
javascript 59.00% <76.47%> (+1.29%) ⬆️
mysql 76.55% <ø> (?)
postgres 76.60% <ø> (?)
presto 53.30% <ø> (-0.50%) ⬇️
python 83.82% <ø> (+20.33%) ⬆️
sqlite 76.07% <ø> (?)
unit 60.92% <ø> (+3.30%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -126,6 +126,8 @@
"@visx/xychart": "^3.5.1",
"abortcontroller-polyfill": "^1.7.5",
"ace-builds": "^1.35.4",
"ag-grid-community": "31.0.3",
Copy link
Member

Choose a reason for hiding this comment

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

Can we use the latest 32.2 version?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@Hokwang
Copy link

Hokwang commented Nov 11, 2024

when is the release target date and release version ?

@justinpark justinpark force-pushed the feat--ag-grid-for-filterable-table branch from 61e0bb6 to 741b5b1 Compare December 10, 2024 23:14
@eschutho
Copy link
Member

when is the release target date and release version ?

@Hokwang this will most likely be released in 5.0 around April 2025.

@eschutho
Copy link
Member

/testenv up

Copy link
Contributor

@eschutho Processing your ephemeral environment request here.

Copy link
Contributor

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

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 dependencies:npm size/XXL sqllab Namespace | Anything related to the SQL Lab
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants