Skip to content
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(app): open external links in browser #14447

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

shlokamin
Copy link
Member

@shlokamin shlokamin commented Feb 7, 2024

Overview

This PR fixes a bug introduced by updating electron where we were opening up external links in the electron window rather than an external browser window.

As per the (poorly worded) docs, contents.setWindowOpenHandler is...

Called before creating a window a new window is requested by the renderer, e.g. by window.open(), a link with target="_blank", shift+clicking on a link, or submitting a form with

So the checks we were doing before are unnecessary.

closes RQA-2309

Test Plan

Verified internal links do not open in the browser, and verified external links do.

Changelog

  • Open external links in the browser (outside of electron)

Review requests

Click around the app and make sure internal/external links work as expected.

Risk assessment

Low

@shlokamin shlokamin changed the base branch from edge to chore_release-7.2.0 February 7, 2024 22:01
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (ae4e2e3) 67.70% compared to head (37c71d1) 67.77%.

Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                   @@
##           chore_release-7.2.0   #14447      +/-   ##
=======================================================
+ Coverage                67.70%   67.77%   +0.07%     
=======================================================
  Files                     1628     2518     +890     
  Lines                    54907    71969   +17062     
  Branches                  4148     9244    +5096     
=======================================================
+ Hits                     37173    48778   +11605     
- Misses                   17044    20989    +3945     
- Partials                   690     2202    +1512     
Flag Coverage Δ
app 64.58% <0.00%> (+30.69%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
app-shell/src/ui.ts 0.00% <0.00%> (ø)

... and 890 files with indirect coverage changes

external links were opening in the electron browser window instead of an external browser window

closes RQA-2309
@shlokamin shlokamin force-pushed the app_open_external_links_in_browser branch from 65e06ad to 37c71d1 Compare February 7, 2024 22:05
@shlokamin shlokamin marked this pull request as ready for review February 7, 2024 22:09
@shlokamin shlokamin requested a review from a team as a code owner February 7, 2024 22:09
@shlokamin shlokamin requested review from ncdiehl11, smb2268 and mjhuff and removed request for a team February 7, 2024 22:09
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

nice!

@sfoster1 sfoster1 merged commit 17963c0 into chore_release-7.2.0 Feb 7, 2024
21 of 22 checks passed
@sfoster1 sfoster1 deleted the app_open_external_links_in_browser branch February 7, 2024 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants