-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 navigateToApp behavior when openInNewTab is true #110712
Fix navigateToApp behavior when openInNewTab is true #110712
Conversation
@elasticmachine merge upstream |
expected head sha didn’t match current head ref. |
@patrykkopycinski Could add a link to an issue with a problem statement and steps to reproduce the problem, please? |
@mshustov attached the recording
|
if (openInNewTab) { | ||
this.openInNewTab!(getAppUrl(availableMounters, appId, path)); | ||
} else { | ||
this.navigate!(getAppUrl(availableMounters, appId, path), state, replace); | ||
return; | ||
} | ||
|
||
this.navigate!(getAppUrl(availableMounters, appId, path), state, replace); |
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.
Yea, currentAppId$
shouldn't emit when we're opening in a new tab.
this.appInternalStates.delete(this.currentAppId$.value!);
should not be triggered either and should also be skipped. Could you please also fix this?
Index: src/core/public/application/application_service.tsx
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/core/public/application/application_service.tsx b/src/core/public/application/application_service.tsx
--- a/src/core/public/application/application_service.tsx (revision 501e3150111867f0a100b49daf52463d05a12069)
+++ b/src/core/public/application/application_service.tsx (date 1625645624318)
@@ -250,16 +250,15 @@
if (path === undefined) {
path = applications$.value.get(appId)?.defaultPath;
}
- if (!navigatingToSameApp) {
- this.appInternalStates.delete(this.currentAppId$.value!);
- }
if (openInNewTab) {
this.openInNewTab!(getAppUrl(availableMounters, appId, path));
} else {
+ if (!navigatingToSameApp) {
+ this.appInternalStates.delete(this.currentAppId$.value!);
+ }
this.navigate!(getAppUrl(availableMounters, appId, path), state, replace);
- }
-
- this.currentAppId$.next(appId);
+ this.currentAppId$.next(appId);
+ }
}
};
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 !!
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Page load bundle
History
To update your PR or re-run it, just comment with: |
Summary
Untitled_.Sep.4.2021.1_49.AM.mp4