Commit Graph
129 Commits
Author SHA1 Message Date
Max Brunsfeld 52b9fc303b Fix overlay rendering when dragging onto the center of a pane 2023-12-14 16:52:03 -08:00
Max Brunsfeld 842f15c65b Fix centering of empty pane text 2023-12-14 16:35:58 -08:00
Max Brunsfeld d6383ab0c6 Fix stickiness of main pane drag target
Reimplement the pane drag targets using on_drag_move
2023-12-14 16:23:15 -08:00
Max BrunsfeldandConrad 23d5f3f3e8 Enable all warnings in workspace, fix all warnings
Bring back some workspace tests

Co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 14:15:56 -08:00
8791f7cefc Enable dragging from project panel to panes
Rework gpui2 drag API so that receivers need not specify the dragged view type.

co-authored-by: Max <max@zed.dev>
co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 13:20:48 -08:00
Max Brunsfeld 4f32f66271 Clone item when dragging to split 2023-12-13 17:16:00 -08:00
Max Brunsfeld 93029376d9 Start work on allowing dragging tabs onto panes and pane edges 2023-12-13 17:06:42 -08:00
Marshall Bowers 599f81f345 Wire up tooltips on tab bar actions (#3629)
This PR wires up the tooltips on the actions in the tab bar.

Release Notes:

- N/A
2023-12-13 12:11:33 -05:00
Marshall Bowers 988fb91a61 Fix tab bar drop target sizing (#3627)
This PR fixes an issue where the tab bar drop target was not receiving
any size.

The styling isn't 100% correct yet, as the updated background color has
a gap around it.

Release Notes:

- N/A
2023-12-13 11:44:51 -05:00
6362221363 Scroll the tab bar to show the active tab
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2023-12-12 15:42:33 -08:00
a579713a45 Allow dragging and dropping tabs
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2023-12-12 15:07:03 -08:00
Max Brunsfeld a4a501603e Start work on dragging tabs 2023-12-12 15:04:49 -08:00
Marshall Bowers d2feaa41a5 Extract TabBar component (#3613)
This PR extracts a new `TabBar` component from the tab bar
implementation in the workspace.

Release Notes:

- N/A
2023-12-12 15:50:05 -05:00
Marshall Bowers a334a21f3e Prevent panes from overflowing the window (#3609)
This PR fixes an issues where it was possible for panes to overflow the
window (for instance, by having a large number of tabs in the tab bar).

Release Notes:

- N/A
2023-12-12 11:01:49 -05:00
Kirill Bulatov 4684440202 Fix focus issues with gpui2 docks (#3606)
* Fixed dock toggling not focusing the terminal element
* Fixed loosing focus on dock close (e.g. cmd-d on the last terminal in
the dock)
* Removed element stateless focus API since it would not work when the
element is not rendered, update all API usages to the stateful one via
`gpui::Subscription`

Release Notes:

- N/A
2023-12-12 17:26:39 +02:00
Kirill BulatovandAntonio 137104e00e Fix dock panels not focusing their contents on toggle
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-12 15:07:27 +02:00
Kirill Bulatov d9b0828beb Port to gpui2 2023-12-12 13:50:23 +02:00
Kirill Bulatov 27d6432c84 Rework the way project panel auto reveals entries
* gitignored entries are never auto revealed
* `project_panel::auto_reveal_entries = true` settings entry was added,
setting it to `false` will disable the auto reveal
* `pane::RevealInProjectPanel` action was added that activates the project panel and reveals the entry it got triggered on (including the gitignored ones)
2023-12-12 11:38:51 +02:00
Mikayla Maki 927d18b0f3 Add support for resizing splits and docks, as well as utilities (#3595)
Making this PR to upstream changes to util and GPUI2, resizing exists
but isn't working yet.

Release Notes:

- N/A
2023-12-11 13:32:06 -08:00
Marshall Bowers f02a3e8c68 Fix inactive tab styles (the verbose way) (#3591)
This PR fixes the inactive tab style to properly show the label using
the muted text color.

I went about fixing this in the most direct way possible, but the
solution leaves a lot to be desired, IMO. I plan to explore some ideas
on how we can improve the state of styling the tab content without
having the same styles repeated all over the place and subsequently
out-of-sync.

Release Notes:

- N/A
2023-12-11 15:42:17 -05:00
Mikayla 3198eb6c6d Merge branch 'main' into splits 2023-12-11 10:16:32 -08:00
Antonio Scandurra 5768f14a03 Emit Focus events from Pane only when it didn't have focus before 2023-12-11 14:02:08 +01:00
Conrad Irwin 9ce7395b74 Restore impl_actions! and remove derive(Action) 2023-12-10 19:33:38 -07:00
Conrad Irwin 4290c67b6a Restore namespace parameter to actions!
This does not yet fix `derive(Action)`, but will conflict with a lot so
wanted to merge quickly.
2023-12-09 15:18:31 -07:00
Mikayla fd34d1da31 Add back semi-funcitonal pane resizing code 2023-12-08 16:29:42 -08:00
Piotr Osiewicz a283cbaf8f Re-enable navigation with mouse navigation buttons 2023-12-08 17:59:52 +01:00
Marshall Bowers 853daf953b Remove padding from ButtonSize::None (#3541)
This PR removes the padding from buttons when using `ButtonSize::None`.

This fixes the size of the tab close buttons.

Release Notes:

- N/A
2023-12-07 14:11:30 -05:00
Marshall Bowers 393be3cedf Extract Tab component (#3539)
This PR extracts a new `Tab` component from the tabs implementation in
the workspace.

This will allow us to reuse this component anywhere that we need to use
tabs.

Like our other newer components, the `Tab` component has a relatively
open API.

It accepts `children` (or `child`) as well as a `start_slot` and
`end_slot` to position content in the slots on either end of the
content. These slots also respect the `TabCloseSide` and will switch
positions based on this value.

<img width="763" alt="Screenshot 2023-12-07 at 12 19 42 PM"
src="https://github.com/zed-industries/zed/assets/1486634/78e4db6a-f807-431e-8777-f52f2631e6ed">

Release Notes:

- N/A
2023-12-07 12:30:43 -05:00
Marshall Bowers e0ca7f844a Merge branch 'main' into pane-toolbar-tabbar-ui 2023-12-05 14:15:18 -05:00
Nate ButlerandMarshall Bowers dc7e4a4b17 Remove debugging colors
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-05 14:09:29 -05:00
Nate ButlerandMarshall Bowers 27703a3279 Update tabs rendering, fix tab spacing bug
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-05 14:04:12 -05:00
Nate Butler eed5a698cf Update tab close button 2023-12-05 11:59:23 -05:00
Nate Butler 7c5df51d2e Update button sizes 2023-12-05 10:11:18 -05:00
Kirill Bulatov 16b5d4b35c Port to gpui2 2023-12-05 16:13:39 +02:00
Nate Butler 591dc9d82a Remove double first item border in tabs 2023-12-04 20:13:52 -05:00
Conrad Irwin 1c9b984738 Remove cx param 2023-12-04 23:35:31 +00:00
Nate Butler 7db0a9e105 Draw border under tabs 2023-12-04 18:21:50 -05:00
Nate Butler fc16e4509a Fix double border 2023-12-04 18:13:28 -05:00
Nate Butler 5bdaf0e074 Work on light theme, update tab 2023-12-04 17:54:37 -05:00
Nate ButlerandMarshall Bowers b6ed3b258c Remove debug
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-04 11:32:14 -05:00
Nate Butler 0af0c5549c Update toolbar left tool group 2023-12-04 11:14:59 -05:00
Nate Butler 7dc22fef24 Prevent tab bar from growing in height when a tab is added 2023-12-04 09:24:08 -05:00
Nate Butler 11c16258eb Update empty pane state 2023-12-04 09:13:00 -05:00
Julia 6f9e08ceea Merge branch 'main' into zed2-breadcrumbs 2023-12-01 12:28:36 -05:00
Julia 13f4cc563c Merge branch 'main' into zed2-breadcrumbs 2023-12-01 11:02:34 -05:00
Max Brunsfeld a003a91212 Restore auto-save on focus change, re-enable workspace tests 2023-11-30 14:45:27 -08:00
Max Brunsfeld c63ca09eed Reintroduce pane navigation history in zed2 2023-11-30 12:10:25 -08:00
JuliaandConrad Irwin d516ae0d8a Pane context menus & focus shenanigans
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-11-30 14:01:09 -05:00
Julia 21dfe58ad9 Missing return 2023-11-30 12:23:55 -05:00
Julia 428c517693 Merge branch 'main' into zed2-breadcrumbs 2023-11-30 11:38:29 -05:00