PlasmoHQ / plasmo

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

[BUG] Sidepanel not autoreloading/auto-updating #966

Closed bot101 closed 2 months ago

bot101 commented 2 months ago

What happened?

I added a sidepanel to an extension and updating the extension logic does not auto-update the sidepanel content. Additionally, because there isn't a way to reload the sidepanel manually as it has no reload button, I have to either perform a reload from the devtools or close/open the side panel for it to refresh. Hopefully, there's some fix or configuration requirement may be missing that helps resolve this??

Version

Latest

What OS are you seeing the problem on?

Windows

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

(OPTIONAL) Contribution

Code of Conduct

farzadmf commented 2 months ago

Hey @bot101 ; curious if you have a sample repo for using the sidepanel? I tried their example and I was expecting the click on the extension icon to open the sidepanel, but it doesn't do anything!

farzadmf commented 2 months ago

UPDATE: NVM, seems like I need to right-click and select "open side panel"; I was hoping for it to open when I click on the icon

bot101 commented 2 months ago

Not sure what happened, but it auto-refreshes now when a change is made. Wasn’t doing that when I initially setup the project so I’ll be closing this issue.

ottobonn commented 2 months ago

@farzadmf Here's a chrome example of how to open the side panel with a click of the extension icon: https://github.com/GoogleChrome/chrome-extensions-samples/blob/main/functional-samples/cookbook.sidepanel-site-specific/service-worker.js#L18

ottobonn commented 2 months ago

Also @bot101 I am now experiencing the same issue; petition to reopen this issue. Yesterday my side panel was hot-reloading super quickly, but now it isn't reloading at all in response to file changes.

farzadmf commented 2 months ago

Thank you @ottobonn for the link; that example seems to be Chrome-specific; I was hoping for something more cross-browser, given that plasmo is supposed to be cross-browser.