Skip to content

Conversation

stlocz
Copy link

@stlocz stlocz commented Oct 11, 2025

🎟️ 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

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 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

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
@stlocz stlocz requested a review from a team as a code owner October 11, 2025 18:03
@stlocz stlocz requested review from addisonbeck and Copilot October 11, 2025 18:03
Copy link

@Copilot Copilot AI left a 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 () => {
Copy link

Copilot AI Oct 11, 2025

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'.

Suggested change
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));
Copy link

Copilot AI Oct 11, 2025

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.

@bitwarden-bot
Copy link

Thank you for your contribution! We've added this to our internal tracking system for review.
ID: PM-26821
Link: https://bitwarden.atlassian.net/browse/PM-26821

Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process.

@bitwarden-bot bitwarden-bot changed the title [PM-26724] Improve macOS fullscreen ux [PM-26821] [PM-26724] Improve macOS fullscreen ux Oct 11, 2025
@bitwarden-bot bitwarden-bot added community-pr needs-qa Marks a PR as requiring QA approval labels Oct 11, 2025
@stlocz stlocz changed the title [PM-26821] [PM-26724] Improve macOS fullscreen ux [PM-26821] Improve macOS fullscreen ux Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-pr needs-qa Marks a PR as requiring QA approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bitwarden Chrome extension opens new full-screen window on macOS when prompted for passkey

2 participants