-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PM-26821] Improve macOS fullscreen ux #16838
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
base: main
Are you sure you want to change the base?
Conversation
Adds special handling for popout windows when the sender is in fullscreen mode on macOS. The sender window moves from fullscreen to maximized before opening the popout, and the new window is focused after creation to improve user experience.
added happy path and skip path tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the macOS fullscreen user experience when opening popout windows. It adds platform-specific handling to transition the sender window from fullscreen to maximized mode before opening a popout, then focuses the new window to prevent redirecting users to a new desktop space.
- Adds macOS platform detection for fullscreen window handling
- Implements automatic transition from fullscreen to maximized state for better UX
- Includes test coverage for the new platform-specific behavior
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
browser-popup-utils.ts | Adds macOS fullscreen detection and window state management logic |
browser-popup-utils.spec.ts | Adds test cases for macOS fullscreen behavior and non-macOS platforms |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
||
expect(BrowserApi.updateWindowProperties).toHaveBeenCalledWith(1, { state: "maximized" }); | ||
|
||
it("doesnt exit fullscreen if the platform is not mac", async () => { |
Copilot
AI
Oct 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'doesnt' to 'doesn't'.
it("doesnt exit fullscreen if the platform is not mac", async () => { | |
it("doesn't exit fullscreen if the platform is not mac", async () => { |
Copilot uses AI. Check for mistakes.
}); | ||
|
||
//wait for macOS animation to finish | ||
await new Promise((resolve) => setTimeout(resolve, 1000)); |
Copilot
AI
Oct 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded 1000ms timeout is a magic number. Consider extracting it to a named constant like MACOS_FULLSCREEN_ANIMATION_DELAY
to improve readability and maintainability.
Copilot uses AI. Check for mistakes.
Thank you for your contribution! We've added this to our internal tracking system for review. Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process. |
🎟️ Tracking
N/A
📔 Objective
Adds special handling for popout windows when the sender is in full-screen mode on macOS. The sender window transitions from full screen to maximized before opening the pop-out, and the new window becomes focused after creation to maintain the user flow and prevent the user from being redirected to a newly created desktop space.
inspired by #16797
📸 Screenshots
Screen.Recording.2025-10-11.at.19.33.10.mov
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes