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 12 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.77419% with 36 lines in your changes missing coverage. Please review.

Project coverage is 70.55%. Comparing base (76d897e) to head (e5d9e67).
Report is 617 commits behind head on master.

Files Patch % Lines
...t-frontend/src/components/GridTable/HeaderMenu.tsx 73.07% 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.55%   +10.07%     
===========================================
  Files        1931     1977       +46     
  Lines       76236    79352     +3116     
  Branches     8568     9070      +502     
===========================================
+ Hits        46114    55990     +9876     
+ Misses      28017    21135     -6882     
- Partials     2105     2227      +122     
Flag Coverage Δ
hive 48.97% <ø> (-0.20%) ⬇️
javascript 58.41% <76.77%> (+0.70%) ⬆️
mysql 76.73% <ø> (?)
postgres 76.82% <ø> (?)
presto 53.52% <ø> (-0.28%) ⬇️
python 83.68% <ø> (+20.19%) ⬆️
sqlite 76.29% <ø> (?)
unit 60.33% <ø> (+2.71%) ⬆️

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.

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.

3 participants