-
Notifications
You must be signed in to change notification settings - Fork 874
feat: open app in tab or slim-window #16152
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
Conversation
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.
This makes me happy, I like tabs over the slim window
); | ||
return; | ||
} | ||
case "tab": { |
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.
Should this be the default
case or are we guaranteed open_in
will always be set and only contain one of these two values?
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.
We ensure it will always be set and contain one of these two values.
if (app.external && !app.url.startsWith("http")) { | ||
// If the protocol is external the browser does not | ||
// redirect the user from the page. | ||
const isBrowserProtocol = app.external && !app.url.startsWith("http"); |
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.
Oh wait this is actually the opposite, right? Not a browser protocol (like vscode://
). Maybe isExternalProtocol
?
Well, I guess the browser does handle it by launching the external app, but isBrowser
makes me think of http://
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.
It made sense to me before you brought this up—now I’m not so sure. Maybe shouldOpenAppExternally
?
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 like that name
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 - Just agree with @code-asher comment on the naming for isBrowserProtocol
which seems to be the opposite but as the logic itself seems good i'll not block here.
Close coder/terraform-provider-coder#297