Commit Graph
331 Commits
Author SHA1 Message Date
Max Brunsfeld d791858a07 Adjust pane, tab, panel management bindings to match VS Code 2022-06-29 15:33:46 -07:00
Max Brunsfeld 3973098faf Exclude hidden worktrees from project's diagnostic summaries 2022-06-28 14:23:24 -07:00
Antonio Scandurra 03ce0f633f 💄 2022-06-28 08:04:39 +02:00
Antonio Scandurra 677db5fcd1 Add test for reopening closed items 2022-06-27 17:59:25 +02:00
Antonio Scandurra e8aa673c39 Introduce pane::ReopenClosedItem bound to cmd-shift-t 2022-06-27 17:44:33 +02:00
Antonio Scandurra d0a3f73907 Update window edited status when pane item is removed 2022-06-23 14:28:10 +02:00
Antonio Scandurra ae5c838ee4 Always prevent window from closing and manually invoke Workspace::close
This ensures we ask the user to save their state if there are unsaved
changes.
2022-06-23 11:44:14 +02:00
Antonio Scandurra 0fe62ab0ab Set window's edited = true when there are unsaved changes 2022-06-23 10:59:50 +02:00
Antonio Scandurra 5589b9d345 Replace "Remove Folder from Project" label with "Remove from Project` 2022-06-20 10:53:26 +02:00
Max Brunsfeld 91d7e33ce5 Return focus to the workspace center on escape 2022-06-16 11:30:02 -07:00
Antonio Scandurra 7fbfa16b68 Open a buffer for every language server error when clicking on status 2022-06-16 10:00:29 +02:00
Antonio Scandurra 2296e5a08d Add tooltip to follow collaborators 2022-06-15 17:08:39 +02:00
Antonio Scandurra 0fef627123 Add tooltips for sidebar buttons 2022-06-15 13:50:04 +02:00
Antonio Scandurra 87394db13d Replace pane::Split action with Split{Left,Up,Right,Down}
This allows us to show them in the command palette.
2022-06-15 13:06:59 +02:00
Antonio Scandurra 297842b911 Broadcast only visible worktree root names 2022-06-14 15:15:23 +02:00
Antonio Scandurra ebcbcc3956 Prevent setting files from showing up in project and contacts panels 2022-06-14 14:47:16 +02:00
Max Brunsfeld a71a9eb665 Prompt to save changes before quitting the app 2022-06-10 17:26:33 -07:00
Antonio Scandurra 77224e023a Require that PartialEq is implemented for Action 2022-06-06 09:18:44 +02:00
Antonio Scandurra ca99157d9e Capture mouse events when rendering disconnected overlay
We do so by replacing `EventHandler::capture` with a new `::capture_all` method.
After switching to mouse regions as part of zed-industries/zed#1081, overriding
`dispatch_event` on `EventHandler` wasn't enough anymore because mouse interactions
take place on a privileged code path that runs *before* dispatching any event.

With this change, `EventHandler` will now push a mouse region that intercepts all
mouse interactions, as well as pushing a cursor region that resets the cursor style
to `Arrow`.

One interesting change as part of this is that we've removed the ability to see which
event we are capturing: we were not using this capability anyway and `capture_all` provides
a simpler interface, so I went with that. In the future, we can opt into capturing specific
events or mouse interactions if there's a code path that needs that.
2022-06-04 10:41:29 +02:00
Max Brunsfeld 99fb11eb53 Rename a public/private to online/offline in a few more places 2022-06-03 17:08:44 -07:00
Max Brunsfeld 20565017ec Rename project's 'public'/'private' flag to 'online'/'offline' 2022-06-03 14:39:06 -07:00
Max BrunsfeldandAntonio Scandurra b431b4b421 Move persistence and restoration logic from workspace into project
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-03 11:52:14 -07:00
Max BrunsfeldandAntonio Scandurra c2e18bda45 Add tooltip to the toggle public button in the contacts panel
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-03 10:36:29 -07:00
Max Brunsfeld 6263737ec8 Use rocksdb to store project paths' public/private state 2022-06-02 17:38:33 -07:00
Max Brunsfeld 4bb17889e8 Allow making projects private 2022-06-02 17:32:42 -07:00
Max Brunsfeld f04e05f966 Show private projects in the contacts panel
Introduce a ProjectStore that lets you iterate through all open projects.
Allow projects to be made public by clicking the lock.
2022-06-02 17:29:11 -07:00
Max Brunsfeld ae57175611 Start work on private projects 2022-06-02 17:29:11 -07:00
Antonio Scandurra eaf133b04e Jump to primary diagnostic when clicking on header's jump icon 2022-05-31 16:25:14 +02:00
Antonio Scandurra cf0c9b089c Merge branch 'main' into project-panel-with-new-mouse-events 2022-05-30 18:29:46 +02:00
Max Brunsfeld b07d00020e Populate the window title whenever worktrees or active path change
* Refactor the way the project's active entry is assigned. Assign it
  together with the window title, as opposed to on every notification
  from a pane.
