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

Add full screen mode feature for 2D browsing #1630

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

haanhvu
Copy link
Collaborator

@haanhvu haanhvu commented Nov 18, 2024

This commit adds a Fullscreen item in the hamburger menu to set the current window in the fullscreen mode. The commit also enables three edge cases:

  • When users sets fullscreen mode, go into a fullscreen video, exit fullscreen video, the fullscreen mode is reserved.
  • When users sets fullscreen mode, opens a new tab, that tab is opened in fullscreen mode too.
  • When exitFullScreenMode() is called (e.g., in onPause()), fullscreen mode is exited correctly.

Fixes #1494

@felipeerias felipeerias requested review from javifernandez, felipeerias and svillar and removed request for javifernandez December 19, 2024 13:47
Copy link
Member

@svillar svillar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems a nice feature, however I am not sure it's polished enough. At least I found weird the following scenarios

  1. put the browser in fullscreen
  2. goto youtube.com and select a video
  3. in the video player click on fullscreen
  4. exit fullscreen

When you exit fullscreen the browser goes back to the unfullscreen mode again. I don't think that's neccesarily bad, but the addition of this feature makes the navigation confusing, it's like the fullscreen mode you had previously selected was "forgotten". In the current code, it's crystal clear, the window goes fullscreen only when the page requests it (after a user gesture of course).

Another example is when after clicking on a link the page opens another tab. In that case the window un-fullscreens automatically as well, giving the impression that the feature no longer works.

I am not really sure what to do. Maybe @felipeerias has further thoughts about how the UI interaction should work in this case but I think it's really tricky if we want to make it work properly.

Apart from that the commit message should be changed. In general it should follow this template:

Brief description/Title

Detailed description

Fixes #0000

@haanhvu
Copy link
Collaborator Author

haanhvu commented Feb 6, 2025

Seems a nice feature, however I am not sure it's polished enough. At least I found weird the following scenarios

  1. put the browser in fullscreen
  2. goto youtube.com and select a video
  3. in the video player click on fullscreen
  4. exit fullscreen

When you exit fullscreen the browser goes back to the unfullscreen mode again. I don't think that's neccesarily bad, but the addition of this feature makes the navigation confusing, it's like the fullscreen mode you had previously selected was "forgotten". In the current code, it's crystal clear, the window goes fullscreen only when the page requests it (after a user gesture of course).

Another example is when after clicking on a link the page opens another tab. In that case the window un-fullscreens automatically as well, giving the impression that the feature no longer works.

I am not really sure what to do. Maybe @felipeerias has further thoughts about how the UI interaction should work in this case but I think it's really tricky if we want to make it work properly.

Apart from that the commit message should be changed. In general it should follow this template:

Brief description/Title

Detailed description

Fixes #0000

Yeah these scenarios seems worth solving. I have been working on them.

Another scenario that seems worth solving is when activity pauses. Currently in onPause() we exit fullscreen video, so I think we shoudl exit fullscreen mode too.

@haanhvu haanhvu marked this pull request as draft February 6, 2025 15:30
@haanhvu haanhvu force-pushed the issue1494 branch 4 times, most recently from d73cbdb to f3bc8f5 Compare February 8, 2025 10:41
@haanhvu haanhvu changed the title Enable full screen mode for 2D browsing Add full screen mode feature for 2D browsing Feb 8, 2025
This commit adds a Fullscreen item in the hamburger menu to set the current window in the fullscreen mode. The commit also enables three edge cases:
- When users sets fullscreen mode, go into a fullscreen video, exit fullscreen video, the fullscreen mode is reserved.
- When users sets fullscreen mode, opens a new tab, that tab is opened in fullscreen mode too.
- When exitFullScreenMode() is called (e.g., in onPause()), fullscreen mode is exited correctly.

Fixes Igalia#1494
@haanhvu
Copy link
Collaborator Author

haanhvu commented Feb 8, 2025

Seems a nice feature, however I am not sure it's polished enough. At least I found weird the following scenarios

  1. put the browser in fullscreen
  2. goto youtube.com and select a video
  3. in the video player click on fullscreen
  4. exit fullscreen

When you exit fullscreen the browser goes back to the unfullscreen mode again. I don't think that's neccesarily bad, but the addition of this feature makes the navigation confusing, it's like the fullscreen mode you had previously selected was "forgotten". In the current code, it's crystal clear, the window goes fullscreen only when the page requests it (after a user gesture of course).
Another example is when after clicking on a link the page opens another tab. In that case the window un-fullscreens automatically as well, giving the impression that the feature no longer works.
I am not really sure what to do. Maybe @felipeerias has further thoughts about how the UI interaction should work in this case but I think it's really tricky if we want to make it work properly.
Apart from that the commit message should be changed. In general it should follow this template:

Brief description/Title

Detailed description

Fixes #0000

Yeah these scenarios seems worth solving. I have been working on them.

Another scenario that seems worth solving is when activity pauses. Currently in onPause() we exit fullscreen video, so I think we shoudl exit fullscreen mode too.

I have fixed all these three edge cases, as I described in the commit message. Not sure if I handled them smoothly enough, but I think we can improve from the current change if we want.

@haanhvu haanhvu marked this pull request as ready for review February 8, 2025 12:15
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.

Full screen mode for 2D browsing
2 participants