-
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
feat: Use SPA navigation between AddSlice and Dataset list pages #21683
Conversation
}; | ||
|
||
const hide = () => { | ||
cleanup(); |
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.
I separated the cleanup functions from onHide()
, because onHide
does history.replace
, which causes race condition with history.push
in line 131
Codecov Report
@@ Coverage Diff @@
## master #21683 +/- ##
==========================================
- Coverage 66.82% 66.82% -0.01%
==========================================
Files 1798 1799 +1
Lines 68824 68824
Branches 7331 7332 +1
==========================================
- Hits 45994 45992 -2
Misses 20952 20952
- Partials 1878 1880 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
window.location.href = `/chart/add?dataset=${currentTableName}`; | ||
hide(); | ||
history.push(`/chart/add?dataset=${currentTableName}`); | ||
cleanup(); |
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.
The previous version had a call to onHide
. Should we keep it?
const hide = () => {
setItem(LocalStorageKeys.db, null);
clearModal();
onHide();
};
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.
No, onHide
only executed history.replace
, which was supposed to remove the #create
from URL. We only want it when we close the modal, otherwise it causes a race condition with history.push
from line 131 (explained in https://github.com/apache/superset/pull/21683/files#r985828109)
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.
LGTM
SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2022-10-03.at.16.01.01.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION