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] Push browser history on pagination in react listviews #9624

Merged
merged 3 commits into from Apr 28, 2020

Conversation

lilykuang
Copy link
Member

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

Before:

  • When browser button back was hit, it went to prior view not prior paginated page

After:

  • When browser button back was hit, it went to prior paginated page

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE:
https://www.loom.com/share/2aa499227bb044fc9728a6910f01f650
AFTER:
https://www.loom.com/share/f049bbb13cc848d2ad14bdce11bf437d

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

@rusackas @nytai

@willbarrett
Copy link
Member

It might be worth pushing a change to trigger a rebuild - looks like the JS build failed due to a flake (Javascript OOM)

@codecov-io
Copy link

codecov-io commented Apr 23, 2020

Codecov Report

Merging #9624 into master will decrease coverage by 0.00%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9624      +/-   ##
==========================================
- Coverage   70.52%   70.52%   -0.01%     
==========================================
  Files         574      574              
  Lines       30152    30160       +8     
  Branches     3060     3072      +12     
==========================================
+ Hits        21265    21270       +5     
- Misses       8776     8778       +2     
- Partials      111      112       +1     
Flag Coverage Δ
#cypress 53.71% <ø> (+<0.01%) ⬆️
#javascript 58.77% <66.66%> (+<0.01%) ⬆️
#python 70.56% <ø> (ø)
Impacted Files Coverage Δ
superset-frontend/src/welcome/App.jsx 0.00% <ø> (ø)
superset-frontend/src/components/ListView/utils.ts 82.95% <66.66%> (-2.05%) ⬇️
superset-frontend/src/SqlLab/actions/sqlLab.js 66.81% <0.00%> (ø)
...set-frontend/src/dashboard/util/getDropPosition.js 92.06% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6cedaa...fa14413. Read the comment docs.

@dpgaspar
Copy link
Member

Triggered a rerun for the failed tests

Copy link
Member

@nytai nytai left a comment

Choose a reason for hiding this comment

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

LGTM. It's a working solution though a little repetitive. It looks like there's some issues syncing state, since we're storing it in various places (query params, internal filters, actual state that triggers data fetching). Part of the reason for this fragmentation is due to changing requirements (holding state until submit button is pressed, storing state in queryparams, etc.). Once the dust settles on these listview redesigns we should come back and try to consolidate state as much as possible. eg, we can create a hook called useStateWithQueryParam which would abstract away the queryParams state for us.

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM!

@rusackas rusackas merged commit c474ea8 into apache:master Apr 28, 2020
@rusackas rusackas deleted the tai/debug-push-state branch April 28, 2020 04:37
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.37.0 labels Feb 28, 2024
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 size/M 🚢 0.37.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants