Skip to content

Conversation

@aMayzner
Copy link
Member

Add Zen Mode

Summary

This PR implements a "zen mode" feature that provides a distraction-free viewing experience by hiding UI chrome (sidebar, overview panel, and status bar). Users can toggle zen mode via Shift+F or the command palette. When zen mode is active, opening the command palette temporarily shows the topbar, which auto-hides after the user submits or closes the omnibox.

Changes

  • Added zenModeEnabled state and topbarVisibleInZenMode state to AppImpl
  • Added toggleZenMode(), showTopbarInZenMode(), and hideTopbarInZenMode() methods to App API
  • Registered new command dev.perfetto.ToggleZenMode with Shift+F hotkey
  • Modified command palette to show topbar when opened in zen mode and hide it on close/submit
  • Updated UiMain to conditionally hide sidebar, topbar, and status bar when zen mode is active
  • Updated TimelinePage to hide overview panel when zen mode is active
  • Enhanced command palette command to show topbar when zen mode is enabled

Notes

When entering zen mode, the omnibox is automatically reset to ensure a clean state. The topbar visibility in zen mode is managed separately to allow temporary access to the command palette while maintaining the zen mode experience.

@aMayzner aMayzner requested a review from a team as a code owner November 17, 2025 15:48
@aMayzner aMayzner force-pushed the dev/mayzner/ui-zen-mode branch from 60050a3 to 86cdaa5 Compare November 17, 2025 16:06
@aMayzner aMayzner requested a review from stevegolton November 17, 2025 16:14
@aMayzner aMayzner enabled auto-merge (squash) November 17, 2025 16:20
@aMayzner aMayzner requested a review from stevegolton November 17, 2025 17:43
@aMayzner aMayzner requested a review from stevegolton November 18, 2025 10:39
Copy link
Member

@stevegolton stevegolton left a comment

Choose a reason for hiding this comment

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

Pressing the hamburger menu now just makes the sidebar disappear forever. You have to run a command to get it back.

Please test PRs before requesting a review.

The 3 commands relating to the sidebar are now quite confusing.

@aMayzner aMayzner force-pushed the dev/mayzner/ui-zen-mode branch from b7ed6fa to c8dd1cd Compare November 19, 2025 10:35
@aMayzner aMayzner requested a review from stevegolton November 19, 2025 12:40
@aMayzner aMayzner closed this Nov 28, 2025
auto-merge was automatically disabled November 28, 2025 18:17

Pull request was closed

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.

2 participants