Commit Graph
1190 Commits
Author SHA1 Message Date
Max Brunsfeld cee7edabf9 Ensure the SettingsStore global is added in tests 2023-05-10 16:39:59 -07:00
Nathan SoboandJulia Risley 5549669316 Test moving panels
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-05-10 10:41:03 -06:00
Mikayla Maki c7fcc031eb Merge pull request #2460 from zed-industries/show-dock-on-activate
Fix bug with terminal button
2023-05-10 09:08:45 -07:00
Nathan Sobo cc21421ea8 Rename item to panel in various locations 2023-05-10 09:54:20 -06:00
Mikayla Maki 0dce5ba7ae Fix bug with terminal button 2023-05-10 08:15:20 -07:00
Antonio Scandurra 0ccb4a50e6 Create more specific dock position settings associated with each panel 2023-05-10 16:52:10 +02:00
Antonio Scandurra e507eadb4b Rely on root getting re-focused when panel isn't rendered
This achieves two things:

- When a panel like `TerminalPanel` closes its last tab, the focus
is returned to the root view (the `Workspace`)
- When a panel is moved from a dock to another, it will get rendered
in another spot but the focus will be kept on the panel

This also ensures the focus is not lost when a panel is moved from
a dock to another because that view
2023-05-10 15:43:44 +02:00
Antonio Scandurra cdcb7c8084 Merge branch 'main' into panels 2023-05-10 15:23:37 +02:00
Antonio Scandurra f28eee88b6 Add context menu to change panel position 2023-05-10 14:05:48 +02:00
Antonio Scandurra 8fa379bbc5 Maintain panel visibility when changing its position 2023-05-10 11:06:37 +02:00
Kirill Bulatov dfdf7e4866 Test the search inclusions/exclusions 2023-05-10 11:11:31 +03:00
Kirill Bulatov 3da55c14a6 Fix arrow layout 2023-05-10 11:11:31 +03:00
Kirill BulatovandMax 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 SoboandJoseph Lyons 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 ScandurraandNathan Sobo 8f12489937 WIP: Allow panels to be moved
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-05-09 18:57:25 +02:00
Antonio ScandurraandNathan Sobo 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