Commit Graph
225 Commits
Author SHA1 Message Date
Nathan Sobo 41f87ec4e4 Merge pull request #719 from zed-industries/misc-breadcrumbs-bugs
Fix miscellaneous breadcrumbs bugs
2022-04-04 05:42:55 -06:00
Antonio Scandurra 856cac3df0 Remove duplicate activation logic when removing items from pane 2022-04-03 13:00:39 +02:00
Antonio Scandurra c00e97ad44 Prompt to save untitled buffers when closing them while they are dirty 2022-04-03 12:43:33 +02:00
Antonio Scandurra ec2464775f Update toolbar and automatically unfollow when navigating back and forth 2022-04-02 16:32:50 +02:00
Antonio Scandurra b6f4741a58 Prompt before closing buffer with unsaved changes or conflicts 2022-04-01 14:33:07 +02:00
Antonio Scandurra cc11f45a1a Introduce workspace::Item::reload to manually trigger a reload 2022-04-01 14:02:49 +02:00
Antonio Scandurra dddbf20c75 Let toolbar items specify flex when they have a primary location 2022-04-01 10:55:38 +02:00
Antonio Scandurra 52f1207b9b Hide breadcrumbs when project search has no results 2022-04-01 10:00:21 +02:00
Antonio Scandurra d89a7f6c2a Fix styling of project search bar 2022-04-01 09:59:36 +02:00
208c8d620d Style search in buffer below breadcrumbs
We still have issues with project search styling.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-31 11:44:16 -06:00
42203752e5 Render the search UI on a separate row from the breadcrumbs
- In project search, render it above the breadcrumbs
- In buffer search, render it below

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-31 10:36:39 -06:00
Antonio ScandurraandNathan Sobo 04d1c52456 Allow flex items to float to the end of the flex axis
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-30 16:46:14 +02:00
Antonio Scandurra 3e3af591d7 Restructure Pane to have a single Toolbar with multiple items 2022-03-29 11:48:21 +02:00
Antonio Scandurra 567500a6b5 Emit Event::PaneAdded in Workspace when a new pane is created 2022-03-29 10:24:42 +02:00
Nathan Sobo b0e20a4715 Merge pull request #682 from zed-industries/vim-hjkl
Vim hjkl
2022-03-26 07:11:46 -06:00
Keith SimmonsandNathan Sobo 4a4982d518 Add initial vim mode mode switching
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-25 20:10:37 -07:00
Nathan SoboandAntonio Scandurra a22e44d86c Clear out project registration and sharing state on disconnect
Previously, we weren't fully clearing the state associated with projects and worktrees when losing connection. This caused us to not see guest avatars disappear and not be able to re-share upon reconnect.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-25 10:15:08 -06:00
Antonio Scandurra 27fbbeffe9 WIP 2022-03-23 19:05:46 +01:00
Antonio ScandurraandNathan Sobo 7266849908 Cycle through panes spatially rather than in the order in which they created
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 15:06:25 +01:00
Antonio ScandurraandNathan Sobo beb370a308 Focus followed items when they become active if the pane is active
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 14:41:48 +01:00
Antonio ScandurraandNathan Sobo a4b0ec4a33 Activate previous pane and next pane via cmd-k cmd-left and cmd-k cmd-right
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 14:26:00 +01:00
Nathan Sobo a207d05604 Update follow binding, remove unfollow binding
The previous binding to follow had ergonomics issues for the frequency that I think we'll want to use it. It would also conflict with the sub-word selection binding.

