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

fix: Add scrollTopOnPagination property to Table #22115

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

geido
Copy link
Member

@geido geido commented Nov 14, 2022

SUMMARY

Fixes an issue for the Drill to detail modal which wasn't scrolling back up on pagination. It does so by adding a new property to the table component called scrollTopOnPagination.

AFTER

Supported.Charts.Dashboard.1.mp4

TESTING INSTRUCTIONS

  1. Set DRILL_TO_DETAIL feature flag to True
  2. Open a Dashboard and right click to drill to detail
  3. Scroll the table to the bottom
  4. Change page
  5. The table should scroll back up

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

@codecov
Copy link

codecov bot commented Nov 14, 2022

Codecov Report

Merging #22115 (1f6acca) into master (7c6fabb) will decrease coverage by 11.27%.
The diff coverage is 75.67%.

❗ Current head 1f6acca differs from pull request most recent head cedf75b. Consider uploading reports for the commit cedf75b to get more accurate results

@@             Coverage Diff             @@
##           master   #22115       +/-   ##
===========================================
- Coverage   67.12%   55.84%   -11.28%     
===========================================
  Files        1831     1831               
  Lines       69994    70008       +14     
  Branches     7570     7572        +2     
===========================================
- Hits        46984    39098     -7886     
- Misses      21045    28951     +7906     
+ Partials     1965     1959        -6     
Flag Coverage Δ
javascript 53.77% <50.00%> (-0.05%) ⬇️
mysql ?
postgres ?
sqlite ?

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

Impacted Files Coverage Δ
...gins/legacy-plugin-chart-world-map/src/WorldMap.js 0.00% <0.00%> (ø)
...egacy-plugin-chart-world-map/src/transformProps.js 0.00% <ø> (ø)
...c/components/Chart/DrillDetail/DrillDetailPane.tsx 82.71% <ø> (ø)
...et-frontend/src/components/TableView/TableView.tsx 82.45% <53.84%> (-1.86%) ⬇️
superset/views/base.py 60.82% <71.42%> (-14.88%) ⬇️
superset/views/core.py 35.52% <100.00%> (-40.43%) ⬇️
superset/utils/dashboard_import_export.py 0.00% <0.00%> (-100.00%) ⬇️
superset/tags/core.py 4.54% <0.00%> (-95.46%) ⬇️
superset/key_value/commands/update.py 0.00% <0.00%> (-90.91%) ⬇️
superset/key_value/commands/delete.py 0.00% <0.00%> (-87.88%) ⬇️
... and 293 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -49,6 +49,7 @@ export interface TableViewProps {
isPaginationSticky?: boolean;
showRowCount?: boolean;
scrollTable?: boolean;
scrollTopOnPagination?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should even expose a property to configure this behavior. My fear is that we would allow different behaviors throughout the app. We could follow the same approach we did with the Select component and not expose this property until a valid use case appears. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree @michael-s-molina that this should be a standard behaviour. However, I believe it makes more sense to validate that for the new component being built by @eric-briscoe rather than changing all the tables right now which may cause unwanted behaviours.

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGTM

@jinghua-qa
Copy link
Member

/testenv up FEATURE_DRILL_TO_DETAIL=true FEATURE_DASHBOARD_CROSS_FILTERS=true

@github-actions
Copy link
Contributor

@jinghua-qa Ephemeral environment spinning up at http://54.200.198.12:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@jinghua-qa jinghua-qa added the need:qa-review Requires QA review label Nov 18, 2022
Copy link
Member

@jinghua-qa jinghua-qa left a comment

Choose a reason for hiding this comment

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

LGTM

@geido geido merged commit 896c832 into master Nov 18, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
@mistercrunch mistercrunch deleted the fix/d2d-modal-scroll-top branch March 26, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels need:qa-review Requires QA review size/M 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants