Skip to content

Conversation

@sejas
Copy link
Member

@sejas sejas commented Sep 4, 2024

Proposed Changes

  • Added a new menu item to make the Studio App floating over the rest of windows, to make easier to interact with the assistant and the window site.
  • This option is not saved as a user preference and it's set as the default false (non floating) after Studio restarts, this respects how QuickTime works.

Testing Instructions

  • Run npm start
  • Click on View in the the top menu
  • Observe the new menu item "Float on Top of All Other Windows"
  • Click on the menu item
  • Observe the Studio window floats over all other screens
  • Click again in the menu item "Float on Top of All Other Windows" to deselect it
  • Observe the Studio window does not float, and other windows can be on top of it
QJa8NX.mp4

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@sejas sejas self-assigned this Sep 4, 2024
@sejas sejas requested a review from a team September 4, 2024 16:05
Copy link
Contributor

@fluiddot fluiddot left a comment

Choose a reason for hiding this comment

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

LGTM 🎊 ! Tested on macOS and Windows.

I added a comment regarding where to place the new item but shouldn't block the PR.

Copy link
Contributor

@katinthehatsite katinthehatsite left a comment

Choose a reason for hiding this comment

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

The changes look good and the functionality works as expected. It would be nice to move this to the Window section as suggested by another comment

@sejas
Copy link
Member Author

sejas commented Sep 5, 2024

@fluiddot , @katinthehatsite , Thanks for reviewing it. I've updated the code to fix a bug in Windows, I would appreciate a second review.

I decided to put it under View to follow other apps like QuickTime. Let me know what you think. The change is trivial.

While testing on Windows, I've noticed the toggle was not working. Once the user clicked on the menu item, it was not "checked" and the window was floating constantly even after clicking the menu item for second or third time.

Fixed here: 99908d1

@fluiddot
Copy link
Contributor

fluiddot commented Sep 5, 2024

While testing on Windows, I've noticed the toggle was not working. Once the user clicked on the menu item, it was not "checked" and the window was floating constantly even after clicking the menu item for second or third time.

@sejas Ah, interesting. I didn't encounter this when I tested it on Windows. What Windows version have you tested it?

@sejas
Copy link
Member Author

sejas commented Sep 5, 2024

@fluiddot , I'm using Windows 11 Home.

I've observed that the menu in Windows is being "rendered" inside the App, and that's probably why the auto-toggle is not working out of the box.

I encountered a couple of related issues:

They solve it by calling trayIcon.setContextMenu , but we are not using any Tray which we don't. My understanding is that the menu is generated each time a user opens it in Windows.

Copy link
Contributor

@fluiddot fluiddot left a comment

Choose a reason for hiding this comment

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

LGTM 🎊 ! I've re-tested it in both macOS and Windows and worked nice.

@sejas sejas merged commit d98ea0f into trunk Sep 5, 2024
@sejas sejas deleted the add/studio-float-on-top branch September 5, 2024 17:54
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.

4 participants