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

Correct built-in open and save menu items. #930

Merged
merged 3 commits into from
May 15, 2020

Conversation

luleyleo
Copy link
Collaborator

Second part of #908 .

Based on the Zulip discussion here.

On Windows / Linux:

  • save_ellipsis now actually displays an ellipsis.

On mac:

  • open_file shows the dialog instead of submitting an invalid OPEN_FILE command.

All:

  • save_ellipsis shows the dialog and thus behaves like save_as instead of save.

@luleyleo luleyleo added the S-needs-review waits for review label May 15, 2020
@@ -566,8 +566,8 @@ pub mod sys {
/// The 'Save' menu item.
Copy link
Member

Choose a reason for hiding this comment

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

Update the comment here for Windows. Just take the macOS comment I think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks! I knew I would forget something when splitting things up 😅

@xStrom xStrom added S-waiting-on-author waits for changes from the submitter and removed S-needs-review waits for review labels May 15, 2020
@luleyleo luleyleo added S-needs-review waits for review and removed S-waiting-on-author waits for changes from the submitter labels May 15, 2020
Copy link
Member

@xStrom xStrom left a comment

Choose a reason for hiding this comment

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

Looks good!

@xStrom xStrom removed the S-needs-review waits for review label May 15, 2020
@luleyleo luleyleo merged commit 3f4613e into linebender:master May 15, 2020
@cmyr
Copy link
Member

cmyr commented May 17, 2020

Just for the historical record: a lot of this menu stuff is specifically motivated by my wanting, on the mac, to mimic the look and behaviour of Cocoa apps.

In particular this means that if you are an app that manages documents, and you have a new unsaved document, the "save" menu item is titled "Save..." and will bring up the save panel; that is it behaves like "save as". If you've already saved the document, it is titled "Save", does not bring up the dialog, and just saves it at its existing location.

In Cocoa menus, any menu item that will ask for additional options has a trailing ellipsis; menu items that work without further input do not.

So I'm not totally sure if this makes sense on windows or elsewhere, or not?

@luleyleo
Copy link
Collaborator Author

@cmyr We had a rather long Zulip discussion (linked in the PR comment) where we discovered that basically all platforms recommend doing this, it's just that they do not adhere to their own guidelines.

@xStrom
Copy link
Member

xStrom commented May 17, 2020

The Windows and Gnome/KDE docs recommend that exact same approach. In practice nobody follows it.

That said, I think it's fine (and simplifies things) if we just recommend the "Save..." -> "Save" situation (like it works on macOS) on all platforms.

@cmyr
Copy link
Member

cmyr commented May 17, 2020

One thing I'd like to do in the future is to rework menus to work more like widgets; that is they can be computed based on the data, and updated automatically. In this world if we can just have some way to check that a document has a path, we can do this automatically.

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.

3 participants