Skip to content
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

MacOS: Resolves #9488: Add "Window" menu to toolbar on MacOS #9859

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Feb 5, 2024

Summary

This pull request resolves #9488 by allowing the MacOS "Window" menu to be shown. This pull request also allows configuring "minimizeWindow" through Joplin's keyboard shortcut settings.

Other apps I've looked at (VSCode, Firefox, Finder, Calculator, Safari, Terminal) also show the "Window" menu. Additionally, it's mentioned in Apple's Human Interface Guidelines.

Screenshot

screenshot: Window menu contains Tile Window to Left of Screen, Tile Window to Right of Screen, Replace Tiled Window (greyed), Remove Window From Set (greyed), and Minimize

Notes

  • If launching Joplin in development mode, the development tools are initially shown. This causes tab-related menu items to be shown in the menu. This does not seem to be an issue in release mode, where the development tools are not shown on startup. (Related StackOverflow post).
    • screenshot: Window menu shows extra items related to tabs

To-do

  • Test on a non-MacOS computer and verify that the "Window" menu is not shown.

Testing

MacOS:

  1. Start Joplin
  2. Press cmd-m and verify that the window is minimized
  3. Unminimize Joplin
  4. Open Joplin's settings and change the keyboard shortcut for "minimise" to cmd-shift-j.
  5. Close settings and press cmd-shift-j
  6. Unminimize Joplin
  7. Open the "Window" menu and click "minimize"
  8. Verify that Joplin has been minimized.
  9. Open the "Window" menu and click "Tile window to left of screen". Verify that the window has been tiled.

This has been successfully tested on MacOS Sonoma.

Linux:

  1. Start Joplin
  2. Verify that the "Window" menu is not visible
  3. Open settings > Keyboard shortcuts
  4. Verify that "minimise" is not a command in the keyboard shortcut settings pane.

This has been tested successfully on Ubuntu 23.10.

@personalizedrefrigerator personalizedrefrigerator changed the title MacOS: Resolves #9488: Add "Window" menu to toolbar MacOS: Resolves #9488: Add "Window" menu to toolbar on MacOS Feb 5, 2024
@@ -851,7 +869,7 @@ function useMenu(props: Props) {
accelerator: keymapService.getAccelerator('help'),
click() { void bridge().openExternal('https://joplinapp.org'); },
}, {
label: _('Joplin Forum'),
label: _('Joplin Forumm'),
Copy link
Owner

Choose a reason for hiding this comment

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

A typo here, otherwise I think we can merge

@@ -20,6 +20,8 @@ const getLabel = (commandName: string): string => {
return _('Website and documentation');
case 'hideApp':
return _('Hide Joplin');
case 'minimizeWindow':
return _('Minimize');
Copy link
Owner

Choose a reason for hiding this comment

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

The text should be "Minimise" (the command name however should indeed use US English)

@laurent22 laurent22 merged commit e462881 into laurent22:dev Feb 6, 2024
10 checks passed
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.

macos cmd+m shortcut doesn't work in desktop app
2 participants