Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
805 stars 102 forks source link

Increase window parameter adjustment options in resize menu #493

Open kelvinnkat opened 1 year ago

kelvinnkat commented 1 year ago

Hardware

Meta Quest 2 Quest Version/Runtime 49.0.0 Wolvic Version 70

Steps to Reproduce

  1. Open Wolvic Browser
  2. Select the '...' button on any site
  3. Press the 'Window Resize' button and observe the options in this menu

Current Behavior

Currently, the resize menu offers only vertical and horizontal adjustment options. It does not offer

Expected Behavior

How I would like it to work is where in this menu you can adjust more of the parameters of the window, most importantly the vertical/Z plane angle of the window but also the horizontal/X plane angle. A good point of comparison is the Quest Link Desktop mode where holding the side button on a Quest 2 lets you freely change these parameters by moving the window around.

Possible Solution

Implement the aforementioned expected behavior

Context

Personally, I'd like to be able to comfortably use the browser while lying in bed or on a reclining chair.

svillar commented 1 year ago

So in Meta, while inside Wolvic, if you open the sytem menu (by clicking on the menu button of the right controller) there is an option to recenter the view. You can move it upwards so you could use it while lying down or in a reclined position. Would that work for you?

kelvinnkat commented 1 year ago

So in Meta, while inside Wolvic, if you open the system menu (by clicking on the menu button of the right controller) there is an option to recenter the view. You can move it upwards so you could use it while lying down or in a reclined position. Would that work for you?

There are a few similar features within the Quest 2's OS to what you're talking about. If you're talking about the recenter feature that happens when you simply hold the 'Oculus' (Meta now?) button, that just changes the window position/angle on the horizontal plane. Though I am somewhat confident that this method does tell the app the vertical angle to use, since the built-in Quest Browser will adjust its vertical angle when you hold the Oculus button. If this is the case for all apps and it's not just some sort of Meta-built app exclusive feature, then this could be fixed for all Quest users by figuring out how to change the angle upon being told the vertical angle to use by the OS just like the built-in browser does.

If you're talking about the one that appears in the menu that pops up when you just tap the 'Oculus' button, as far as I can tell this only happens with Quest Link (PC VR) games. Attached is what that menu looked like when I opened it, I didn't see that option there.

