Commit Graph

16323 Commits

Author SHA1 Message Date
Marshall Bowers
3213a860a6
Use extra small label for tab descriptions (#3797)
This PR adjusts the size of the tab descriptions to use the extra small
label size.

This makes it easier to distinguish between the filename and the
description:

<img width="320" alt="Screenshot 2023-12-22 at 6 49 11 PM"
src="https://github.com/zed-industries/zed/assets/1486634/451d4cd0-666c-43c2-b5df-6d9cf91dacda">

It's also more in line with how things look in Zed1.

Release Notes:

- N/A
2023-12-22 18:56:17 -05:00
Kirill Bulatov
c6f3f439c4 Fix mouse listeners' z-index for editor 2023-12-23 01:55:40 +02:00
Piotr Osiewicz
ca7e504817
titlebar: show "Share project" button only in local projects. (#3795)
Fixes '"Share" button is shown even for remote projects'.

Release Notes:

- N/A
2023-12-23 00:49:51 +01:00
Marshall Bowers
1ebfafc03d
Map additional text colors from Zed1 themes (#3796)
This PR maps additional text colors from the Zed1 themes to the Zed2
themes.

Release Notes:

- N/A
2023-12-22 18:45:58 -05:00
Kirill Bulatov
9600337d81 Properly color file labels in project panel 2023-12-23 01:27:41 +02:00
Marshall Bowers
b501f4eafc
Begin porting Zed1 themes to Zed2 (#3793)
This PR is a first pass at porting the Zed1 themes to Zed2.

For the initial release of Zed2 we'll be shipping just the themes that
existed in Zed1, ported to Zed2. The new themes that were previously
added just in Zed2 have been removed.

Release Notes:

- N/A
2023-12-22 17:37:53 -05:00
Kirill Bulatov
a1bd636c18
Fix multibuffer scroll by reordering z-index of its elements (#3792)
1. Blocks (with their headers) and mouse listeners should be drawn
together otherwise either starts to loose mouse events.

2. Scrollbar should be above all to match zed1 look and avoid buffer
headers popping slightly to the right of the scrollbar.

Release Notes:

- N/A
2023-12-22 23:07:10 +02:00
Kirill Bulatov
764a2755e2 Fix multibuffer scroll by reordering z-index of its elements
1. Blocks (with their headers) and mouse listeners should be drawn together otherwise either starts to loose mouse events.

2. Scrollbar should be above all to match zed1 look and avoid buffer headers popping slightly to the right of the scrollbar.
2023-12-22 22:56:35 +02:00
Marshall Bowers
dc64411cca
Extend theme_importer in preparation for importing Zed1 themes (#3791)
This PR extends the `theme_importer` with the overall structure required
to support importing themes from Zed1.

Release Notes:

- N/A
2023-12-22 13:47:30 -05:00
Antonio Scandurra
c34a81152f
Fix panic when deploying emoji picker (character palette) (#3790)
The panic was caused by Cocoa synchronously invoking the
`selected_text_range` method on the registered input handler while we
already had a borrow of the app.

This pull request fixes this issue by showing the character palette on
the next tick of the loop (we've had this problem in other spots too and
used the same technique).

Release Notes:

- N/A
2023-12-22 18:52:35 +01:00
Marshall Bowers
7ef2ddd7a5
Disambiguate GPUI2 macOS class names (#3789)
This PR disambiguates the macOS class names used in GPUI2 from the ones
used in GPUI1.

Right now if you happen to end up with a copy of both `gpui` and `gpui2`
in the dependency tree you get an unhelpful `unwrap` error when we try
to build the class names.

By giving them different names we are able to get to our more helpful
error that informs you that both GPUI1 and GPUI2 are in the module tree.

We can change these names back once we do the big "un-2-ing".

Release Notes:

- N/A
2023-12-22 12:46:06 -05:00
Antonio Scandurra
9a6688bdfb Fix panic when deploying emoji picker (character palette)
The panic was caused by Cocoa synchronously invoking the `selected_text_range`
method on the registered input handler while we already had a borrow of the
app.

This commit fixes this issue by showing the character palette on the next tick
of the loop (we've had this problem in other spots too and used the same technique).
2023-12-22 18:41:43 +01:00
Antonio Scandurra
30340535e9
Prevent panels from getting so small they can't be resized (#3788)
This also switches to using `Pixels` instead of `f32` to store the panel
size everywhere.

Release Notes:

- N/A
2023-12-22 18:37:13 +01:00
Antonio Scandurra
961d8331f3 Prevent panels from getting so small they can't be resized 2023-12-22 18:28:28 +01:00
Antonio Scandurra
3715ddfa74 Use Pixels instead of f32 for panel size 2023-12-22 18:26:33 +01:00
Piotr Osiewicz
25a5eda76f
picker: Reintroduce headers and footers (#3786)
Update VCS menu to match Zed1.
<img width="444" alt="image"
src="https://github.com/zed-industries/zed/assets/24362066/6cb27510-f501-46bc-862f-1fb78006b77c">

Release Notes:

- N/A
2023-12-22 18:10:59 +01:00
Antonio Scandurra
87ff5f04cb
Fix resizing for bottom dock (#3787)
We were not using `flex` on the `PaneGroup`, which caused the bottom
dock to be unable to satisfy the desired resize value.

Release Notes:

- N/A
2023-12-22 18:10:50 +01:00
Antonio Scandurra
54e45306c5 Fix resizing for bottom dock
We were not using `flex` on the `PaneGroup`, which caused the bottom
dock to be unable to satisfy the desired resize value.
2023-12-22 18:00:03 +01:00
Kirill Bulatov
f3ab5ce34b
Fix enter, tab and shift-tab behavior in project search 2 (#3785) 2023-12-22 18:56:18 +02:00
Kirill Bulatov
2f4cedbd53 Remove the old code 2023-12-22 18:43:57 +02:00
Kirill Bulatov
a03306fd01 Fix enter, tab and shift-tab behavior in project search 2 2023-12-22 18:43:02 +02:00
Piotr Osiewicz
dc1ed3c39d
Titlebar project menu double click (#3784)
This addresses a bug where popover menus in the titlebar were rendered
only after a 2nd click. The first click was creating the View which the
second one then rendered.
In addition to this, `PopoverMenu::menu` function argument can now
return an `Option<View<T>>` instead of `View<T>` as the creation of the
menu can fail (as it might in case of git popover).

Release Notes:

- N/A
2023-12-22 17:18:12 +01:00
Kirill Bulatov
5de32f7b0b Do not display a getting start message when the project is open 2023-12-22 18:06:23 +02:00
Antonio Scandurra
172e434bec
Allow horizontal scrolling of tab bar on vertical mouse wheel (#3783)
Now, if we receive a scroll event for an axis, but that axis can't be
scrolled (overflow != scroll), we will apply it to the opposite axis
instead if that axis supports scrolling.

Release Notes:

- N/A
2023-12-22 16:08:29 +01:00
Antonio Scandurra
dd093477a3 Allow horizontal scrolling of tab bar on vertical mouse wheel
Now, if we receive a scroll event for an axis, but that axis can't be scrolled
(overflow != scroll), we will apply it to the opposite axis instead
if that axis supports scrolling.
2023-12-22 15:56:37 +01:00
Antonio Scandurra
15bf131065
Dismiss mention notification when x icon is clicked (#3782)
We were emitting the wrong kind of event, which caused the workspace to
never remove the notification.

Release Notes:

- N/A
2023-12-22 15:23:53 +01:00
Antonio Scandurra
2f3b408880 Dismiss mention notification when x icon is clicked
We were emitting the wrong kind of event, which caused the workspace
to never remove the notification.
2023-12-22 15:12:01 +01:00
Antonio Scandurra
bb93144b8a
Reveal item even if project panel was closed while active entry changed (#3781)
The project panel was actually working just fine, the problem was due to
`UniformList` not re-hydrating the element state's scroll offset when
being rendered again.

Release Notes:

- N/A
2023-12-22 14:55:38 +01:00
Kirill Bulatov
4e3337f1c9
Restore zoom buttons in pane tab bars, fix + button in the terminal one (#3780)
Release Notes:

- N/A
2023-12-22 15:48:38 +02:00
Antonio Scandurra
68cf631cfc Reveal item even if project panel was closed while active entry changed
The project panel was actually working just fine, the problem was due to
`UniformList` not re-hydrating the element state's scroll offset when
being rendered again.
2023-12-22 14:39:16 +01:00
Kirill Bulatov
420253a752 Restore zoom buttons in pane tab bars, fix + button in the terminal one 2023-12-22 15:32:47 +02:00
Antonio Scandurra
061bcf1b6e
Fix dismissing context menu when clicking on an item dispatched action (#3779)
Release Notes:

- N/A
2023-12-22 12:34:08 +01:00
Antonio Scandurra
62aea418de
Fix panic in completions menu (#3778)
We were shifting all the positions while keeping the original string,
which caused problems later when combining highlighted ranges with
matched indices.

Release Notes:

- N/A
2023-12-22 12:27:52 +01:00
Antonio Scandurra
c1ad079f09 Fix dismissing context menu when clicking on an item dispatched action 2023-12-22 12:27:20 +01:00
Antonio Scandurra
a551647ec1 Fix panic in completions menu
We were shifting all the positions while keeping the original
string, which caused problems later when combining highlighted
ranges with matched indices.
2023-12-22 12:12:39 +01:00
Kirill Bulatov
e3eafdba59
Move multibuffer "go to file" button into the buffer header (#3777)
Release Notes:

- N/A
2023-12-22 12:24:51 +02:00
Kirill Bulatov
4d5ff77abe Fix the tests 2023-12-22 12:14:53 +02:00
Joseph T. Lyons
169266b006
Slow down sampling metric collection rate (#3775)
Release Notes:

- N/A
2023-12-22 05:03:38 -05:00
Kirill Bulatov
d36ec81725 Move multibuffer "go to file" button into the buffer header
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-22 12:02:44 +02:00
Kirill Bulatov
fce31b7ddf Remove the warnings from element.rs 2023-12-22 12:02:44 +02:00
Joseph T. Lyons
41ff37d56e Slow down sampling metric collection rate 2023-12-22 04:52:36 -05:00
Antonio Scandurra
854907d721
Fix context menu in tab bar (#3776)
Release Notes:

- N/A
2023-12-22 10:35:05 +01:00
Antonio Scandurra
3de72f8366 Fix context menu in tab bar 2023-12-22 10:23:27 +01:00
Kirill Bulatov
6c4670287d Highlight termina on external files drag and drop 2023-12-22 10:45:51 +02:00
Antonio Scandurra
3d5b903f78
Optimize order rendering and border drawing (#3762)
Reverts zed-industries/zed#3761

There was a bug in the previous implementation of `BatchIterator` that
was being masked by how we were using the BSP tree. The bug caused us to
render primitives without honoring the `PrimitiveKind` implicit
ordering.
2023-12-22 09:40:54 +01:00
Antonio Scandurra
01ce204491 Avoid painting a background quad if it is fully transparent 2023-12-22 09:29:56 +01:00
Antonio Scandurra
2a516ec1e0 Honor PrimitiveKind ordering when order is the same
This was a bug in the previous implementation that was being masked by
how we were using BSP.
2023-12-22 09:24:01 +01:00
Antonio Scandurra
48ad53badd Revert "Revert "Optimize order rendering and border drawing"" 2023-12-22 09:12:18 +01:00
Marshall Bowers
2659b2744a
Add vertical padding to the picker empty state (#3774)
This PR adds vertical padding to the picker's empty state.

This matches the styles added in #3769.

Release Notes:

- N/A
2023-12-21 23:41:24 -05:00
Marshall Bowers
248458cef5
Indent contacts in collab panel (#3773)
This PR indents contacts in the collab panel.

Release Notes:

- N/A
2023-12-21 23:35:50 -05:00