Commit graph

375 commits

Author SHA1 Message Date
Piotr Osiewicz
da960fffe7
calls: Fix off by one in prompts for leaving a call. (#3649)
We've noticed how leaving a call with multiple windows open would still
prompt with the popup along the lines of "Do you want to leave the
current call?". In Zed1, that popup only showed up when you've had just
one window open.

The code for prompting did not change at all between zed1 and zed2, but
the way we calculate the window count did. Calling AppContext::windows
to get all window handles from WindowContext::update essentially
excluded the window we were updating (that is the window being closed)
from the returned Vec of window handles. I've decided to keep the code
as close to original as possible (as the alternative would be to change
the \# of workspaces needed for a prompt to pop up). We now query the
window handles via a deref to AsyncAppContext, which does not exclude
"our" window handle from the returned results.

Release Notes:

- N/A
2023-12-14 15:35:31 +01:00
Mikayla
d88fc27b79
Merge branch 'main' into fix-splits-bugs 2023-12-13 18:29: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
Mikayla
416bb45531
Tidy up workspace resizing 2023-12-13 16:35:25 -08:00
Mikayla
e2bfd46455
Fix dock split resizin 2023-12-13 15:14:51 -08:00
Mikayla
a807e798ec
Add new drag API 2023-12-13 13:40:19 -08:00
Marshall Bowers
61ab1834c7
Deploy the buffer search in a second row in the toolbar (#3630)
This PR updates the buffer search to deploy to a second row in the
toolbar, instead of trying to deploy into the initial row.

This is the same way it works in Zed1.

Release Notes:

- N/A
2023-12-13 13:06:53 -05: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
Conrad Irwin
e91ecec8cd
fix modal exchange (#3620)
- Fix opening GoToLine from Command
- Extend test to cover go_to_line behavior too

Release Notes:

- N/A
2023-12-12 21:30:34 -07:00
Conrad Irwin
a2f0accb74 Fix opening GoToLine from Command
This was broken because of the async hop introduced by should_dismiss.

Change that API to instead be syncronous, and require that implementors
(of which there is only one) to call dismiss again if they want to.
2023-12-12 20:46:27 -07:00
Marshall Bowers
573377d9f9
Fix workspace sizing (#3617)
This PR fixes the sizing of the workspace, specifically with regards to
the center pane.

This fixes the issue where the tab bar would get clipped when its width
exceeded the size of the screen.

<img width="1298" alt="Screenshot 2023-12-12 at 8 36 15 PM"
src="https://github.com/zed-industries/zed/assets/1486634/592d7c6d-6901-4bd4-b5e7-e30bcad67e21">

Release Notes:

- N/A
2023-12-12 20:42:48 -05:00
Max Brunsfeld
e09b07ddae
Allow dragging tabs (#3616) 2023-12-12 16:20:37 -08:00
Max Brunsfeld
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
Max Brunsfeld
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
Julia
2e00da5a79
zed2 notification panel (#3603)
Release Notes:

- N/A
2023-12-12 18:04:47 -05: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
Julia
44d40625fe Start changing Avatar to use URI
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-12 11:27:40 -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 Bulatov
2cde1a2e15 Re-focus window on workspace on corresponding window blur
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-12 15:36:20 +02:00
Antonio Scandurra
43b8d65fee Transfer focus to the workspace when window focus is lost 2023-12-12 15:07:27 +02:00
Kirill Bulatov
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
Mikayla
cb8109ab98
Remove some debug styles 2023-12-11 13:23:07 -08:00
Mikayla
f03c0f6e63
Add double click handling 2023-12-11 13:17:42 -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
0ee61e214d
Fix drag events 2023-12-08 17:02:25 -08:00
Mikayla
fd34d1da31
Add back semi-funcitonal pane resizing code 2023-12-08 16:29:42 -08:00
Joseph T. Lyons
1fecd3c327
Allow modals to override their dismissal (#3565)
Release Notes:

- N/A
2023-12-08 16:28:16 -05:00
Joseph T. Lyons
cd93ac1d2a Fix error 2023-12-08 15:34:42 -05:00
Max Brunsfeld
c7d8169cab Get the chat panel wired up again 2023-12-08 12:31:07 -08:00
Joseph T. Lyons
113c7287df Allow modals to override their dismissal
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-12-08 15:29:44 -05:00
Joseph T. Lyons
f4c93abad5
🚧 Feedback modal UI 🚧 (#3536)
[[PR Description]]

TODO: 
- [x] Add placeholder text to editor
- [x] Add external link icon to "Community repo" button
- [x] Show `not-allowed` cursor for disabled buttons
- [ ] Add `Headline` ui component
- [ ] Finish UI pass
- [ ] Fix `IconPosition` on button (should swap the icon side)
- [ ] Add conditional tooltip for disabled "Send feedback" button.
- [ ] Add common/top feedback link.
- [ ] Add `vw`/`vh` units to allow sizing the modal based on viewport
size.

Release Notes:

- N/A
2023-12-08 13:30:42 -05:00
Joseph T. Lyons
fdde76c1a5 Cargo fmt 2023-12-08 13:15:12 -05:00
Joseph T. Lyons
be6c909587 Remove some unused imports 2023-12-08 13:13:40 -05:00
Piotr Osiewicz
a283cbaf8f Re-enable navigation with mouse navigation buttons 2023-12-08 17:59:52 +01:00
Mikayla
25df11dd26
Begin porting the PaneAxis element 2023-12-07 17:16:19 -08: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
Joseph T. Lyons
5c3b8a1af1 Merge branch 'feedback-modal-ui' of https://github.com/zed-industries/zed into feedback-modal-ui 2023-12-07 13:00:59 -05:00
Nate Butler
ef4bc5e20b Remove static status bar icons 2023-12-07 12:59:51 -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