PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
10.16k stars 351 forks source link

[RFC] Avoiding the wrong window size at the moment of opening popup #821

Closed zystudios closed 10 months ago

zystudios commented 10 months ago

How do you envision this feature/change to look/work like?

image

I know that the way to run react is through the js to generate html, but the moment you open the popup, due to the js has not been loaded, resulting in the html is not rendered, there will be a very small window, rather affect the experience, is there any way to change this?

What is the purpose of this change/feature? Why?

Improve the user experience

(OPTIONAL) Example implementations

No response

(OPTIONAL) Contribution

Verify canary release

Code of Conduct

zystudios commented 10 months ago
  <body style="width:620px; height:420px">
    <div id="__plasmo"></div>
    <script src="/popup.7d3dc21e.js" defer=""></script>
  </body>

I'm using a not-so-good solution to solve this

editing build/popup.html and adding width and height to the body, but I think the framework should add this feature to initialize the size of popups