Now that moving the cursor etc unfollows, I don't think we need the follow binding.
2022-03-23 06:19:35 -06:00
Max BrunsfeldandNathan Sobo 4436301fa3 Coalesce followed view updates only within one frame
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 17:03:24 -07:00
Max BrunsfeldandNathan Sobo b920b865c4 Combine updates from multiple view events when updating followers
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 16:22:42 -07:00
Max Brunsfeld a0d18fc007 Allow customizing the pane's following border width in the theme 2022-03-22 13:32:25 -07:00
Antonio Scandurra b6dd7c1662 WIP 2022-03-22 13:35:37 +01:00
Antonio Scandurra cbf7584ad3 Merge branch 'main' into follow 2022-03-22 11:20:55 +01:00
Antonio Scandurra 2fea8a3cda Stop following when leader disconnects 2022-03-22 11:16:04 +01:00
Antonio Scandurra e3bd33a549 Forget last pane's leader when such pane is removed
This is just a memory optimization and doesn't cause any observable
change in behavior.
2022-03-22 11:06:52 +01:00
Antonio Scandurra fa960c0e43 Follow last collaborator or the next one via cmd-alt-shift-f 2022-03-22 10:16:58 +01:00
Antonio Scandurra 3f03d2b641 Stop following when activating a different item on the follower pane 2022-03-22 09:42:37 +01:00
Antonio Scandurra 0de3f0980f Automatically unfollow when editing, scrolling or changing selections 2022-03-22 09:17:01 +01:00
Max Brunsfeld 0cc1f68b61 WIP - Start work on unfollowing automatically 2022-03-21 21:52:28 -07:00
Max Brunsfeld c9aa130958 Show borders around avatars and panes to indicate following state 2022-03-21 15:12:15 -07:00
Max BrunsfeldandAntonio Scandurra 18848bd463 Match the leader's last selection when unfollowing
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-21 14:04:55 -07:00
Max BrunsfeldandAntonio Scandurra 3cfde9b2e6 Avoid infinite loop when collaborators follow each other
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-21 11:47:00 -07:00
Antonio Scandurra 995149babe 💄 2022-03-21 18:16:06 +01:00
Antonio Scandurra 9300c2add6 Allow unfollowing of leaders by clicking on their avatar 2022-03-21 17:10:23 +01:00
Antonio Scandurra 5e249ad324 Implement Workspace::unfollow
This also changes the structure of the follow state back to be per-pane. This
is because we can't share the same view state across different panes for
a couple of reasons:

- Rendering the same view in N different panes is almost always not something
that we want due to global state such as focus.
- If we allowed it and a user followed the same person in two different panes,
there would be no way of unfollowing in one pane without also unfollowing in
the other.
2022-03-21 16:55:18 +01:00
Antonio Scandurra f04e08eb4b Hide cursor both locally and remotely when following 2022-03-21 15:16:56 +01:00
Nathan Sobo 6a987cedcc Pass project entry id to Pane when opening a project items
This fixes an oversight where we were failing to associate project items with their project entry ids, which broke the logic that prevented the same project entry from being opened twice in the same pane.
2022-03-20 08:54:20 -06:00
Max Brunsfeld 2163cacb0c Handle view updates when following
Basic following now works. Editors' scroll positions
are their only replicated view state.
2022-03-18 15:56:57 -07:00
Max Brunsfeld 0be1a81fbb Allow clicking a titlebar avatar to initiate following 2022-03-18 13:37:07 -07:00
Max Brunsfeld 395d11d98b Allow FollowableItem::to_state_message to return None
This way, we can avoid a panic if we don't handle certain cases,
like a non-singleton editor.
2022-03-18 13:36:05 -07:00
Max BrunsfeldandAntonio Scandurra 70e323e4dc Start work on updating editors's scroll positions when following
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-18 12:56:20 -07:00
Max BrunsfeldandAntonio Scandurra a1e22c5feb Rename FollowedItem -> FollowableItem
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-18 10:12:51 -07:00
Antonio Scandurra f80a5578ec WIP 2022-03-18 18:07:03 +01:00
Antonio Scandurra 2831546bce Broadcast active view to followers 2022-03-18 16:00:03 +01:00
Antonio Scandurra d5c008d1c3 Allow accessing workspace after adding item to pane 2022-03-18 14:59:53 +01:00
Antonio Scandurra 55322903a9 WIP: Start on sending view updates to followers 2022-03-18 14:20:09 +01:00