* Emit the ActiveItem event from panes consistently, even when adding
  the first item to an empty pane.
2022-05-27 10:51:14 -07:00
Antonio Scandurra d71e5455a0 Merge branch 'mouse-events' into project-panel-context-menu 2022-05-27 12:07:00 +02:00
Antonio Scandurra 6d92c9188c Use a MouseEventHandler for activating tabs on mouse down
Previously, we were using an `EventHandler` which doesn't take into
account other mouse regions floating above the rendered element. This
was problematic because, when clicking the `x` icon on a tab that was
not active, we were first activating it and then closing it.
2022-05-27 11:43:58 +02:00
Antonio Scandurra 351ac2bd38 Don't focus editor when clicking on sidebar resize handle 2022-05-27 11:36:37 +02:00
Nathan SoboandMax Brunsfeld eb71ed400b Switch MouseEventHandler to use MouseRegions
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-26 20:00:01 -06:00
Antonio Scandurra 355f8469f2 Introduce keyboard navigation in context menus 2022-05-26 16:36:30 +02:00
Antonio Scandurra 919d5fd68b Start adding project panel context menu actions 2022-05-26 15:23:40 +02:00
Nathan Sobo 287aff941e Render a context menu when right-clicking in project panel
It doesn't currently do anything, but I managed to get it rendering in an absolutely positioned way.
2022-05-26 09:59:25 +02:00
Max Brunsfeld d14224a54d Merge pull request #1027 from zed-industries/missing-menu-commands
Add missing File menu commands, improve handling of unsaved multibuffers
2022-05-23 21:29:32 -07:00
Max Brunsfeld 84b10ded17 Fix comments in Pane::close_items 2022-05-23 18:07:22 -07:00
Max BrunsfeldandNathan Sobo 65c8bea372 Distinguish between singleton and non-singleton workspace items
* Prompt to save singleton items before non-singleton ones
* Don't prompt to save multi-buffers if they contain excerpts to items that are open elsewhere and not being closed.

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-23 16:03:00 -07:00
Nathan Sobo d1bcff6ea8 Merge remote-tracking branch 'origin/main' into invite-codes-2 2022-05-23 15:46:39 -06:00
Max Brunsfeld 259d76aa40 Start work on handling multibuffers properly when closing unsaved buffers 2022-05-22 16:48:33 -07:00
Max Brunsfeld 3519a4ed45 Add "Close Window" command 2022-05-20 16:53:03 -07:00
Max Brunsfeld 4f8c867287 Add "Save As" command 2022-05-20 16:24:42 -07:00
Max Brunsfeld e15ed5e5d6 Add "Add Folder to Project" command to application menu 2022-05-20 16:19:43 -07:00
Max Brunsfeld 6082282925 Add "New Window" command 2022-05-20 11:01:20 -07:00
Antonio ScandurraandNathan Sobo 5954c1b146 Show contacts panel the first time a new user connects to collab
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-20 17:33:09 +02:00
Max Brunsfeld a500249333 Replace build_workspace fn with an initialize function that takes a workspace
This makes it clearer that the function is not providing necessary
dependencies to a workspace, but rather configuring it with all of
the panels and widgets which are defined in downstream crates.
2022-05-19 16:50:22 -07:00
Max Brunsfeld e6011794ca Remove AppState from workspace actions
This allows those actions to be bound to keystrokes in the keymap.
Also, remove the WorkspaceParams struct, simplify how Workspaces are
constructed.
2022-05-19 14:37:26 -07:00
Max BrunsfeldandNathan Sobo 221bb40dc4 Avoid duplicate notifications
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-17 11:19:22 -07:00