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

chore: manifest v3 (#916) #1608

Open
wants to merge 3 commits into
base: v5
Choose a base branch
from
Open

Conversation

kunokareal
Copy link

@kunokareal kunokareal commented Apr 18, 2024

i'm not entirely sure i did everything, this seems like too few changes for a v3 migration. sorry for being dumb in advance.

one thing im most unsure about is this part:

The Scripting API takes over the features of tabs.insertCSS(), tabs.removeCSS(), and tabs.executeScript() and adds capabilities to register, update, and unregister content scripts at runtime.

i've seen quite a few usages of executeScript, but the extension seems to be working fine despite using them?
and i also didn't really understand what those calls are used for in the first place

also im not sure how do i do a regression test, there don't seem to be any kind of tests in the repo

closes #916

@kunokareal
Copy link
Author

the reason im doing this pr in the first place is that this migration is kinda a blocker for chrome support: promise-based apis are only available in mv3, and ext store doesn't allow publishing mv2 anymore

i really wanted to do that, since chrome finally has an api for side panels and it would be really cool to get sidebery (at least partially) working there

@mbnuqw
Copy link
Owner

mbnuqw commented Apr 24, 2024

Thanks for starting working on it!

i've seen quite a few usages of executeScript, but the extension seems to be working fine despite using them?

tabs.executeScript used:

so all these features will be broken without replacing tabs.executeScript with scripting.executeScript

also im not sure how do i do a regression test, there don't seem to be any kind of tests in the repo

There are no tests, since this project for fun, and writing tests is not fun for me... so only manual e2e testing


To get it merged, we need:

  • Sidebar Styles: Fix box-sizing (mv2 default was: border-box)
  • Sidebar Styles: Set default cursor to "default"
  • Optimize background to non-persistant mode:
  • Use scripting.executeScript() instead of tabs.executeScript()
    • Since scripting.executeScript() doesn't support code prop that is used in Sidebery to provide initial data for Group page, Url-placeholder page or Tab previews, we need to send that data via messaging system.

@kunokareal
Copy link
Author

kunokareal commented Apr 24, 2024

thanks for the details, i appreciate that, they really helped!~

i fixed everything except the "Optimize background to non-persistant mode" part.
it seems to be working fine, as in - the background script just restarts as soon as it's terminated:

bgscript.mp4

definitely not the best way, but considering how much sidebery relies on the background script - i feel like it's good enough

@noguxx
Copy link

noguxx commented May 4, 2024

@mbnuqw and @kunokareal
Could you please change the browser_specific_settings.gecko.id to a string formatted like an email address instead of a GUID to solve #1629
My suggestion would be sidebery@mbnuqw

@kunokareal
Copy link
Author

kunokareal commented May 4, 2024

Could you please change the...

im not an expert on extensions, but i think changing that id might lead to unintended side effects like resetting storage and braking ota updates.

in any case, i think its better to keep things focused and for you to open a pr of your own that deals with that.

@albino1 albino1 mentioned this pull request May 19, 2024
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.

Manifest V3 migration
3 participants