Commit Graph

12546 Commits

Author SHA1 Message Date
Nathan Sobo
1b5c8b2b4a Return impl IntoElement from Render::render trait 2024-01-02 10:09:05 -07:00
Marshall Bowers
853192b059
Map suggestion colors from Zed1 themes (#3835)
This PR maps the suggestions colors from the Zed1 themes to the Zed2
themes.

Release Notes:

- N/A
2024-01-02 12:08:29 -05:00
Marshall Bowers
0f33775a91
Add general-purpose functions for sizing in viewport units (#3833)
This PR adds general-purpose functions for obtaining a `Length` in
viewport units.

Previously in #3600 we had added specific variants of `w` and `h` that
took viewport units, but I think it makes more sense to just have a
primitive that can compose with any styling method that accepts a
`Length` or `Into<Length>`.

Release Notes:

- N/A
2024-01-02 11:53:57 -05:00
Marshall Bowers
8ba52b839f
Use small icons in channel list (#3832)
This PR adjusts the size of the chat and channel note icons in the
channel list to be smaller.

Release Notes:

- N/A
2024-01-02 11:41:35 -05:00
Marshall Bowers
f5b60adcf9
Increase outline picker max height (#3831)
This PR increases the max height of the outline picker so that it can
take up a larger area of the screen when there are lots of results.

This behavior is similar to the way it was in Zed1.

Release Notes:

- N/A
2024-01-02 11:15:27 -05:00
Max Brunsfeld
64e512232d Start work on supporting custom languages 2024-01-02 08:01:59 -08:00
Piotr Osiewicz
c6d9bc5a16 ui: Add Backspace/Delete icons and use them for keybindings. 2024-01-02 16:41:56 +01:00
Marshall Bowers
f5b3e473fc
theme_importer: Map drop target colors (#3830)
This PR maps the drop target background color in the `theme_importer`.

Release Notes:

- N/A
2024-01-02 10:40:24 -05:00
Nathan Sobo
6b14f2fd08
Rename build_view to new_view and build_model to new_model (#3823)
The word "new" is shorter and blends in with `new` constructors that are
common in Rust. Been meaning to do this for a while.

Release Notes:

- N/A
2024-01-02 08:11:53 -07:00
Piotr Osiewicz
7314838fa4 project search: Move to results with ESC 2024-01-02 14:11:01 +01:00
Piotr Osiewicz
e81072ac0f Fix missing breadcrumbs on first open of project search.
Fixes:
Project search does not have breadcrumbs on its first open: after switching to other tab and back, breadcrumbs are shown
2024-01-02 14:10:47 +01:00
Piotr Osiewicz
576d8806f5 Fix up gpui1 2024-01-02 13:18:56 +01:00
Piotr Osiewicz
388c2d8e7f cargo fmt 2024-01-02 13:15:57 +01:00
Piotr Osiewicz
4af6ac25e9 gpui2: Another round of fixups 2024-01-02 13:11:36 +01:00
Piotr Osiewicz
945dba8099 gpui2: redundant_locals 2024-01-02 12:59:40 +01:00
Piotr Osiewicz
bcff7a8631 gpui2: Fix instance of map_entry lint 2024-01-02 12:56:53 +01:00
Piotr Osiewicz
1a03cf3268 Merge branch 'main' into clippy-fixes-for-zed2 2024-01-02 12:21:15 +01:00
Piotr Osiewicz
d185fca80c
Another pass of #[allow()] removal (#3825)
We still have a bunch of leftovers in ui2/theme2 and in gpui2
display_link module.

Release Notes:

- N/A
2024-01-02 12:17:30 +01:00
Piotr Osiewicz
1c20a7fc37
search: Add "Error" borders for query editors with malformed content. (#3824)
This commit also changes the way search queries are built (we do not bail early anymore if include/exclude editor queries are malformed) to propagate error status of the panel.
Release Notes:

- N/A
2024-01-02 10:43:50 +01:00
Nathan Sobo
47071605a1 Merge remote-tracking branch 'origin/main' into new-view-new-model-rename 2024-01-01 17:42:12 -07:00
Nathan Sobo
db1cf8f6e1 Rename build_view to new_view and build_model to new_model
The word "new" is shorter and blends in with `new` constructors that are common
in Rust. Been meaning to do this for a while.
2024-01-01 17:42:01 -07:00
Piotr Osiewicz
a3759f9a33 Another batch of fixups 2024-01-02 00:24:11 +01:00
Piotr Osiewicz
2621efebea Rest of fixups for gpui2 2024-01-02 00:09:24 +01:00
Piotr Osiewicz
7d420edb84 Start fixing up gpui2 2024-01-02 00:04:51 +01:00
Piotr Osiewicz
86facbbe4a sqlez 2024-01-01 23:56:04 +01:00
Piotr Osiewicz
e2ec96e44a Fixes for gpui2_macros 2024-01-01 23:52:07 +01:00
Piotr Osiewicz
4fa28b3de2 chore: fix clippy lints for rope2, sum_tree, text2 and util 2024-01-01 23:50:14 +01:00
Nathan Sobo
f836873764 Fix merge 2024-01-01 12:23:42 -07:00
Nathan Sobo
bcf0e3fb05 Merge branch 'pre-merge' into clean-up-doc-elements 2024-01-01 12:21:33 -07:00
Nathan Sobo
81b03d379e Rearrange to hopefully make merging easier 2024-01-01 12:21:17 -07:00
Nathan Sobo
c6ae885c5d Add more docs 2024-01-01 11:35:40 -07:00
Piotr Osiewicz
219999cd8d theme2: Move stories to RPITIT for Render 2024-01-01 14:23:02 +01:00
Piotr Osiewicz
6027962937 fixup! Work around lifetime woes by turning the element in language_tools2 into any element 2024-01-01 14:23:02 +01:00
Piotr Osiewicz
fa0d507639 Work around lifetime woes by turning the element in language_tools2 into any element 2024-01-01 14:23:02 +01:00
Nathan Sobo
51d1d92d66 Attempt to return impl Element from render. 3 errors. 2024-01-01 14:23:02 +01:00
Nathan Sobo
83923fd6d5 Clean up Element API and start on docs 2023-12-31 08:33:40 -07:00
Kirill Bulatov
1c13c3a243 Use ghost_element_background for avatar background color
Also add a couple todo!()s on top of the comments
2023-12-30 01:10:48 +02:00
Nathan Sobo
21f0409e3b Fix anti-aliasing artifacts in borders
Previously, we changed borders to be drawn after content, so they are no longer
part of the same quads as the background. In our change, we gave the background
quad a transparent black border and the border quads transparent black
backgrounds. However, this caused the other channels to blend toward that black
color before becoming fully transparent, causing them to become darker.

In this PR, I source the "placeholder" color by duplicating the values for
the other channels and only adjust the alpha down to zero.
2023-12-29 08:49:01 -07:00
Nathan Sobo
4e9fb26102
Adjust terminal and popover colors to better match original styling (#3816)
This may have made something else worse, but overall brings us more into
harmony.

Release Notes:

- N/A
2023-12-29 08:44:26 -07:00
Kirill Bulatov
ce8cc50ae5 Remove async_trait from the only trait that allows it now 2023-12-28 23:45:30 +02:00
Piotr Osiewicz
e932f4cf47
Bump Rust to 1.75 (#3815)
**This PR also bumps wasmtime version from 0.38 to 2.0 as 0.38 does not
build with Rust 1.75**. I did not test the plugin runtime as (AFAIK) we
intend to deprecate it; also, wasmtime's most recent version is 16.0, so
it'd make sense to bump the version at some point anyways. I did not
bump the version to 16.0 straight away as that'd require code changes in
`plugin_runtime`.
Release Notes:

- N/A
2023-12-28 19:22:43 +01:00
Nathan Sobo
02f7e681a7 Import elevated surface color from hover popover 2023-12-27 11:58:26 -07:00
Nathan Sobo
a2b0f14dc1 Rename size to dimensions for consistency 2023-12-27 11:23:12 -07:00
Nathan Sobo
ddd6f0806b Render cursor text with the terminal's background color 2023-12-27 11:08:43 -07:00
Nathan Sobo
5cfd4b06b9 Use correct terminal background color 2023-12-27 10:46:25 -07:00
Kirill Bulatov
937f237c8f Add breadcrumbs to the multibuffer editor
The breadcrumbs are not being open on the fisrt time, for some reason.
2023-12-26 15:18:20 +02:00
Kirill Bulatov
f27c63bb54 Fix color-related terminal todo! 2023-12-26 14:11:51 +02:00
Kirill Bulatov
af6f467890 Avoid trailing separators in file finder 2023-12-26 13:49:00 +02:00
Piotr Osiewicz
16626592db
Remove allow unused from gpui2, vim2 tests and terminal_view2 (#3813)
Release Notes:

- N/A
2023-12-26 01:23:08 +01:00
Joseph T. Lyons
41fb29bc5a
Tidy up main (#3812)
Release Notes:

- N/A
2023-12-25 07:45:39 -05:00
Piotr Osiewicz
ee57658abe Fix up superfluous mod declaration 2023-12-25 13:30:27 +01:00
Joseph T. Lyons
12fe64b177 Fix more warnings 2023-12-25 07:02:19 -05:00
Piotr Osiewicz
904358263c
Remove #[allow(unused)] annotations in zed2 crates (#3798)
Release Notes:

- N/A
2023-12-25 12:23:44 +01:00
Joseph T. Lyons
8f3ea6ccb3 Remove silencing of warnings and fix warnings 2023-12-25 03:47:28 -05:00
Joseph T. Lyons
ada1da48ca Remove already-implemented comment 2023-12-25 03:47:03 -05:00
Joseph T. Lyons
88d05fd814 Wire up journal 2023-12-25 03:36:54 -05:00
Joseph T. Lyons
81ed861288 Migrate from device_id to installation_id key 2023-12-23 22:26:00 -05:00
Joseph T. Lyons
bab3b231b8
Remove telemetry debounce time in zed 2 (#3809)
Remove the event send timer in Zed 2 telemetry in effort to continue
reducing the amount of stress the vercel endpoint receives. This allows
the queues to fill up entirely before sending them off. I'm leaving the
timer in for Zed 1 because we don't force the events queue to clear on
app close in Zed 1, so it feels best to leave it in there, as it might
catch some unsent events before closing.

Release Notes:

- N/A
2023-12-23 17:39:36 -05:00
Joseph T. Lyons
58c5720c32 Remove telemetry debounce time in zed 2 2023-12-23 17:25:04 -05:00
Kirill Bulatov
1096eeff3a Add a horizontal separator between history and query file finder matches 2023-12-23 22:33:52 +02:00
Kirill Bulatov
a249375f99 Do not show nav history buttons in terminal pane 2023-12-23 22:10:11 +02:00
Kirill Bulatov
e839dc5ee6 Hide pane tab bar for 0 items, hide its end buttons for no focus 2023-12-23 21:53:08 +02:00
Marshall Bowers
698460ea89
Style inlay hints (#3806)
This PR styles the inlay hints after the changes to the themes.

Release Notes:

- N/A
2023-12-22 23:06:30 -05:00
Marshall Bowers
e5148b4a1b
Assign player colors from the theme (#3805)
This PR updates the `theme_importer` to pull in the player colors so
that we can assign them based on the current theme.

Release Notes:

- N/A
2023-12-22 22:28:41 -05:00
Marshall Bowers
5a910aa874
Refine ported Zed1 themes (#3804)
This PR applies another round of refinements to the ported Zed1 themes.

Most of this was focused around the coloration of UI text to better
match Zed1.

Release Notes:

- N/A
2023-12-22 21:49:27 -05:00
Marshall Bowers
14ed4a4316 Render project panel entries as muted, unless selected 2023-12-22 21:36:20 -05:00
Marshall Bowers
446c947ad1 Render breadcrumb using muted colors 2023-12-22 21:33:57 -05:00
Marshall Bowers
04d26353d2 Adjust muted text colors 2023-12-22 21:25:45 -05:00
Marshall Bowers
bdb89d4700 Render tab bar tools as muted 2023-12-22 21:25:31 -05:00
Marshall Bowers
9cb613245e Adjust border colors 2023-12-22 21:18:43 -05:00
Marshall Bowers
e8a14b1971 Adjust color used for text 2023-12-22 21:10:53 -05:00
Joseph T. Lyons
b1870af386 Add project open event
Give the caller of report_app_event() the choice of whether to immediately flush the queue or not.
2023-12-22 20:23:55 -05:00
Joseph T. Lyons
1989094e6d Increase queue flush debounce time 2023-12-22 19:57:13 -05:00
Joseph T. Lyons
0746a10d9b Increase telemetry queue size 2023-12-22 19:56:06 -05:00
Max Brunsfeld
2edf560e5c
Maintain workspace's zoom state when opening/closing docks, activating panels (#3801)
Fixes an issue where zoom didn't work when closing and re-opening a
zoomed panel.
2023-12-22 16:54:13 -08:00
Max Brunsfeld
d7b0662058 Maintain workspace's zoom state when opening/closing docks, activating panels 2023-12-22 16:45:44 -08:00
Marshall Bowers
0e145a8435
Make current call controls in title bar smaller (#3800)
This PR adjusts the sizes of the current call controls in the title bar
to be smaller.

This matches the size of the other title bar items that are always
present.

Release Notes:

- N/A
2023-12-22 19:32:07 -05:00
Kirill Bulatov
a1915ce6c4 Add spacing to terminal tab bar buttons 2023-12-23 02:29:33 +02:00
Marshall Bowers
f03ee1ea24
Add spacing between tab bar buttons (#3799)
This PR adds spacing between buttons in the tab bar.

Release Notes:

- N/A
2023-12-22 19:18:04 -05:00
Kirill Bulatov
e1d8e2001b
Properly color file labels in project panel (#3794)
Also fixes an error with mouse listeners placement in
https://github.com/zed-industries/zed/pull/3792

Release Notes:

- N/A
2023-12-23 02:01:55 +02:00
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
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