Kirill Bulatov
13296d502c
Extra rows approach draft
...
co-authored-by: Max <max@zed.dev>
2023-05-10 11:11:31 +03:00
Nathan Sobo
f554877ff4
Render the bottom dock buttons before the right dock buttons
2023-05-09 17:41:24 -06:00
Nathan Sobo
6a7feb4c4c
Allow the project panel to be docked right or left
...
Co-Authored-By: Joseph Lyons <joseph@zed.dev>
2023-05-09 17:26:54 -06:00
Nathan Sobo
6d16d2224d
Merge branch 'main' into panels
2023-05-09 16:35:04 -06:00
Mikayla Maki
0214228689
Fix format
2023-05-09 12:54:53 -07:00
Nathan Sobo
6645323f1b
WIP
2023-05-09 13:28:34 -06:00
Mikayla Maki
6dfb48dbd5
Fix center items not being activated when deserialized
2023-05-09 12:27:07 -07:00
Mikayla Maki
8d561d6408
Make dock not eagerly steal focus from sub items
2023-05-09 12:00:09 -07:00
Antonio Scandurra
8f12489937
WIP: Allow panels to be moved
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-05-09 18:57:25 +02:00
Antonio Scandurra
45df09245b
Remove unused code
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-05-09 18:06:59 +02:00
Antonio Scandurra
37d3ed5f5f
Focus new item if pane was focused when removing previous active item
...
Previously, we were relying on the item getting blurred and the workspace
receiving focus, which would in turn focus the active pane. This doesn't
play well with docks because they aren't part of the workspace panes.
2023-05-09 17:38:54 +02:00
Antonio Scandurra
634b699281
Allow customization of Pane
tab bar buttons
2023-05-09 15:05:29 +02:00
Antonio Scandurra
ad7f32d7d2
Fix bottom dock resizing
2023-05-09 14:46:15 +02:00
Antonio Scandurra
26fe7a81f3
Prevent splits in the terminal panel
2023-05-09 12:29:16 +02:00
Antonio Scandurra
e6be35c9a5
Show terminal count in panel button
2023-05-09 12:21:35 +02:00
Antonio Scandurra
02066afb0e
Don't pass &mut Workspace
when closing items in a Pane
...
This allows closing items via actions even in the `TerminalPanel`
where the `Pane` is not directly owned by a `Workspace`.
2023-05-09 11:45:39 +02:00
Antonio Scandurra
506f978c41
Automatically close terminal dock when the last terminal was closed
2023-05-09 10:18:11 +02:00
Antonio Scandurra
916612caf1
Prevent dragging items that aren't terminals to the terminal panel
2023-05-09 10:18:11 +02:00
Antonio Scandurra
6ddc610fa2
WIP: Start on TerminalPanel
2023-05-09 10:18:11 +02:00
Nathan Sobo
1ddbda5095
Rename DockItem to Panel
2023-05-09 10:18:11 +02:00
Nathan Sobo
03f8c1206a
Rename Sidebar to Dock
2023-05-09 10:18:10 +02:00
Nathan Sobo
1919a826f9
Remove dock from workspace
2023-05-09 10:18:10 +02:00
Mikayla Maki
fa049bea6e
Refactor and fix format
2023-05-08 17:32:40 -07:00
Mikayla Maki
49335d017a
Add manual removal code to remove_panes
2023-05-08 17:25:28 -07:00
Mikayla Maki
9b2d3fcd48
Fully remove panes and update internal data structures
2023-05-08 17:09:29 -07:00
Antonio Scandurra
0296974ab1
Merge pull request #2441 from zed-industries/implicit-ancestry
...
Determine view ancestry during layout
2023-05-05 10:58:00 +02:00
Antonio Scandurra
80ad59a620
Make focusing the parent an effect to avoid querying ancestors
2023-05-05 10:04:54 +02:00
Julia
eacea55aaf
Fixup cases using buffer model handle id as buffer id
2023-05-04 12:32:31 -04:00
Antonio Scandurra
d6b0569bed
Merge branch 'main' into implicit-ancestry
2023-05-04 17:19:06 +02:00
Antonio Scandurra
64e0c16baa
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
da19edc3e3
Merge branch 'main' into implicit-ancestry
2023-05-04 14:39:58 +02:00
Antonio Scandurra
3d679ddb26
Avoid re-allocating KeymapContext
after every view notification
2023-05-04 12:04:30 +02:00
Antonio Scandurra
f6f18be9c3
Remove WindowContext::is_child_focused
2023-05-04 09:53:35 +02:00
Antonio Scandurra
92183e0d72
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
9d41f83b1b
Merge branch 'main' into copilot-disabled-globs
2023-05-03 10:53:28 -07:00
Max Brunsfeld
8eb1312deb
Add copilot menu item for enabling paths by glob
2023-05-03 10:14:01 -07:00
Antonio Scandurra
9e8f852afb
Remove ViewContext::is_child
2023-05-03 19:09:07 +02:00
Antonio Scandurra
e9ed40da37
Remove the ability to retrieve the view's parent
2023-05-03 16:52:55 +02:00
Antonio Scandurra
7f137ed3dd
Compute view ancestry at layout time
2023-05-03 16:36:14 +02:00
Antonio Scandurra
7f345f8bf5
Separate Window::build_scene
into layout
and paint
2023-05-03 12:18:16 +02:00
Antonio Scandurra
70f8cf4cf6
Move methods querying window state into AsyncAppContext
2023-05-02 19:38:48 +02:00
Antonio Scandurra
780ece551e
Defer hiding the dock and going back/forward when Pane is on the stack
2023-05-01 17:06:05 +02:00
Antonio Scandurra
c4472b0786
Remove ViewContext::dispatch_action
2023-05-01 16:27:36 +02:00
Antonio Scandurra
d815fc88ae
Remove ViewContext::dispatch_any_action
2023-05-01 14:24:00 +02:00
Antonio Scandurra
4bcba487c5
Remove SplitWithProjectEntry
internal action
2023-04-28 12:19:38 +02:00
Antonio Scandurra
272039a858
Remove SplitWithItem
internal action
2023-04-28 12:17:31 +02:00
Antonio Scandurra
6857426b78
Remove RemoveWorktreeFromProject
internal action
2023-04-28 12:11:59 +02:00
Antonio Scandurra
71a4bc7905
Remove OpenSharedScreen
internal action
2023-04-28 12:09:34 +02:00
Antonio Scandurra
d953729233
Remove JoinProject
internal action
2023-04-28 11:22:04 +02:00
Antonio Scandurra
f881f9e3d8
Remove ToggleFollow
internal action
2023-04-28 10:07:44 +02:00
Antonio Scandurra
06c01a5937
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
6cbc1dcd87
💄
2023-04-27 14:56:16 +02:00
Antonio Scandurra
20e38d2def
Remove OpenProjectEntryInPane
internal action
2023-04-27 14:51:02 +02:00
Antonio Scandurra
b6437d6d9e
Remove Toast
and DismissToast
internal actions
2023-04-27 14:43:10 +02:00
Antonio Scandurra
2950344c25
Remove internal actions from Dock
2023-04-27 14:29:15 +02:00
Antonio Scandurra
022368225e
Remove internal actions from Pane
2023-04-27 14:23:26 +02:00
Antonio Scandurra
5521ff1b22
Allow passing a handler function to context menu items
2023-04-27 11:32:12 +02:00
Antonio Scandurra
6317e885c7
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
689e878bd8
Use a WeakViewHandle
in Client
for view message handlers
2023-04-26 12:21:02 +02:00
Antonio Scandurra
57beec6071
Allow direct read/update of WeakViewHandle
only in AsyncAppContext
2023-04-26 12:20:57 +02:00
Antonio Scandurra
2b6830c798
Remove unnecessary calls to WeakViewHandle::upgrade
2023-04-26 11:13:46 +02:00
Antonio Scandurra
94c2eaad23
Replace ViewContext::spawn
with ViewContext::spawn_weak
2023-04-26 10:23:27 +02:00
Antonio Scandurra
7ca412ade3
Merge remote-tracking branch 'origin/main' into fewer-context-traits
2023-04-26 09:54:58 +02:00
Max Brunsfeld
ebbe52e6b0
🎨 Specify more dependencies at the workspace level
2023-04-24 17:41:55 -07:00
Max Brunsfeld
abdccf7393
Use a workspace dependency for the futures crate
2023-04-24 09:43:31 -07:00
Antonio Scandurra
c165fb9be5
Remove ReadView
and UpdateView
traits
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-24 17:36:14 +02:00
Nathan Sobo
993dbf86cb
Merge remote-tracking branch 'origin/main' into into-element
2023-04-21 14:27:25 -06:00
Nathan Sobo
fe492eacbf
Refine naming of element-related types and traits
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 13:06:37 -06:00
Antonio Scandurra
03619dfa55
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
69273648b3
Merge pull request #2402 from zed-industries/fix-panics
...
Fix panic in pane.rs
2023-04-22 05:53:48 +12:00
Mikayla Maki
b8fd6435d7
Fix test covering this case
2023-04-21 10:48:34 -07:00
Mikayla Maki
aa2af53f56
Align return of close_active_item to match original format
2023-04-21 10:44:27 -07:00
Mikayla Maki
6ee0d104d6
Fix panic in remove active item
2023-04-21 10:08:52 -07:00
Antonio Scandurra
8c7f821d14
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
5b40641fde
Take a target view when marking an element as draggable
2023-04-21 15:52:05 +02:00
Antonio Scandurra
c76b9794e4
Merge branch 'main' into window_context_2
2023-04-21 10:58:08 +02:00
Max Brunsfeld
32c57bcd22
Store buffer's diagnostic sets in a smallvec
2023-04-20 08:58:41 -07:00
Antonio Scandurra
c52b6328b7
Merge branch 'main' into window_context_2
2023-04-20 16:01:47 +02:00
Nathan Sobo
d70644618a
WIP: Make PickerDelegate a fully owned object instead of a view
...
This avoids issues with the parent view being on the stack when we want to
interact with the delegate from the picker. Still have several picker usages
to convert.
2023-04-19 22:05:29 -06:00
Max Brunsfeld
7cc868bc8c
When opening projects, only reuse the current window if it is empty
2023-04-18 17:05:26 -07:00
Julia
4c086a4836
Merge pull request #2385 from zed-industries/rerender-breadcrumbs-on-focus-change
...
Re-render toolbar items when updating their knowledge of pane focus
2023-04-18 15:13:53 -04:00
Julia
721baf5746
Re-render toolbar items when updating their knowledge of pane focus
2023-04-18 14:56:39 -04:00
Joseph Lyons
304eddbbe4
Remove unnecessary lifetimes from tab_description
2023-04-18 14:15:56 -04:00
Joseph Lyons
9afd804062
Remove unnecessary lifetimes from tab_tooltip_text
2023-04-18 14:03:02 -04:00
Antonio Scandurra
eee39b4c5c
Don't capture Workspace
handle in defer
when rendering Dock
...
GPUI already provides a mutable reference to the `Workspace` in the
`defer` callback.
2023-04-18 17:41:40 +02:00
Antonio Scandurra
d03c431f9a
Fix warnings/errors now that AsyncAppContext::update
returns Result
2023-04-18 14:58:57 +02:00
Antonio Scandurra
31e6bb4fc1
Return Result
from AsyncAppContext::update_view
2023-04-18 12:03:53 +02:00
Antonio Scandurra
493a418c91
WIP
2023-04-17 18:52:48 +02:00
Antonio Scandurra
38ab6b123f
Make production code compile again
2023-04-17 12:33:33 +02:00
Joseph Lyons
ebe57254e0
Add tab tooltips
2023-04-15 06:46:14 -04:00
Antonio Scandurra
a820862165
Take WindowContext
in workspace::ItemHandle
methods
2023-04-14 16:36:23 +02:00
Antonio Scandurra
060242a28a
Take a WindowContext
in StatusItemViewHandle::set_active_pane_item
2023-04-14 14:26:20 +02:00
Antonio Scandurra
74ca223114
Fix formatting for the entire workspace
2023-04-14 12:08:33 +02:00
Antonio Scandurra
33bc47dbe2
Merge branch 'main' into window_context_2
2023-04-14 12:07:09 +02:00
Antonio Scandurra
7394bf1cdc
Fix most of the warnings
2023-04-14 10:51:53 +02:00
Antonio Scandurra
9ef79735dc
Move more window-specific methods from AppContext
to WindowContext
2023-04-14 10:29:35 +02:00
Nathan Sobo
25ad635577
WIP
2023-04-12 12:38:26 -06:00
Nathan Sobo
4cb13fb39c
WIP
2023-04-12 12:22:26 -06:00
Nathan Sobo
a25f962185
WIP
2023-04-12 12:13:35 -06:00
Joseph T. Lyons
ee238a300e
Merge pull request #2368 from zed-industries/Improve-tab-closing-experience
...
Add tab context menu
2023-04-12 13:08:46 -04:00