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: webview usage with electron 22 #2181

Closed
wants to merge 164 commits into from

Conversation

Justkant
Copy link
Contributor

πŸ“ Description

Description from: #1777

cf. https://ledgerhq.atlassian.net/browse/LIVE-4335?focusedCommentId=247299

In a breaking change in Electron 18 the nativeWindowOpen web preference (used here) have been removed (cf. this PR)

Now, Ledger live does not seem to receive (and handle) new-window events when a live-apps wants to open a new window (regularly used throughout Live Apps to open external contextual info like redirect to Twitter account, open ToS page, etc…)

webview are deprecated and not formerly integrated / maintained in electron.
updating electron broke previous handleding of new window opened from a webview

use setWindowOpenHandler on the webview webContents to handle opening new window.
cf. electron/electron#31117 (comment)

also, there seem to be issues between webview and React
cf. electron/electron#6046

PS: this solution works as is. It might not be the most beautiful. Feel free to use it as a base version and improve on it if need be.

❓ Context

  • Impacted projects: ledger-live-mobile, ledger-live-desktop
  • Linked resource(s): ``

βœ… Checklist

  • Test coverage
  • Atomic delivery
  • No breaking changes

πŸ“Έ Demo

πŸš€ Expectations to reach

Please make sure you follow these Important Steps.

Pull Requests must pass the CI and be internally validated in order to be merged.

sarneijim and others added 30 commits November 18, 2022 15:22
* Revert ":fire: hotfix release [skip ci]"

This reverts commit e0e5bb6.

* Revert ":fire: hotfix prerelease [LLD(2.51.0-hotfix.0)]"

This reverts commit 252aa67.

* Revert ":rocket: entering LLD hotfix mode"

This reverts commit 8f708eb.

* Revert ":fire: hotfix release [skip ci]"

This reverts commit 4ca8f86.

* Revert "Update wording"

This reverts commit fea165d.

* Revert "add energy lt for warning message to be display"

This reverts commit 693e44e.

* Revert "add more feelimit to tron trc20"

This reverts commit 1910b23.

* Revert ":fire: hotfix prerelease [LLM(3.12.0)]"

This reverts commit de77a92.

* Revert ":rocket: entering LLM hotfix mode"

This reverts commit 42df4fc.
[support] Manually merge hotfix to main
…2122)

* Fix start of post onboarding not being called in the right place

* changeset
Add blockcerts BCERT token icon
Removed the complex file, verifying the file can be converted to react native, verifying the requirements are present and avoid what is prohibited.
Added the latest requirements and removed what was asked to remove
@Justkant Justkant requested review from gre and a team as code owners December 22, 2022 17:24
@Justkant Justkant requested a review from a team December 22, 2022 17:24
@live-github-bot
Copy link
Contributor

❌ @Justkant

Unfortunately this PR does not comply with the Contributing Conventions and will be closed automatically.

Feel free to reopen this PR once you have browsed through the guidelines.


Found Issues:

  • the branch name fix/electron-22-conflicts is invalid

@live-github-bot live-github-bot bot closed this Dec 22, 2022
@changeset-bot
Copy link

changeset-bot bot commented Dec 22, 2022

πŸ¦‹ Changeset detected

Latest commit: 66391df

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 35 packages
Name Type
@ledgerhq/live-common Minor
ledger-live-desktop Minor
live-mobile Minor
@ledgerhq/devices Patch
@ledgerhq/types-devices Patch
@ledgerhq/live-cli Minor
@ledgerhq/native-ui Patch
dummy-wallet-app Patch
live-common-tools Patch
@ledgerhq/hw-transport-node-ble Patch
@ledgerhq/hw-transport-node-hid-noevents Patch
@ledgerhq/hw-transport-node-hid-singleton Patch
@ledgerhq/hw-transport-node-hid Patch
@ledgerhq/hw-transport-web-ble Patch
@ledgerhq/hw-transport-webhid Patch
@ledgerhq/hw-transport-webusb Patch
@ledgerhq/hw-transport Patch
@ledgerhq/react-native-hid Patch
@ledgerhq/react-native-hw-transport-ble Patch
@ledgerhq/hw-app-algorand Patch
@ledgerhq/hw-app-btc Patch
@ledgerhq/hw-app-cosmos Patch
@ledgerhq/hw-app-eth Patch
@ledgerhq/hw-app-helium Patch
@ledgerhq/hw-app-near Patch
@ledgerhq/hw-app-polkadot Patch
@ledgerhq/hw-app-solana Patch
@ledgerhq/hw-app-str Patch
@ledgerhq/hw-app-tezos Patch
@ledgerhq/hw-app-trx Patch
@ledgerhq/hw-app-xrp Patch
@ledgerhq/hw-transport-http Patch
@ledgerhq/hw-transport-mocker Patch
@ledgerhq/hw-transport-node-speculos-http Patch
@ledgerhq/hw-transport-node-speculos Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Dec 22, 2022

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated
live-common-tools πŸ”„ Building (Inspect) Dec 22, 2022 at 5:24PM (UTC)
3 Ignored Deployments
Name Status Preview Updated
ledger-live-github-bot ⬜️ Ignored (Inspect) Dec 22, 2022 at 5:24PM (UTC)
native-ui-storybook ⬜️ Ignored (Inspect) Dec 22, 2022 at 5:24PM (UTC)
react-ui-storybook ⬜️ Ignored (Inspect) Dec 22, 2022 at 5:24PM (UTC)

@Justkant Justkant self-assigned this Dec 22, 2022
@github-actions github-actions bot added automation CI/CD stuff cli common Has changes in live-common desktop Has changes in LLD ledgerjs Has changes in the ledgerjs open source libs mobile Has changes in LLM tools Has changes in tools translations Translation files have been touched ui Has changes in the design system library labels Dec 22, 2022
@Justkant Justkant reopened this Dec 22, 2022
@live-github-bot
Copy link
Contributor

❌ @Justkant

Unfortunately this PR does not comply with the Contributing Conventions and will be closed automatically.

Feel free to reopen this PR once you have browsed through the guidelines.


Found Issues:

  • the branch name fix/electron-22-conflicts is invalid

@live-github-bot live-github-bot bot closed this Dec 22, 2022
@Justkant Justkant deleted the fix/electron-22-conflicts branch December 22, 2022 17:25
@Justkant Justkant restored the fix/electron-22-conflicts branch December 22, 2022 17:26
@Justkant Justkant deleted the fix/electron-22-conflicts branch December 22, 2022 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation CI/CD stuff cli common Has changes in live-common desktop Has changes in LLD ledgerjs Has changes in the ledgerjs open source libs mobile Has changes in LLM tools Has changes in tools translations Translation files have been touched ui Has changes in the design system library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet