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 opening popup (error "Bounds must be at least 50% within visible screen space") #317

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

lukaw3d
Copy link
Member

@lukaw3d lukaw3d commented Sep 13, 2023

If user freshly installs extension, opens popup, closes it, opens popup:

  • popup initializes very quickly
  • window.screenLeft in openCurrentRouteInPersistentPopup returns extension's
    icon position (instead of popup) near the edge of the screen
  • Chrome blocks popup "Bounds must be at least 50% within visible screen space"
  • user can't open the popup

This only happens with production build. In development build javascript is loaded slower, and window.screenLeft returns popup position.

Fixes bug: user freshly installs extension, opens popup, closes it, opens popup:
- popup initializes very quickly
- window.screenLeft in openCurrentRouteInPersistentPopup returns extension's
  icon position (instead of popup) near the edge of the screen
- Chrome blocks popup "Bounds must be at least 50% within visible screen space"
- user can't open the popup
Fixes bug: user freshly installs extension, opens popup, closes it, opens popup:
- popup initializes very quickly
- window.screenLeft in openCurrentRouteInPersistentPopup returns extension's
  icon position (instead of popup) near the edge of the screen
- popup position gets clamped to edge of screen
@matevz
Copy link
Member

matevz commented Sep 13, 2023

I downgraded node to v14 to match github actions, but I'm still getting

$ yarn buildProd
yarn run v1.22.5
$ env NODE_OPTIONS=--openssl-legacy-provider webpack --mode production
/home/oa/node-v14.17.0-linux-x64/bin/node: --openssl-legacy-provider is not allowed in NODE_OPTIONS
error Command failed with exit code 9.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Any ideas?

Copy link
Member

@matevz matevz left a comment

Choose a reason for hiding this comment

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

I unset the env variable above and the compilation went through.

I tested the extension and the popup issue is fixed. Good job!

@lukaw3d
Copy link
Member Author

lukaw3d commented Sep 13, 2023

Hm I think openssl-legacy-provider is needed on node >=18, and CI on this project is bad

@lukaw3d lukaw3d merged commit 747b0ae into master Oct 2, 2023
@lukaw3d lukaw3d deleted the lw/fix-opening-popup branch October 2, 2023 14:25
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.

3 participants