Skip to content

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

Merged
merged 3 commits into from
Jan 17, 2025
Merged

feat: open app in tab or slim-window #16152

merged 3 commits into from
Jan 17, 2025

Conversation

BrunoQuaresma
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma self-assigned this Jan 15, 2025
@BrunoQuaresma BrunoQuaresma requested a review from a team January 16, 2025 14:54
Copy link
Member

@code-asher code-asher left a 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": {
Copy link
Member

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?

Copy link
Collaborator Author

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");
Copy link
Member

@code-asher code-asher Jan 16, 2025

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://

Copy link
Collaborator Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that name

@BrunoQuaresma BrunoQuaresma changed the title feat: open app on tab or slim-window feat: open app in tab or slim-window Jan 16, 2025
Copy link
Contributor

@defelmnq defelmnq left a 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.

@BrunoQuaresma BrunoQuaresma merged commit eda8190 into main Jan 17, 2025
30 checks passed
@BrunoQuaresma BrunoQuaresma deleted the bq/window-open-in branch January 17, 2025 13:01
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Opening a coder_app in a new browser window is awkward
3 participants