Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Chore/package with desktop popup feature enabled#601

Merged
cryptotavares merged 5 commits intomainfrom
chore/package-with-desktop-popup-feature-enabled
Mar 17, 2023
Merged

Chore/package with desktop popup feature enabled#601
cryptotavares merged 5 commits intomainfrom
chore/package-with-desktop-popup-feature-enabled

Conversation

@cryptotavares
Copy link
Copy Markdown
Contributor

@cryptotavares cryptotavares commented Mar 15, 2023

Overview

Adds desktop popup env vars to the packaging github actions.
Fixes a concurrency issue when enabling/disabling the desktop popup from settings page.

Changes

Pipeline

  • Adds DESKTOP_POPUP and DISABLE_EXTENSION_POPUP to package dev github action.
  • Adds DESKTOP_POPUP and DISABLE_EXTENSION_POPUP to package prod github action.

App

  • Fix: displaying the extension popup only when the desktop popup is disabled.
  • Fix: race condition when enabling the desktop popup (between renderer process persisting the isDesktopPopupEnabled state and the main process emitting the restart event)

@cryptotavares cryptotavares requested a review from a team March 15, 2023 23:48
@github-actions
Copy link
Copy Markdown

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

Add desktop popup enable env vars
to github package actions. The actions
will get the values from the respective
github environment variables.
The disableExtensionPopup is only validating if
the env vars for desktop popup and disable extension
popup are enabled. Then on runtime, the desktop popup
can be disabled on by the user on the settings screen.
For that reason we need to check if the desktop window
handlers are registered or not. If not, it means that
the desktop popup is currently disabled on the settings
and we want to trigger the extension popup
While testing this feature, realised
that there is a race condition between
the renderer process updating the desktop
popup enabled state (and persisting it)
and the main process starting the process of
enabling the desktop popup (which requires
emiting a restart in order to retrigger the
connectRemote for the new desktop popup renderer
process).
Solving this with a quick hack like adding this sleep
as the desktop popup feature is highly
experimental and we want to ship the first version of
desktop. Furthermore, the impact to the users should
be 0, as currently when enabling, the user needs to
re-introduce the password into the Extension UI
(in order to unlock the vault). Doing that will
take longer than the sleep that we are adding
@cryptotavares cryptotavares force-pushed the chore/package-with-desktop-popup-feature-enabled branch from a558bea to 52af8cb Compare March 17, 2023 11:56
This is cause by @metamask/network-controller
importing an old web3-provider-engine maintained
by metamask. That package is still using
the long deprecated request package.
By passing the issue here, until it is fixed within
that package.
@cryptotavares cryptotavares merged commit 8d0fa60 into main Mar 17, 2023
@cryptotavares cryptotavares deleted the chore/package-with-desktop-popup-feature-enabled branch March 17, 2023 18:06
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2023
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.

2 participants