Although any implementation would serve my particular 'requirement' for me personally, ideally all of the following would be implemented, particularly since the first as far as I know would only work with Quest users (I'm not familiar with Pico or other headsets, maybe it would with theirs, idk): 1: Vertical angle adjustment through holding the Oculus button 2: Quest Link Desktop-style adjustments with the secondary/side button (Where you can 'grab' the window with the side trigger and freely move it around in a sphere around the user, and also adjust the distance between the user and the window by pushing it towards or away from yourself, basically) 3: Quest Browser-style adjustments where you can grab a sort of handle below the window or the Wolvic menu and make simple spherical (meaning the window stays the same distance away from the user) adjustments.

Note that in the Quest Link desktop view (i.e. when you open Quest link and press the 'show desktop' button in the menu bar and can see your PC screen) and Quest Browser's specific respective implementation of implementations 2 and 3, you can do this without needing to be in a special resize/adjust menu, but depending on the UX you're aiming for, this particular aspect may or may not be what you as developers want.

a1cc13ebbb0e835431bc6fe495352492

svillar commented 1 year ago

So in Meta, while inside Wolvic, if you open the system menu (by clicking on the menu button of the right controller) there is an option to recenter the view. You can move it upwards so you could use it while lying down or in a reclined position. Would that work for you?

There are a few similar features within the Quest 2's OS to what you're talking about. If you're talking about the recenter feature that happens when you simply hold the 'Oculus' (Meta now?) button, that just changes the window position/angle on the horizontal plane. Though I am somewhat confident that this method does tell the app the vertical angle to use, since the built-in Quest Browser will adjust its vertical angle when you hold the Oculus button. If this is the case for all apps and it's not just some sort of Meta-built app exclusive feature, then this could be fixed for all Quest users by figuring out how to change the angle upon being told the vertical angle to use by the OS just like the built-in browser does.

I think I didn't explain myself properly, so there are basically 2 ways to recenter the view (in x-y axes):

  1. a long press in the Oculus button. This is not working in 1.3 because it was a regression of the migration to OpenXR. Good news is that we have a fix and we'll release it soon
  2. single click on Oculus button, then go to "Quick Settings" in the system bar, and then you have the option to recenter view from there.

With regard to adjusting the position of the window in the Z axis, that's indeed something to consider for the future if there are clear use cases for that, because right now I have some doubts about its utility.

kelvinnkat commented 1 year ago

I tried the second method you mentioned where you use the quick settings menu, and this does not work either on the current version. It seems that the browser completely ignores any instructions from the OS to change its vertical angling, regardless of the method the user goes through. I generally think that functions like this should not depend on the OS for implementation, but maybe that's just me.

As for adjusting the Z axis dimension resizing the window affects how much content a given webpage shows the user, and some pages decide to simply make everything bigger or smaller but others change their layout.. Being able to adjust the Z position would enable the user to independently control how big the window (and the items rendered from the webpage) looks to them and how much content a page loads. Many, if not most websites will to some extent adjust the layout of their page if you increase the pixel dimensions the window is given to render a page. Let's take the Rust Language website's homepage (rust-lang.org). If you scroll to the bottom, there is some text that some users might consider small at 0.5X resolution, especially those with vision issues (I imagine this is a lot worse on some sites with even smaller text, this is just one instance that I found) :

36febff304d47ca567f2f98cdeec9aee

A user might want to see this text more clearly. The problem is, if you try to resize the window, even to 2X scaling, the text size is unaffected, only the layout changes:

0bcf358dc621e54f9d20db2ad1ff5876

If this were a conventional app on a conventional display, you'd most likely have to be able to zoom in or out, which would functionally cut out some content in order to display all this text. But since this is a VR app, devs can theoretically allow users to see the same amount of content in a larger or smaller amount of space. Assuming my understanding is correct, at least.

svillar commented 1 year ago

I tried the second method you mentioned where you use the quick settings menu, and this does not work either on the current version. It seems that the browser completely ignores any instructions from the OS to change its vertical angling, regardless of the method the user goes through. I generally think that functions like this should not depend on the OS for implementation, but maybe that's just me.

Weird, because I've just tried and works for me. Note that the recentering happens after closing the system menu. Anyway this will be fixed on Wolvic's side.

Regarding modifying the distance to the browser window, it looks to me that what you actually want is not to modify the z but the zooming of the web contents. That has been already requested, unfortunately Gecko does not provide that in the Java API Wolvic uses.

kelvinnkat commented 1 year ago

I think you misinterpreted me a bit, what I'd like for the Z axis thing is to be able to have a webpage physically closer or further away. It would allow the HTML (and CSS and JS and stuff I suppose) renderer to render the exact same page (with the same alotted resolution and all that) without needing to do anything like zooming the webpage contents. I saw the request before and realized that allowing the user to make a page 'closer' or 'further' away would be a workaround, letting a page appear larger or smaller to the user without needing to screw around with the Java API for a hack-y solution, make some sort of new API or implementation, or anything like that.

Enrique-Venegas-A commented 1 year ago

I'm not sure if what @kelvinnkat is asking considers the vertical height adjustment for the whole windows browser, but if it does, then I would like to endorse it, it would be a huge complement to the resize function, also, being able to increase/decrease the whole windows size (as in, a zoom function for the windows instead of the webpage itself).

One of my uses is to read web comics that are vertically formatted (you read them by continuously scrolling) and being able to adjust those parameters would be a huge improvement in that kind of scenario.

HollowMan6 commented 1 year ago

com igalia wolvic-20230912-223712

A user might want to see this text more clearly. The problem is, if you try to resize the window, even to 2X scaling, the text size is unaffected, only the layout changes:

I'm not exactly sure what this issue is asking. There's a "Display Density" option in the Display section of the Settings where you can enlarge/shrink the content for all web pages. There's also a PR in progress if you mean changing the window distance (z-axis) https://github.com/Igalia/wolvic/pull/734