Commit Graph
2503 Commits
Author SHA1 Message Date
Antonio Scandurra cbf84f3795 Merge pull request #2441 from zed-industries/implicit-ancestry
Determine view ancestry during layout
2023-05-05 10:58:00 +02:00
Antonio Scandurra 4277027223 Make focusing the parent an effect to avoid querying ancestors 2023-05-05 10:04:54 +02:00
Julia cac502638d Fixup cases using buffer model handle id as buffer id 2023-05-04 12:32:31 -04:00
Antonio Scandurra 206e64d67d Merge branch 'main' into implicit-ancestry 2023-05-04 17:19:06 +02:00
Antonio Scandurra 0b9c6ad77d Use Workspace::toggle_sidebar_item when clicking on sidebar button
Previously, we were mistakenly using `Sidebar::toggle_item`, which only
performs part of the toggle operation.
2023-05-04 17:06:37 +02:00
Antonio Scandurra 3c580153ed Merge branch 'main' into implicit-ancestry 2023-05-04 14:39:58 +02:00
Antonio Scandurra 1b1f2a3e5e Avoid re-allocating KeymapContext after every view notification 2023-05-04 12:04:30 +02:00
Antonio Scandurra f5c0e2c314 Remove WindowContext::is_child_focused 2023-05-04 09:53:35 +02:00
Antonio Scandurra 8c31093cc3 Ensure querying keystrokes or actions is safe
This is achieved by moving `available_actions` into `AsyncAppContext` (where
we know no view/window is on the stack) and `keystrokes_for_action` into `LayoutContext`
where we'll fetch the previous frame's ancestors and notify the current view if those
change after we perform a layout.
2023-05-04 09:53:31 +02:00
Max Brunsfeld 54815f70ed Merge branch 'main' into copilot-disabled-globs 2023-05-03 10:53:28 -07:00
Max Brunsfeld 647c3960d9 Add copilot menu item for enabling paths by glob 2023-05-03 10:14:01 -07:00
Antonio Scandurra a849bf931b Remove ViewContext::is_child 2023-05-03 19:09:07 +02:00
Antonio Scandurra ac7e73d494 Remove the ability to retrieve the view's parent 2023-05-03 16:52:55 +02:00
Antonio Scandurra 862cc2d132 Compute view ancestry at layout time 2023-05-03 16:36:14 +02:00
Antonio Scandurra bd74322351 Separate Window::build_scene into layout and paint 2023-05-03 12:18:16 +02:00
Antonio Scandurra 4e0ab2f8d0 Move methods querying window state into AsyncAppContext 2023-05-02 19:38:48 +02:00
Antonio Scandurra cd0c231879 Defer hiding the dock and going back/forward when Pane is on the stack 2023-05-01 17:06:05 +02:00
Antonio Scandurra 2742f1cb76 Remove ViewContext::dispatch_action 2023-05-01 16:27:36 +02:00
Antonio Scandurra 4bb90083cb Remove ViewContext::dispatch_any_action 2023-05-01 14:24:00 +02:00
Antonio Scandurra 8a579ad873 Remove SplitWithProjectEntry internal action 2023-04-28 12:19:38 +02:00
Antonio Scandurra b214e31a1a Remove SplitWithItem internal action 2023-04-28 12:17:31 +02:00
Antonio Scandurra 82a7fd3515 Remove RemoveWorktreeFromProject internal action 2023-04-28 12:11:59 +02:00
Antonio Scandurra a79f96cef1 Remove OpenSharedScreen internal action 2023-04-28 12:09:34 +02:00
Antonio Scandurra 856a06b5cb Remove JoinProject internal action 2023-04-28 11:22:04 +02:00
Antonio Scandurra 8dbbf9164f Remove ToggleFollow internal action 2023-04-28 10:07:44 +02:00
Antonio Scandurra 6878552804 Eliminate OpenPaths global action for workspace and replace with methods
We no longer want to invoke this with dispatch_action.
2023-04-27 18:36:28 -06:00
Antonio Scandurra 325648e38a 💄 2023-04-27 14:56:16 +02:00
Antonio Scandurra 69f2174e63 Remove OpenProjectEntryInPane internal action 2023-04-27 14:51:02 +02:00
Antonio Scandurra b9cae2d58d Remove Toast and DismissToast internal actions 2023-04-27 14:43:10 +02:00
Antonio Scandurra 1cdec71589 Remove internal actions from Dock 2023-04-27 14:29:15 +02:00
Antonio Scandurra b00dffa54b Remove internal actions from Pane 2023-04-27 14:23:26 +02:00
Antonio Scandurra d0a1109f62 Allow passing a handler function to context menu items 2023-04-27 11:32:12 +02:00
Antonio ScandurraandNathan Sobo fa65ca0628 Don't allow strong view handles to be read/updated with an AsyncAppContext
This avoids an invitation to hold strong view handles across async await
points, which is a common source of leaks.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-26 13:36:13 +02:00
Antonio Scandurra bdb273b753 Use a WeakViewHandle in Client for view message handlers 2023-04-26 12:21:02 +02:00
Antonio Scandurra aa747e8082 Allow direct read/update of WeakViewHandle only in AsyncAppContext 2023-04-26 12:20:57 +02:00
Antonio Scandurra 0571bed115 Remove unnecessary calls to WeakViewHandle::upgrade 2023-04-26 11:13:46 +02:00
Antonio Scandurra 947421133a Replace ViewContext::spawn with ViewContext::spawn_weak 2023-04-26 10:23:27 +02:00
Antonio Scandurra 2ebdfb9019 Merge remote-tracking branch 'origin/main' into fewer-context-traits 2023-04-26 09:54:58 +02:00
Max Brunsfeld d1f33d7052 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
Max Brunsfeld a17f009b00 Use a workspace dependency for the futures crate 2023-04-24 09:43:31 -07:00
Antonio ScandurraandNathan Sobo 6a2b4b47ef Remove ReadView and UpdateView traits
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-24 17:36:14 +02:00
Nathan Sobo 1e2bec9c25 Merge remote-tracking branch 'origin/main' into into-element 2023-04-21 14:27:25 -06:00
Nathan SoboandMax Brunsfeld 52d4cc5349 Refine naming of element-related types and traits
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 13:06:37 -06:00
2bd56ab6f0 Rename Drawable::boxed to into_element and make containers generic
Multi-element are now generic over any drawable child, which can be converted
into an element.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 12:43:19 -06:00
Mikayla Maki 1f01055a9d Merge pull request #2402 from zed-industries/fix-panics
Fix panic in pane.rs
2023-04-22 05:53:48 +12:00
Mikayla Maki d74f30753a Fix test covering this case 2023-04-21 10:48:34 -07:00
Mikayla Maki 246a4e0a89 Align return of close_active_item to match original format 2023-04-21 10:44:27 -07:00
Mikayla Maki 72d0782400 Fix panic in remove active item 2023-04-21 10:08:52 -07:00
Antonio ScandurraandNathan Sobo ae5f3c235e Introduce a new WindowContext::remove_window API
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-21 16:39:53 +02:00
Antonio Scandurra 64ef8b76d3 Take a target view when marking an element as draggable 2023-04-21 15:52:05 +02:00