Commit graph

366 commits

Author SHA1 Message Date
Marshall Bowers
a874a96e76 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 12:53:41 -08: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
Antonio Scandurra
c91207b450
Don't panic when trying to reuse an existing workspace (#3538)
Release Notes:

- N/A
2023-12-07 18:23:33 +01:00
Antonio Scandurra
2461902086 Don't panic when trying to reuse an existing workspace
Co-Authored-By: Nathan <nathan@zed.dev>
2023-12-07 17:53:07 +01:00
Kirill Bulatov
75324abbb5 Do not panic when focusing empty dock 2023-12-07 16:08:47 +02:00
Joseph T. Lyons
2a68a6171a
Remove remnants from conflict resolution (#3528)
Fixes a couple of things that slipped through when going through the
last merge conflict

Release Notes:

- N/A
2023-12-06 23:44:49 -05:00
Joseph T. Lyons
d2362d7f12 Merge branch 'main' into feedback-2 2023-12-06 23:16:54 -05:00
Marshall Bowers
a4b271e063
Port recent_projects to Zed2 (#3525)
This PR ports the `recent_projects` crate to Zed2 (`recent_projects2`).

Absent from this PR is wiring up the "Recent Projects" item in the title
bar. We'll come back to that soon.

Release Notes:

- N/A
2023-12-06 18:41:50 -05:00
Max Brunsfeld
6bbb1642b8 Fix propagation of active item to followers
Enable channel buffer integration tests.
2023-12-06 12:18:48 -08:00
Antonio Scandurra
cc9eff89f5 Use a handler instead of an action for clicks
This prevents dispatching actions on buttons that were not the target of the click.

Co-Authored-By: Marshall <marshall@zed.dev>
2023-12-06 19:12:01 +01:00
Antonio Scandurra
5f172a52a4 Load assistant panel 2023-12-06 14:23:05 +01:00