-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Win desktop app minimize to tray #9890
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
Conversation
Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
|
Connected to Huly®: UBERF-13726 |
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 pull request introduces a comprehensive minimize-to-tray feature for the desktop application by implementing a new Settings abstraction and tray management system. The changes improve application modularity by centralizing settings management and enhance user experience with proper tray integration.
- Introduces a new
Settingsclass to centralize application settings management, replacing direct electron-store usage - Adds minimize-to-tray functionality with tray controller, badge notifications, and proper window management
- Refactors menu system to support dynamic tray settings and improved event handling
Reviewed Changes
Copilot reviewed 17 out of 117 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| desktop/start-dev.ps1 | Removes redundant comments for cleaner script |
| desktop/src/ui/types.ts | Adds minimize-to-tray action and IPC methods, reformats menu actions array |
| desktop/src/ui/titleBarMenuState.ts | Code style improvements with consistent formatting and null comparisons |
| desktop/src/ui/titleBarMenu.ts | Updates menu setup to be async and adds tray toggle functionality |
| desktop/src/ui/preload.ts | Adds IPC handlers for minimize-to-tray settings |
| desktop/src/ui/index.ts | Updates menu initialization to handle async setup |
| desktop/src/main/windowsSpecificSetup.ts | Code cleanup and formatting improvements |
| desktop/src/main/trayUtils.ts | New utility for tray badge icon management |
| desktop/src/main/tray.ts | New tray controller implementation |
| desktop/src/main/start.ts | Major refactor to use Settings class and implement tray functionality |
| desktop/src/main/settings.ts | New Settings abstraction for centralized configuration management |
| desktop/src/main/path.ts | New utility for bundled file path resolution |
| desktop/src/main/customMenu.ts | Updates menu actions to support tray toggle |
| desktop/src/main/config.ts | Minor path construction fix |
| desktop/src/test/main/trayUtils.test.ts | Comprehensive tests for tray badge logic |
| desktop/src/test/main/settings.test.ts | Complete test suite for Settings class |
| desktop/src/test/main/selfCheckingNode.test.ts | Code formatting cleanup |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
This pull request introduces a new
Settingsabstraction for managing application settings and refactors related logic throughout the desktop app. It also adds tests for settings management, introduces a new utility for accessing bundled files, and improves tray and window management behavior.Settings abstraction and refactor:
Settingsclass insettings.tsto encapsulate reading and writing of settings such as server URL, minimize-to-tray, and window bounds, replacing direct use ofelectron-store. All logic for handling these settings is now centralized in this class.start.tsto use the newSettingsclass throughout, including for reading the server URL, window bounds, and minimize-to-tray state. This removes duplicated logic and simplifies the main process code. [1] [2] [3] [4]Testing improvements:
Settingsclass, covering all major behaviors and edge cases.trayUtils.test.ts.Tray and window management enhancements:
Utilities and configuration:
Other:
These changes collectively improve the modularity, testability, and user experience of the desktop application.