zed icon indicating copy to clipboard operation
zed copied to clipboard

"Open Recent" should be available with no open windows

Open igorgusarov opened this issue 3 months ago • 3 comments

Check for existing issues

  • [X] Completed

Describe the feature

Currently if you close all windows of Zed and try to open a recent project, the "File / Open Recent" menu item is disabled. It should be available even when no windows are open.

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

Screenshot 2024-04-02 at 20 38 17

igorgusarov avatar Apr 03 '24 03:04 igorgusarov

For the reference, this is probably being greyed out due to recent_projects::OpenRecent being registered on a workspace and not as a global action; the code responsible for greying out menu items checks for action availability: https://github.com/zed-industries/zed/blob/main/crates/gpui/src/platform/app_menu.rs#L104

However, I don't think we have a precedent for having modals without a workspace associated with them, so this might require a deeper cut.

osiewicz avatar Apr 03 '24 09:04 osiewicz

I wonder if we could fall back to just showing the recents in the menu, if a workspace isn't avaiable, as VS Code does, but maybe that would be weird, having two different mechanisms. I do like custom version because I prefer being able to filter down via text.

Side note, I'm positive I have an issue about this lying around, but I cannot find it, for the life of me. 🤣

JosephTLyons avatar Apr 04 '24 19:04 JosephTLyons

I have to say that I would actually prefer the menu variant, as it would allow me to use the keyboard to navigate down the menu and through the recently opened projects. This is also how 'open recent' works in practically all Mac applications. To show the modal window variant, I would prefer to have that be its own menu entry in that 'open recent' menu.

The modal window would then be great to allow filtering, show way more items and add additional UI to filter that down (by date, project type, path whatever).

If it is hard to show that while no workspace is open, you could also gray out only that additional menu entry to show the UI and still allow using the menu entries in the meantime. Then fix the modal UI later.

dwt avatar Apr 18 '24 12:04 dwt