fluid-lab / gamepad-navigator

GSoC 2020 project
Other
6 stars 10 forks source link

Update chrome extension manifest version. #90

Closed duhrer closed 8 months ago

duhrer commented 2 years ago

Loading the plugin now throws an error:

Manifest version 2 is deprecated, and support will be removed in 2023. See https://developer.chrome.com/blog/mv2-transition/ for more details.

We need to update our manifest version by the end of the year.

duhrer commented 2 years ago

I have been discussing this with @jobara, as the UIO+ extension will also need to be updated. The biggest concern is replacing all previous background scripts (including dependencies like Infusion) with a single service worker.

ES imports are not universally supported by browsers, which means we need some way of ensuring our dependencies are available in the context of the service worker code.

Justin pointed out that we might be able to import the code we need using importScripts.

It seems like others are also using bundling tools to smack together their dependencies and unique code into a single file. Browserify seems like a passable option, Justin also pointed out that within the wider Infusion community, Laravel and Terser are being used for the kind of bundling we require.

dmahajan980 commented 1 year ago

Hey @duhrer @the-t-in-rtf, I've been away for a very long time and trying to catch up through this issue. Can you please tell if anything was finalised on the bundling part and the major blockers (if any) that are preventing us from settling on a bundler?

duhrer commented 9 months ago

Hi, @dmahajan980. I still need to look at this. I will also create a ticket to add a privacy policy so that we can get the plugin added to the Chrome Web Store again.

duhrer commented 9 months ago

It seems like the new version is now required, so I suspect we'll have to address this before we can restore the web store listing.

duhrer commented 9 months ago

After reviewing the approach UIO+ used in migrating and reading this helpful guide, I have made a first pass at updating. Thus far I have confirmed that the following work:

  1. The plugin bundles and loads without errors.
  2. The configuration interface and preferences storage work.

I am in the process of testing all methods. Thus far I have confirmed the following working (in the order they appear in the configuration menu):

  1. click
  2. history back button
  3. history next button
  4. focus on the previous element
  5. focus on the next element
  6. scroll left
  7. scroll right
  8. scroll up
  9. scroll down
  10. switch to the previous tab
  11. switch to the next tab
  12. close current browser tab
  13. close current browser window
  14. zoom in on the active web page
  15. zoom out on the active web page
  16. maximise the current browser window
  17. restore the size of the current browser window

The following don't seem to work, I will have to look into that further tomorrow:

  1. Opening a new tab
  2. Opening a new window.
  3. Switching to the previous browser window
  4. Switching to the next browser window
  5. Re-open the last closed tab or window
duhrer commented 9 months ago

I have continued testing and will comment further on the pull.

duhrer commented 8 months ago

The work has been reviewed and the pull has been merged.