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(explore): Replace url search params only if current page is Explore #20972

Merged
merged 2 commits into from
Aug 5, 2022

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Aug 4, 2022

SUMMARY

When user opens Explore and then immediately navigates back, some unexpected URL replacements happen because of logic in Explore which asynchronously replaces URL search params when form_data_key request is completed. This PR fixes that behaviour by ensuring that current page is Explore before replacing the URL

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before (I navigated back with my touchpad right after opening Explore, remained in Explore anyways and then navigating back didn't take me back to the dashboard):

Screen.Recording.2022-08-04.at.16.15.21.mov

After:

Screen.Recording.2022-08-04.at.16.12.35.mov

TESTING INSTRUCTIONS

  1. Open dashboard and then click "Edit chart"
  2. Navigate back immediately after Explore opens
  3. Verify that navigation worked as expected

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

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

@pull-request-size pull-request-size bot added size/M and removed size/S labels Aug 5, 2022
@codecov
Copy link

codecov bot commented Aug 5, 2022

Codecov Report

Merging #20972 (d6906fd) into master (34ad80c) will decrease coverage by 0.00%.
The diff coverage is 60.00%.

@@            Coverage Diff             @@
##           master   #20972      +/-   ##
==========================================
- Coverage   66.35%   66.34%   -0.01%     
==========================================
  Files        1766     1767       +1     
  Lines       67124    67150      +26     
  Branches     7129     7142      +13     
==========================================
+ Hits        44541    44553      +12     
- Misses      20759    20769      +10     
- Partials     1824     1828       +4     
Flag Coverage Δ
javascript 52.11% <60.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...ntend/src/explore/components/ExploreChartPanel.jsx 67.60% <0.00%> (-1.41%) ⬇️
.../explore/components/ExploreViewContainer/index.jsx 52.45% <75.00%> (+0.26%) ⬆️
...charts/src/Timeseries/Regular/Bar/controlPanel.tsx 31.25% <0.00%> (-4.47%) ⬇️
...dashboard/components/AddSliceCard/AddSliceCard.tsx 65.90% <0.00%> (-1.54%) ⬇️
...BigNumber/BigNumberWithTrendline/transformProps.ts 45.45% <0.00%> (-1.52%) ⬇️
...gin-chart-echarts/src/Timeseries/transformProps.ts 54.65% <0.00%> (-1.31%) ⬇️
...mponents/controls/AnnotationLayerControl/index.jsx 9.67% <0.00%> (-0.50%) ⬇️
...frontend/src/SqlLab/components/ResultSet/index.tsx 50.69% <0.00%> (-0.35%) ⬇️
superset-frontend/src/views/App.tsx 0.00% <0.00%> (ø)
...perset-frontend/src/views/CRUD/chart/ChartList.tsx 59.13% <0.00%> (ø)
... and 10 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@kgabryje kgabryje merged commit 9350bba into apache:master Aug 5, 2022
@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
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 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants