Commit Graph

12724 Commits

Author SHA1 Message Date
Max Brunsfeld
3c81dda8e2 Remove 2 suffix from live_kit_client
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:49:33 -08:00
Max Brunsfeld
ce4bc994e7 Merge branch 'main' 2024-01-03 12:43:52 -08:00
Max Brunsfeld
dfcb17fe74 Remove 2 suffix for theme
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:41:01 -08:00
Max Brunsfeld
4305c5fdbe Remove 2 suffix for ui, storybook, text
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:33:51 -08:00
Max Brunsfeld
0cf65223ce Remove 2 suffix for collab, rope, settings, menu
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:29:16 -08:00
Max Brunsfeld
177e3028a9 Remove 3 suffix for git crate
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:11:59 -08:00
Max Brunsfeld
5ddd298b4d Remove 2 suffix for fs, db, semantic_index, prettier
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:09:42 -08:00
Marshall Bowers
324ac96977 Remove unneeded theme dependency 2024-01-03 15:07:08 -05:00
Marshall Bowers
500772459f Remove unneeded theme dependency 2024-01-03 15:06:31 -05:00
Marshall Bowers
6cb913d8af Decouple theme_importer from old GPUI 1 crates (#3866)
This PR decouples the `theme_importer` from the `theme` and `gpui`
crates.

We achieve this by inlining all of the relevant bits needed to
deserialize Zed1 themes.

This will allow us to continue to import Zed1 themes after we land
#3862.

Release Notes:

- N/A
2024-01-03 15:03:52 -05:00
Marshall Bowers
e43d5dfea8
Decouple theme_importer from old GPUI 1 crates (#3866)
This PR decouples the `theme_importer` from the `theme` and `gpui`
crates.

We achieve this by inlining all of the relevant bits needed to
deserialize Zed1 themes.

This will allow us to continue to import Zed1 themes after we land
#3862.

Release Notes:

- N/A
2024-01-03 15:02:55 -05:00
Max Brunsfeld
53bdf6beb3 Remove 2 suffix for client, call, channel
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:02:14 -08:00
Max Brunsfeld
9f99e58834 Remove 2 suffix for lsp, language, fuzzy
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:58:02 -08:00
Max Brunsfeld
c5a1950522 Remove 2 suffix for project
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:53:34 -08:00
Max Brunsfeld
4ddb26204f Remove 2 suffix for ai, zed_actions, install_ci, feature_flags
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:48:46 -08:00
Max Brunsfeld
ecbd115542 Remove 2 suffix for assistant, journal
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:14:01 -08:00
Max Brunsfeld
789ce8dd75 Remove 2 suffix for workspace
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:08:51 -08:00
Max Brunsfeld
492805af9c Remove 2 suffix for multi_buffer, outline, copilot
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:01:58 -08:00
Max Brunsfeld
588976d27a Remove 2 suffix for editor
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 10:58:57 -08:00
Max Brunsfeld
bcad3a5847 Remove 2 suffix for picker, feedback
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 10:55:34 -08:00
Max Brunsfeld
0ac8aae17b Remove 2 suffix for language_tools, search, terminal_view, auto_update
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 10:52:40 -08:00
Max Brunsfeld
292b3397ab Remove 2 suffix for language selector, project panel, recent_projects, copilot_button, breadcrumbs, activity_indicator
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 10:47:33 -08:00
Max Brunsfeld
252694390a Remove 2 suffix for vim, diagnostics, go_to_line, theme_selector, command_palette, file_finder
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 10:42:49 -08:00
Max Brunsfeld
37e6533b28 Remove 2 suffix for project_symbols, theme_selector
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 10:38:23 -08:00
Max Brunsfeld
2b8822fd08 Remove 2 suffix for welcome, vcs_menu, quick_action_bar, collab_ui
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 10:30:52 -08:00
Joseph T. Lyons
5ab789e390 v0.120.x dev 2024-01-03 13:27:23 -05:00
Max Brunsfeld
7986ee18cd Rename zed2 -> zed
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 10:14:19 -08:00
Max Brunsfeld
b594e59134
Lay some groundwork for language plugins (#3837)
This PR adds undocumented functionality for loading custom language
plugins at runtime. I don't intend to expose the functionality to end
users yet, but this will allow the team to test the capability
internally.

### Implementation

There isn't much new code in Zed. Most of the work here is within
Tree-sitter, in PRs https://github.com/tree-sitter/tree-sitter/pull/1864
and https://github.com/tree-sitter/tree-sitter/pull/2840, which allow
Tree-sitter to load languages from WASM blobs. I've tested the
functionality in Tree-sitter's test suite and via its CLI, but having it
wired into Zed allows us to test the functionality more fully.

### Details

Now, on startup, Zed will look for subdirectories inside of
`~/Application Support/plugins`. These subdirectories are expected to
look similar to the per-language subdirectories in
[`crates/zed2/src/languages`](https://github.com/zed-industries/zed/tree/main/crates/zed2/src/languages),
except that they also contain a `.wasm` file for the parser itself.

I'll add more details here as I go.
2024-01-03 09:37:42 -08:00
Nathan Sobo
5f8417249c
Return impl IntoElement in Render and RenderOnce traits (#3839)
- Returning `IntoElement` because it's more universal than `Element` and
allows us to easily return components.
- Using `impl IntoElement` in `RenderOnce` for consistency, which
requires `Component` to allocate an `AnyElement`. We use a bump
allocated arena anyway for these, and my benchmark doesn't show an
impact.


![frame-time-histogram](https://github.com/zed-industries/zed/assets/1789/d3889cca-9ebc-4d72-aa68-34a5be3bad3c)

In this histogram, frames-0 is this PR, frames-1 is main.

Release Notes:

- N/A
2024-01-03 10:37:26 -07:00
Nate Butler
15fb9d9195 Standardize icon naming 2024-01-03 11:45:41 -05:00
Marshall Bowers
c4f7dedd63 Merge branch 'main' into completion-menu-detail-layout 2024-01-03 11:44:29 -05:00
Marshall Bowers
092eb37a71 Tweak styling for inline documentation labels
Co-Authored-By: Julia <julia@zed.dev>
2024-01-03 11:44:17 -05:00
Marshall Bowers
231fd1c5c0 Clip completion labels when they would otherwise overflow their container
Co-Authored-By: Julia <julia@zed.dev>
2024-01-03 11:41:15 -05:00
Nate Butler
127acede25 Update keybinding rendering 2024-01-03 11:37:49 -05:00
Nate Butler
124604c019 Add pageup and pagedown icons and keybinding icons 2024-01-03 11:28:31 -05:00
Nate Butler
b0bbb742ab Add return, space, tab, escape keybinding icons 2024-01-03 11:14:33 -05:00
Antonio Scandurra
b348d0e59f
Focus active item when pressing tab in buffer search bar (#3859)
Release Notes:

- N/A
2024-01-03 16:58:30 +01:00
Marshall Bowers
f4f9aab8a9 Remove text_ui
So we don't regress from #3852.
2024-01-03 10:56:51 -05:00
Antonio Scandurra
209fe7e0fa Focus active item when pressing tab in buffer search bar 2024-01-03 16:39:58 +01:00
Marshall Bowers
f73f735d41
Polish off channel buttons (#3858)
This PR polishes off the channel buttons such that they behave as
expected.

The absolutely-positioned button container will now no longer take up
space—and thus obscure the channel name—when there are no notifications
and the channel entry is not hovered.

Release Notes:

- N/A
2024-01-03 10:31:01 -05:00
Piotr Osiewicz
b4a205b37c Pane: Fix flicker when opening/closing tabs
Tab bar was losing focus for one frame which led to it skipping rendering of tab controls & flickering. It also occured when opening new tabs.
2024-01-03 13:21:21 +01:00
Piotr Osiewicz
406edd279a Merge branch 'main' into refine-render-traits 2024-01-03 12:27:42 +01:00
Piotr Osiewicz
7747c5dbd9 Fix up storybooks in theme2 2024-01-03 12:23:05 +01:00
Julia
1810824bc4 Merge branch 'main' into completion-menu-detail-layout 2024-01-02 22:46:13 -05:00
Joseph T. Lyons
017b25e511
Add debounce time back to telemetry queue (#3856)
After talking with Max, we decided to bring back the debounce time to
the telemetry queue, only, with a longer duration than before.

Release Notes:

- N/A
2024-01-02 21:56:15 -05:00
Julia
2a73eb3fad
Add icon_tooltip for panel buttons rather than using persistent name (#3849)
Fixes missing spaces in these tooltips

Release Notes:

- N/A
2024-01-02 21:55:57 -05:00
Joseph T. Lyons
366d386dbb Add debounce time back to telemetry queue 2024-01-02 21:50:00 -05:00
Max Brunsfeld
5437c8041a
Use buffer font size for editor overlays and blocks (#3852)
Previously, the buffer font size was not respected by these editor
features.
2024-01-02 17:41:57 -08:00
Conrad Irwin
e43be065d9
Fix position calculation (#3854)
Fixes a bug where the context menu appears in the wrong place
2024-01-02 18:36:57 -07:00
Marshall Bowers
e8df1a7284
Fix hint colors (#3855)
This PR fixes the hint colors, which were no longer correct after #3842.

Release Notes:

- N/A
2024-01-02 20:34:18 -05:00
Conrad Irwin
4ab5fa564d Fix overlay position calculation
(but keep rounding)
2024-01-02 18:17:26 -07:00
Max Brunsfeld
75acb4918c Use buffer font size for diagnostic headers
Co-authored-by: Nathan <nathan@zed.dev>
2024-01-02 17:14:32 -08:00
Marshall Bowers
d637657a99
Revert "Round tooltip co-ordinates (#3836)" (#3853)
This reverts commit 09951208a7, reversing
changes made to 93a818d018.

I noticed an issue where context menus were appearing in the wrong
location (shifted to the right) as a result of this change.

Release Notes:

- N/A
2024-01-02 20:04:11 -05:00
Max Brunsfeld
4b006ccd5b Use buffer font size for editor overlays and blocks
Co-authored-by: Nathan <nathan@zed.dev>
2024-01-02 15:55:56 -08:00
Marshall Bowers
74468a88c8
Improve positioning of channel buttons (#3850)
This PR is another pass at improving the positioning of channel buttons.

I had to employ some dirty hacks to get it to work, but I think it is
~mostly there.

Release Notes:

- N/A
2024-01-02 18:42:17 -05:00
Max Brunsfeld
335e00778f
Add nightly environment for collab (#3848)
For now, we'll need to deploy to `nightly` manually, using the same
scripts that we use to deploy to `preview` and `production`.

We've renamed the `deploy` script to `deploy-collab`, and added a new
script, `deploy-postgrest` that sets up the Postgrest database admin
API. We split that out, since it's not needed for environments that
share a database with prod.
2024-01-02 15:18:52 -08:00
Julia
14066c4f0e Add icon_tooltip for panel buttons rather than using persistent name 2024-01-02 17:56:19 -05:00
Max Brunsfeld
5b35dedc5f Add nightly environment for collab
Also, move postgrest service + deployment into a separate manifest
file, which is deployed via a separate script, `deploy-postgrest`.
This way, we don't have unused postgrest instances in preview and
nightly, since those use the prod database.

Co-authored-by: Conrad <conrad@zed.dev>
2024-01-02 14:29:21 -08:00
Joseph T. Lyons
850a9e33e3
Add settings events (#3847)
Adds the infractucture for settings events and specifically tracks theme
settings. Currently, we only take note of the theme at app open and when
the user switches the theme with the theme selector. Changes at the
config file are ignored, as putting code that low leads to a lot of
chances of reporting theme events when the user hasn't done anything.
This change is done in both Zed 1 and Zed 2.

I'll open up a PR on zed.dev and adjust the database accordingly.

Release Notes:

- N/A
2024-01-02 17:19:21 -05:00
Conrad Irwin
09951208a7
Round tooltip co-ordinates (#3836)
There was a hypothesis that this would fix border rendering.

It doesn't :D; but it does at least mean that they are always
consistently
broken, so it may be easier to fix.
2024-01-02 15:06:19 -07:00
Marshall Bowers
ce5855da2f Render completion menu items using ListItems 2024-01-02 17:03:02 -05:00
Joseph T. Lyons
3dd5641d2b Add settings events 2024-01-02 17:02:53 -05:00
Marshall Bowers
93a818d018
Add additional status colors and style diagnostic popovers (#3846)
This PR adds additional background and border colors for each of the
status colors to the theme.

These colors are then used to style the diagnostic popovers:

<img width="407" alt="Screenshot 2024-01-02 at 4 25 50 PM"
src="https://github.com/zed-industries/zed/assets/1486634/fbc64ea7-3dcd-43b7-8520-91f16304bfba">

<img width="396" alt="Screenshot 2024-01-02 at 4 26 05 PM"
src="https://github.com/zed-industries/zed/assets/1486634/6e4a44bf-4aac-4595-afff-7fbf8b2b9e1f">

Release Notes:

- N/A
2024-01-02 16:37:55 -05:00
Julia
ae71d1ad5d Layout completion single-line documentation to the right of item 2024-01-02 15:56:35 -05:00
Marshall Bowers
2b9570e3e7
Fix spacing in diagnostics tab (#3844)
This PR fixes the spacing in the diagnostics tab.

#### Before

<img width="108" alt="Screenshot 2024-01-02 at 3 40 51 PM"
src="https://github.com/zed-industries/zed/assets/1486634/9508d867-5b5d-45b0-8b16-be35a23e3e7a">

#### After

<img width="121" alt="Screenshot 2024-01-02 at 3 40 54 PM"
src="https://github.com/zed-industries/zed/assets/1486634/33e665e7-2935-4d4f-b1d0-9cb655235867">

Release Notes:

- N/A
2024-01-02 15:51:16 -05:00
Marshall Bowers
d64d91a321
Restore transparency to scroll bar handles (#3843)
This PR restores the semi-transparency to the scroll bar handle colors
that were lost in #3842.

If we adjust the rendering of the scrollbar to draw the status
indicators on top of the scrollbar handle then we can remove the
transparency.

Release Notes:

- N/A
2024-01-02 15:39:04 -05:00
Marshall Bowers
8247be3a45
Use Zed1 Color Scheme to update Zed1 Theme Importer (#3842)
Bring Zed1 themes closer to their old appearance using the `base_theme`
values.

This will inevitably re-introduce some outstanding design issues from
Zed 1 that we will need to solve (low contrasts in some places, etc.)
We'll work on some of these in a later PR.

Known issues introduced:
- Scrollbar thumb is incorrectly drawn in front of the indicators
- Borders aren't quite correct - will fix in a followup
- Titlebar/status bar buttons will now have low contrast states
- Keybinding background color blends with palette

There are likely more issues, add them to the product checklist as you
find them.

Release Notes:

- N/A
2024-01-02 15:14:28 -05:00
Nate Butler
711b099ea0 Update status colors in zed1 importer
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2024-01-02 14:53:51 -05:00
Nate Butler
ff74c9367a Get zed1 theme importer down to no warnings
Note: We removed some unused theme colors
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2024-01-02 14:47:46 -05:00
Conrad Irwin
12f06a96d0 Merge branch 'main' into overlay-rounding 2024-01-02 12:35:38 -07:00
Nate Butler
9c91b65ce2 Use mostly base theme
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2024-01-02 14:30:11 -05:00
Nate Butler
7ea9725125 Start using base theme in zed1 theme importer
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2024-01-02 14:21:20 -05:00
Marshall Bowers
9996fbee54
Absolutely position channel buttons (#3840)
This PR absolutely positions the channel buttons on top of the channels.

This prevents the buttons from getting pushed off the edge of the panel
when the channel names are long.

Still needs some fine-tuning, but gets us closer to where we want to be.

Release Notes:

- N/A
2024-01-02 14:04:55 -05:00
Nathan Sobo
cb6652e7bf
Clippy fixes for gpui2 (#3826)
It's not quite complete, but we gotta start somewhere.
Release Notes:

- N/A
2024-01-02 11:38:25 -07:00
Nathan Sobo
c636731fd9 Add some docs 2024-01-02 11:30:58 -07:00
Nathan Sobo
30624b9899
Fix anti-aliasing artifacts in GPUI 2 borders (#3818)
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.

Release Notes:

- N/A
2024-01-02 10:32:23 -07:00
Nathan Sobo
68e7d99219 Return impl IntoElement from RenderOnce::render
This makes it a bit more approachable to implement.

This required converting the state of Component to AnyElement, which
costs an allocation. I'm hoping this will be ok performance-wise now
that AnyElements use bump allocation, but I need to benchmark still.
2024-01-02 10:27:09 -07:00
Conrad Irwin
2e349a806a Round tooltip co-ordinates 2024-01-02 10:12:57 -07:00
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
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
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
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
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
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