Skip to content

feat: add preference to enable compact mode on browser fullscreen#9883

Closed
marciosobel wants to merge 0 commit intozen-browser:devfrom
marciosobel:dev
Closed

feat: add preference to enable compact mode on browser fullscreen#9883
marciosobel wants to merge 0 commit intozen-browser:devfrom
marciosobel:dev

Conversation

@marciosobel
Copy link
Copy Markdown

This PR adds a new preference zen.view.compact.enable-on-fullscreen, which enables compact mode whenever the browser window goes on fullscreen (e.g. when pressing F11).

This is for situations I commonly find myself into, like when I have more than one window on my screen or when I'd like to use the split tabs feature (sometimes even both!), the non-compact mode takes up too much space.

2025-08-14.11-08-49.online-video-cutter.com.mp4

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. Feature labels Aug 14, 2025
@marciosobel
Copy link
Copy Markdown
Author

Also, I thought about creating a "Compact mode" section on the preferences page, but after seeing the comment at #6243 (comment), I opted to leave it to the advanced preferences page. Lmk if this should have it's own section!

Copy link
Copy Markdown
Member

@mr-cheffy mr-cheffy left a comment

Choose a reason for hiding this comment

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

Looks good! Some things:

  1. I think this is important enough to have it's own checkbox on the settings page.
  2. Could it be possible if a simple test is written for this specifically?

Thanks!

Comment thread src/zen/compact-mode/ZenCompactMode.mjs Outdated
Services.prefs.addObserver('zen.tabs.vertical.right-side', tabIsRightObserver);

const enableOnFullscreenObserver = this._updateEnableOnFullscreen.bind(this);
Services.prefs.addObserver('zen.view.compact.enable-on-fullscreen', enableOnFullscreenObserver);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should use XPCOMUtils.defineLazyPreferenceGetter here instead of adding our own observers.

@mr-cheffy mr-cheffy self-requested a review August 14, 2025 16:07
@ekorchmar
Copy link
Copy Markdown

This would close #614 in the best possible way. I now have to follow up F11 keypress with Ctrl+Alt+C, which is frustrating.

@marciosobel marciosobel closed this Jan 2, 2026
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jan 2, 2026
@marciosobel
Copy link
Copy Markdown
Author

I wanted to come back to this PR, but I am unable to build the browser again (I run out of RAM every time, even if it's running in one thread). Maybe some other time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants