Skip to content

Conversation

marciosobel
Copy link

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
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
Contributor

@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!

@@ -57,10 +57,18 @@ var gZenCompactModeManager = {
const tabIsRightObserver = this._updateSidebarIsOnRight.bind(this);
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
Contributor

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants