zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.95k stars 3.16k forks source link

Open recent files and open recent sub-menus #18126

Open mocenigo opened 2 months ago

mocenigo commented 2 months ago

Check for existing issues

Describe the feature

Most macOS apps that work with documents have a submenu on "open recent". I understand that in this case it is a project based editor, so the proposal would be to have two "open recent" items under the "File" menu.

The first one is "Open recent project", and attached to it there would be a sub-menu with a list of recently opened directories.

The second one is "Open recent files", and attached to it there would be a sub-menu with a list of recently opened files.

An alternative approach would be to mimic the global macOS "Recent Items" menu under the Apple Menu. It is divided into "Applications", "Documents", and "Servers". A "Recent Items" submenu of the File menu in Zed could have two sections, one called "Projects" and the second one called "Documents".

I believe this is a must-have feature for a macOS application and I have no preference for the specific implementation. Perhaps the second one (single item, thus single sub-menu with two sections) is more elegant.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

brainrake commented 2 months ago

Cmd-P (file finder) and Cmd-Shift-P (command palette) and Cmd-Shift-O (open recent project) all show menus with recent item history. The Project menu has an "open recent projects" item, which opens the above menu, although not as a submenu. I don't use the menu bar, the command palette is way more useful, with its search feature. So all this is already implemented and available. That said, sticking to OS conventions is fine and good.

mocenigo commented 2 months ago

Cmd-P (file finder) and Cmd-Shift-P (command palette) and Cmd-Shift-O (open recent project) all show menus with recent item history.

Cmd-P only displays recent files in the current session — i.e. since it was last started. I mean something like the "Open Recent" in macOS, which is the list recently opened file by the same application. This is currently missing.g

That said, sticking to OS conventions is fine and good.

People firtst opening an editor on a Mac expect that menu to work that way. Not seeing a submenu of choices makes a very bad impression, it makes the application look like an extraneous body, and users would be discouraged from going further. I know that this sounds a but harsh, but if the Zed devs care about adoption, that should be there: it should be an easy thing to do and would improve the feel.