fluid-lab / gamepad-navigator

GSoC 2020 project
Other
6 stars 10 forks source link

GH-90: Initial work to migrate to manifest version 3. #97

Closed duhrer closed 8 months ago

duhrer commented 9 months ago

See #90 for details.

duhrer commented 9 months ago

As mentioned in #90, I still need to figure out a few functions that don't work after the initial conversion. Submitting the work in progress in case anyone has time to try it out and comment.

duhrer commented 9 months ago

I have everything working except navigating between browser windows. I will continue working on that.

duhrer commented 9 months ago

The window switching now works. I'll clean up the build failures and update the message listener docs, and then I think this will be ready for review.

duhrer commented 9 months ago

This is ready for review.

jobara commented 9 months ago

@duhrer did a quick look at the code, seems good; other than the failed CI task. I tried out the extension. Is it expected that it doesn't work on the Google home page?

duhrer commented 9 months ago

@jobara, the default built-in starting page in Chrome doesn't get the required scripts injected, which has always been a problem. We have "start page" logic that's meant to circumvent this by opening the Google URL instead, I'll have to confirm how/whether that's working.

Long term, my idea is to have "new window" and "new tab" open a dialog where you can choose where to go, so that you can't end up on a page you can't navigate away from or control.

duhrer commented 9 months ago

The CI failure is a linting error, which I just fixed.

duhrer commented 9 months ago

So, previously we use a fluid component for the background script, and it used invoker definitions to change a lot of function signatures. After more closely reviewing, I discovered that the signature of the wrappers for "new window" and "new tab" was off, resulting in the URL we use by default not getting passed to the code that creates the new tab or window.

With this fixed, creating a new window (right thumb stick press by default) or creating a new tab (start button press by default) both work as expected, and no longer dump the user in a window/tab they can't control.

duhrer commented 9 months ago

Just to confirm, this should be ready for further review.

jobara commented 9 months ago

@duhrer I'm still getting some funny behaviour with the browser forward/back where it will kick me back to the default new tab in chrome. I'm not exactly sure what happened but I went back and forward fine at first, but then it threw me to the new tab page that I can't interact with. What's worse is that even if I type in a URL it will launch that page but after loading it will immediately kick me back to the new tab page even without interacting with the gamepad.

duhrer commented 8 months ago

Thanks for catching that, @jobara. I installed the previous release to confirm, and the same thing happens, namely:

  1. If you try to go back, you go all the way back, and get bumped back if you manually navigate forward in history.
  2. If you try to go forward, you go all the way forward, and get bumped forward if you try to manually go back.
  3. If you open a new window and navigate around, you'll stay stuck in whichever direction you were headed in.

I'll write it up as a new ticket and add it to the list of work that needs doing.

duhrer commented 8 months ago

Self-merging this and moving on to fixing #98.