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.78%. Comparing base (76d897e) to head (61e0bb6).
Report is 960 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.78%   +10.29%     
===========================================
  Files        1931     1985       +54     
  Lines       76236    79965     +3729     
  Branches     8568     9146      +578     
===========================================
+ Hits        46114    56601    +10487     
+ Misses      28017    21139     -6878     
- Partials     2105     2225      +120     
Flag Coverage Δ
hive 49.00% <ø> (-0.17%) ⬇️
javascript 58.56% <76.47%> (+0.85%) ⬆️
mysql 76.76% <ø> (?)
postgres 76.89% <ø> (?)
presto 53.49% <ø> (-0.32%) ⬇️
python 83.91% <ø> (+20.43%) ⬆️
sqlite 76.34% <ø> (?)
unit 60.70% <ø> (+3.07%) ⬆️

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

@justinpark justinpark force-pushed the feat--ag-grid-for-filterable-table branch from e5d9e67 to c4ae211 Compare October 2, 2024 17:00
@Hokwang
Copy link

Hokwang commented Nov 11, 2024

when is the release target date and release version ?

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.

5 participants