Add Linux Ctrl+= alias for Zoom In shortcut#854
Add Linux Ctrl+= alias for Zoom In shortcut#854Mohatje wants to merge 1 commit intopingdotgg:mainfrom
Conversation
- register a hidden Linux-only `Ctrl+=` accelerator mapped to `zoomIn` - keeps existing menus unchanged while fixing expected zoom shortcut behavior
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| ...(process.platform === "linux" | ||
| ? [ | ||
| { | ||
| label: "Zoom In Alias", | ||
| accelerator: "Ctrl+=", | ||
| role: "zoomIn" as const, | ||
| visible: false, | ||
| }, | ||
| ] | ||
| : []), | ||
| { role: "windowMenu" }, |
There was a problem hiding this comment.
🟡 Medium src/main.ts:590
The Zoom In Alias menu item is added to the top-level menu template with visible: false, but Electron ignores this property on Linux top-level items. As a result, users see a literal "Zoom In Alias" entry in the menu bar (File Edit View Zoom In Alias Window Help). Place this item inside the View submenu instead, where visible: false is respected.
- { role: "viewMenu" },
- ...(process.platform === "linux"
- ? [
- {
- label: "Zoom In Alias",
- accelerator: "Ctrl+=",
- role: "zoomIn" as const,
- visible: false,
- },
- ]
- : []),
- { role: "windowMenu" },🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file apps/desktop/src/main.ts around lines 590-600:
The `Zoom In Alias` menu item is added to the top-level menu template with `visible: false`, but Electron ignores this property on Linux top-level items. As a result, users see a literal "Zoom In Alias" entry in the menu bar (File Edit View Zoom In Alias Window Help). Place this item inside the View submenu instead, where `visible: false` is respected.
Evidence trail:
1. apps/desktop/src/main.ts lines 590-598 at REVIEWED_COMMIT: shows 'Zoom In Alias' menu item with `visible: false` added to top-level template on Linux
2. Electron issue #8703 (https://github.com/electron/electron/issues/8703): Documents that `visible`/`enabled` properties don't work for top-level menu items, closed as wontfix with explanation about architectural limitation
Closes #852
What Changed
Why
Checklist
Note
Add
Ctrl+=as a Linux alias for the Zoom In shortcutOn Linux,
Ctrl++andCtrl+=are distinct key combinations, so the standard zoom-in accelerator misses the=key. A hidden menu item withrole: zoomInandaccelerator: Ctrl+=is conditionally added in main.ts whenprocess.platform === 'linux'.📊 Macroscope summarized b48f99d. 1 file reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted
🗂️ Filtered Issues