-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
refactor: Renders Explore in SPA #20572
refactor: Renders Explore in SPA #20572
Conversation
24e34fe
to
83535e0
Compare
Codecov Report
@@ Coverage Diff @@
## master #20572 +/- ##
==========================================
+ Coverage 66.80% 66.81% +0.01%
==========================================
Files 1754 1751 -3
Lines 65566 65553 -13
Branches 6933 6935 +2
==========================================
- Hits 43802 43801 -1
+ Misses 20010 19995 -15
- Partials 1754 1757 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@michael-s-molina Thank you very much for this long awaited PR |
@@ -286,14 +286,14 @@ def get_query_context(self) -> Optional[QueryContext]: | |||
|
|||
def get_explore_url( | |||
self, | |||
base_url: str = "/superset/explore", | |||
base_url: str = "/explore", | |||
overrides: Optional[Dict[str, Any]] = None, | |||
) -> str: | |||
overrides = overrides or {} | |||
form_data = {"slice_id": self.id} | |||
form_data.update(overrides) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if overrides
will be recognized by the new explore endpoint, since it doesn't handle form_data
param. We might want to look into that later and fix/refactor if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for spotting that! I investigated and it's trickier than it sounds. It's being used by Top N charts cache warm-up. I'll tackle this problem in a separate PR because it's not working anyway currently with form_data_key
.
We need to replace links to Explore from Datasets List - we still use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left 2 non-blocking comments. The PR looks great!
/testenv up |
@zhaoyongjie Ephemeral environment spinning up at http://34.221.127.102:8080. Credentials are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michael-s-molina The results data pane seems lost.
Works for me 🤔 |
Could you try to close the Results Pane then reopen this Chart from a new tab? |
I have tried open some example charts, i also saw the issue that result/samples are missing, however example chart 'Most Dominant Platforms' is working fine result.and.sample.mov |
Found 2 issue when switching chart: keep.flashing.mov2, change chart to pie chart and big number chart through viz switchers, the chart will keep zoom out itself Screen.Recording.2022-07-05.at.12.35.46.AM.mov |
Thanks for spotting that @zhaoyongjie @jinghua-qa ! The problem was that after using the SPA html template, the structure of the page changed a bit and the height of Explore container wasn't calculated correctly. I pushed a fix for that and confirmed that results pane is now displayed correctly when it's closed. @jinghua-qa I couldn't repro the problem with flashing/zooming, but it looks to me like it's connected to calculating the page height. Hopefully my latest commit fixes this issue as well |
/testenv up |
@kgabryje Ephemeral environment spinning up at http://34.216.136.31:8080. Credentials are |
Hi @EugeneTorap. That's the plan for the whole SPA project. We're tackling it in phases so some of the pages may still be reloading. |
Thank you for submitting the fix! I'm just waiting for @zhaoyongjie and @jinghua-qa's approval to merge it. |
Good point. Let's tackle it in a separate PR 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified fix for result/sample title and auto zoom out issue, also did not see major issues for regression test from QA team. LGTM!
Ephemeral environment shutdown and build artifacts deleted. |
* feat: Renders Explore in SPA * Adds permalink support * Replaces navigation from Welcome page * Fix initializing feature flags * Remove redundant import * Adds saveSlice workaround * Fixes paths * Fixes lint error * Fixes tests * Fix url to explore from Datasets view * Fix explore page height Co-authored-by: Kamil Gabryjelski <[email protected]>
SUMMARY
Renders Explore in SPA under
/explore
. Previously, Explore was displayed under/superset/explore
. This will open a number of possibilities for in-context features and also reduce the development complexity associated with keeping multiple React applications.This PR also replaces SPA-related Explore navigation with React Router and removes the previous entry point files.
Follow-up of #20519
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2022-07-01.at.4.00.25.PM.mov
TESTING INSTRUCTIONS
We need to test all features that are associated with Explore, like:
ADDITIONAL INFORMATION