Commit Graph

13627 Commits

Author SHA1 Message Date
Conrad Irwin
489ef23b76
Show hovered cursors less flickerily (#4242)
Now when hovering on a cursor it'll stay around for 2 seconds

Release Notes:

- Improved hovering over collaborators' cursors.
2024-01-24 10:20:34 -07:00
Joseph T. Lyons
a4897e00b4 v0.121.x dev 2024-01-24 10:54:33 -05:00
Antonio Scandurra
4665b9afb6
Improve startup time (#4248)
Since our last measurements, startup time in Zed had regressed quite
significantly. This was due to several issues:

- We were loading IBMPlex, which we're not really using in the UI.
- Images were being parsed in the foreground, thus blocking the main
thread
- Language models (for semantic index and assistant) were being loaded
in the foreground, thus blocking the main thread
- Interaction with the keychain was blocking the main thread

In addition to these, with this pull request we will now deserialize the
items for a pane in parallel, as opposed to doing so sequentially.

All combined, when running the zed binary directly this brings startup
time from ~350ms to ~210ms on my machine.

Release Notes:

- Improved startup time.
2024-01-24 15:39:05 +01:00
Antonio Scandurra
25a7eb27d2 Move interaction with keychain off the main thread 2024-01-24 14:53:05 +01:00
Thorsten Ball
2ce24dc746
Fix tab bar button's focus handling lagging behind (#4247)
This fixes https://github.com/zed-industries/community/issues/2442 for
me.

Previously, the tab bar buttons would stay when the chat panel was
opened (and received focus) until something else was drawn (or caused a
render?)

With this change, the tab bar buttons are only shown if the pane was
focus.

I'm not sure about the side-effects of this, but the toolbar still seems
to work fine.

### Before


https://github.com/zed-industries/zed/assets/1185253/24b56e51-467b-4a09-909f-72ee6f76f32c

### After



https://github.com/zed-industries/zed/assets/1185253/18865f49-d00e-453a-8a38-aee15f06beb8



### Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2024-01-24 14:21:39 +01:00
Mikayla Maki
b9218ae80b
Add module documentation to GPUI and make gpui.rs example compile (#4241)
[[PR Description]]

Release Notes:

- N/A
2024-01-24 05:19:15 -08:00
Piotr Osiewicz
0d0c85a5ee Fix typo in comment 2024-01-24 14:03:12 +01:00
Piotr Osiewicz
fe2cb9f9ca fixup! pane: Another stab at focus flickers in tab bar 2024-01-24 14:01:17 +01:00
Piotr Osiewicz
0497b2f212 pane: Another stab at focus flickers in tab bar
This time around, we address the flicker seen in #3857 by querying the active item (that might've just been added),
as it knows whether it has focus even if the parent Pane does not.

Co-authored-by: Thorsten <thorsten@zed.dev>
2024-01-24 13:57:55 +01:00
Antonio Scandurra
22046ef9a7 Load language models in the background 2024-01-24 13:36:44 +01:00
Antonio Scandurra
92b0184036 Load images in the background 2024-01-24 13:15:31 +01:00
Antonio Scandurra
e3157f7212 Remove unused font 2024-01-24 13:14:47 +01:00
Antonio Scandurra
e4604ebedf Parallelize deserialization of pane items on startup
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2024-01-24 12:48:53 +01:00
Antonio Scandurra
526ea40005
Log if element arena allocation is >80% (#4246)
We recently doubled the size of the `ELEMENT_ARENA` after someone ran
into a panic due to the arena running out of space.

This adds some logging so that we can hopefully develop a better
understanding of when the element area's allocation is elevated.

Release Notes:

- N/A
2024-01-24 12:48:05 +01:00
Thorsten Ball
027f425804 Fix tab bar button's focus handling lagging behind
This fixes https://github.com/zed-industries/community/issues/2442 for
me.

Previously, the tab bar buttons would stay when the chat panel was
opened (and received focus) until something else was drawn (or caused a
render?)

With this change, the tab bar buttons are only shown if the pane was
focus.

I'm not sure about the side-effects of this, but the toolbar still seems
to work fine.
2024-01-24 11:47:59 +01:00
Thorsten Ball
e01850642f
Cache font-missing result to avoid unnecessary lookups (#4245)
This fixes the performance problem we saw in
https://github.com/zed-industries/community/issues/2405.

In a trace we could see that if a font is missing we'd constantly look
it up and never cache that it's missing.

This changes that and does cache the font-is-missing result.

Drawback is that one would need to restart Zed after installing a
missing font that was configured in settings. That seems acceptable for
now, though.

Release Notes:

- Improved rendering performance when configured fonts are missing on
the system.
2024-01-24 11:07:11 +01:00
Thorsten Ball
18f5752f04 Log if element arena allocation is >80%
We recently doubled the size of the `ELEMENT_ARENA` after someone ran
into a panic due to the arena running out of space.

This adds some logging so that we can hopefully develop a better
understanding of when the element area's allocation is elevated.

Co-authored-by: Antonio <antonio@zed.dev>
2024-01-24 11:03:28 +01:00
Thorsten Ball
4800991f28 Cache font-missing result to avoid unnecessary lookups
This fixes the performance problem we saw in https://github.com/zed-industries/community/issues/2405.

In a trace we could see that if a font is missing we'd constantly look
it up and never cache that it's missing.

This changes that and does cache the font-is-missing result.

Drawback is that one would need to restart Zed after installing a
missing font that was configured in settings. That seems acceptable for
now, though.

Co-authored-by: Antonio <antonio@zed.dev>
2024-01-24 10:38:38 +01:00
Antonio Scandurra
b640e0e7af Increase capacity of element arena to 8MB
This fixes a panic we just saw on nightly. It's the first time we
see this panic, so I think it's pretty safe to assume having twice as
much capacity will fix it.
2024-01-24 10:14:26 +01:00
Mikayla
ce0ff819f9
Fix more tests 2024-01-23 21:49:05 -08:00
Mikayla
fa6acc385f
Add note about discord 2024-01-23 21:41:06 -08:00
Mikayla
1facc9fc11
Fix test error 2024-01-23 21:38:16 -08:00
Mikayla
ce7cd5a077
Copy GPUI documentation to README 2024-01-23 21:35:01 -08:00
Conrad Irwin
4e085b2052 Show hovered cursors less flickerily 2024-01-23 22:32:22 -07:00
Mikayla
d80959d64e
Add module documentation to GPUI and make gpui.rs example compile 2024-01-23 21:29:12 -08:00
Marshall Bowers
c07e416dc0
Clean up gpui docs (#4240)
This PR does some cleanup of the `gpui` docs, making sure we're linking
things appropriately and following good Rust documentation style.

Release Notes:

- N/A
2024-01-23 23:20:05 -05:00
Mikayla Maki
1aa02ac4b6
Ensure that notify observations are sent during Window::draw() (#4236)
This PR fixes a bug in GPUI where the observation API would not be
triggered if a focus event caused a `notify()`

Release Notes:

- N/A
2024-01-23 20:17:34 -08:00
Mikayla
83363008f9
Call notify observers during Window::draw() 2024-01-23 16:52:34 -08:00
Max Brunsfeld
26c901e2f2
Fix bugs in file finder (#4234)
* Fixed jumping of list item when the separator appeared and
disappeared.
* Fixed a bug where the selection got into a valid state when updating
the matches

Release Notes:

- Fixed an issue where the file finder's selection got into a state
where nothing was selected after filtering the matches.
2024-01-23 16:33:52 -08:00
Marshall Bowers
63d86fb137
Add barebones GPUI README (#4235)
This PR adds a barebones README to the `gpui` crate, just so folks have
somewhere to land on when we link them here from
[gpui.rs](https://www.gpui.rs/).

We can flesh this out as we go.

Release Notes:

- N/A
2024-01-23 19:22:49 -05:00
Conrad Irwin
a3968c5cc5
Fix rendering of diagnostic blocks (#4232)
- Distinct colors to make it not confusing
- Avoid overflowing the edge of the editor when the message is long


Release Notes:

- Improved display of diagnostic blocks (F8)
2024-01-23 16:39:57 -07:00
Max Brunsfeld
880d330459 Clear selected index when updating file finder's matches 2024-01-23 15:39:52 -08:00
Max Brunsfeld
1b12437f7e Render file finder separator in a way that doesn't affect layout
Previously, while typing, the separator appearing and disappeaering would
cause the layout of the items below to jump up and down.
2024-01-23 15:39:52 -08:00
Max Brunsfeld
2cf692e8d5 Move file finder tests to their own file
Previously, the size of the file finder file would cause code formatting to time out.
2024-01-23 15:39:51 -08:00
Mikayla Maki
be4d314858
Revert "Improve completion, action and shared project popovers' layout" (#4233)
Reverts zed-industries/zed#4226

Unfortunately there where some worse states possible after this PR.
Reverting until after the launch, as the problems it addresses are still
bad.

![Screenshot 2024-01-23 at 3 20
59 PM](https://github.com/zed-industries/zed/assets/2280405/d25ab0d5-db49-44cb-b865-e320a97616ce)
2024-01-23 15:34:48 -08:00
Conrad Irwin
450cf9dd06 Fix rendering of diagnostic blocks
- Distinct colors to make it not confusing
- Avoid overflowing the edge of the editor when the message is long
2024-01-23 16:28:58 -07:00
Piotr Osiewicz
f2ff7fa4d5
chore: Change AGPL-licensed crates to GPL (except for collab) (#4231)
- [x] Fill in GPL license text.
- [x] live_kit_client depends on live_kit_server as non-dev dependency,
even though it seems to only be used for tests. Is that an issue?

Release Notes:
- N/A
2024-01-24 00:26:58 +01:00
Mikayla Maki
9f6072c6b6
Revert "Improve completion, action and shared project popovers' layout" 2024-01-23 15:26:11 -08:00
Kirill Bulatov
e6573e9055 Revert search in gitignored files in file finder 2024-01-23 23:50:25 +02:00
Max Brunsfeld
2d7d07173d
Use a different color for ignored files in the project panel (#4227)
![Screenshot 2024-01-23 at 1 03
01 PM](https://github.com/zed-industries/zed/assets/326587/28b4e7e1-8847-40ff-aed6-0f4ede6b9007)


Release Notes:

- Fixed an issue where ignored files were not visually distinguished in
the project panel.
2024-01-23 13:10:15 -08:00
Max Brunsfeld
4e970e978a Use a different color for ignored files in the project panel 2024-01-23 13:00:28 -08:00
Kirill Bulatov
7ec68e0227
Improve completion, action and shared project popovers' layout (#4226)
Before:

* cutoff completion labels and docs
<img width="801" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/12fe39b2-a8a7-42d8-b697-e2a4fbd836b7">

* too long action labels start to introduce newlines and break the
layout
<img width="716" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/a0530f1e-4200-4cc4-8e0f-9a63d04e4d5c">

* too long completion proposals are cut off
<img width="1321" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/1ec154a1-9de5-4e47-9e9f-632b3e33f42a">



After:

* the docs are shifted, but both completions and docs are rendered
entirely now
<img width="1351" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/ddb0baa4-88b6-45e9-b3e1-496c0d6a0d0f">

* 
<img width="750" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/102ed77c-d7d0-41d2-a4a0-a8c73285ea8a">

* completions are not jumping in sized anymore, with all elements
aligned to occupy max elements' width and height
<img width="1459" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/483e3534-b00a-423c-a848-3c4ca1199510">


Release Notes:

- Improved completion and action label layouts
2024-01-23 22:49:21 +02:00
Kirill Bulatov
bf35b78380 Allow both action and completion lists to occupy max width and height of its element 2024-01-23 22:42:06 +02:00
Max Brunsfeld
035bd79ae1 collab 0.40.1 2024-01-23 12:39:30 -08:00
Max Brunsfeld
67b7d74908
Exclude staff from CLA check (#4225) 2024-01-23 12:12:44 -08:00
Kirill Bulatov
513ddf1861 Change background for the max width of the completion/action elements 2024-01-23 22:12:29 +02:00
Max Brunsfeld
b84f4a3cd2 Fix assertion in test_get_users 2024-01-23 11:48:07 -08:00
Kirill Bulatov
cad6bab48e Fix sharing project notification size 2024-01-23 21:44:18 +02:00
Kirill Bulatov
4c039d0f02 Fix code actions being too small 2024-01-23 21:39:22 +02:00
Max Brunsfeld
f3b014c9a9 Fix default value of users created_at in sqlite schema 2024-01-23 11:36:35 -08:00
Max Brunsfeld
1fd72d26cb Exclude staff from CLA check 2024-01-23 11:31:55 -08:00
Kirill Bulatov
74bdb48359 Make completions menu to occupy more space
* make completion elements as wide as the longest element
* make completion docs scrollable

co-authored-by: Piotr <piotr@zed.dev>
2024-01-23 21:26:40 +02:00
Julia
c4a028d38d
Make was_top_layer_under_active_drag more closely match logic of was_top_layer (#4222)
Release Notes:

- N/A
2024-01-23 14:04:49 -05:00
Antonio Scandurra
8ce7594a26
Drop active searchable item subscription when changing active item (#4220)
We were leaking the previous active item's subscription, which meant
that we would receive the `MatchesInvalidated` event as many times as we
changed items.

Release Notes:

- Fixed a performance issue when switching the active item while the
search bar was open.
2024-01-23 18:50:01 +01:00
Julia
21d6751c48 Make was_top_layer_under_active_drag more closely match logic of was_top_layer
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2024-01-23 12:44:23 -05:00
Conrad Irwin
3d5da2f4d9
less secret (#4221)
- Remove ZED_SECRET_CLIENT_TOKEN
- Remove ZED_CLIENT_SECRET_TOKEN

Neither of these were ever actually a secret.

Release Notes:

- N/A
2024-01-23 10:43:15 -07:00
Conrad Irwin
ff60d886f6 Remove ZED_SECRET_CLIENT_TOKEN 2024-01-23 10:34:00 -07:00
Antonio Scandurra
b151e12890 Drop active searchable item subscription when changing active item
We were leaking the previous active item's subscription, which meant
that we would receive the `MatchesInvalidated` event as many times as
we changed items.

Co-Authored-By: Thorsten Ball <thorsten@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2024-01-23 18:31:21 +01:00
Conrad Irwin
61dfec2b75
Add keymatch modes so terminal can have cmd-k (#4219)
This isn't my favorite idea of a fix, but it does work for now, and it
seems likely the terminal will need to configure other aspects of action
dispatch in the future.

In the future we should explore making it possible to do this via the
keymap, either by making disabling bindings more robust; or by having a
way to indicate immediate mode per binding.

Release Notes:

- Fixed a bug where cmd-k in terminal took 1s
2024-01-23 10:23:45 -07:00
Piotr Osiewicz
21e6b09361
Remove license-file from Cargo.toml as it is apparently redundant (#4218)
Release Notes:

- N/A
2024-01-23 17:40:30 +01:00
Conrad Irwin
056da0a0f1 Add keymatch modes so terminal can have cmd-k
This isn't my favorite idea of a fix, but it does work for now, and it
seems likely the terminal will need to configure other aspects of action
dispatch in the future.

In the future we should explore making it possible to do this via the
keymap, either by making disabling bindings more robust; or by having a
way to indicate immediate mode per binding.
2024-01-23 09:37:44 -07:00
Piotr Osiewicz
5ea311909a
Add missing license for derive_refineable (#4217)
Missed one crate.
Release Notes:

- N/A
2024-01-23 17:22:40 +01:00
Piotr Osiewicz
678bdddd7d
chore: Add crate licenses. (#4158)
- GPUI and all dependencies: Apache 2
- Everything else: AGPL

Here's a script that I've generated for it:
https://gist.github.com/osiewicz/6afdd6626e517da24a2092807e6f0b6e

Release Notes:
- N/A

---------

Co-authored-by: David <david@zed.dev>
2024-01-23 16:56:22 +01:00
Thorsten Ball
030b20ace9 Fix scroll jitter by ignoring autoscroll events if following
When following someone else we saw jitter because
`ScrollPositionChanged` events were battling `SelectionsChanged` events,
both of which were scrolling the viewport.

This ignores the ScrollPositionChanged if autoscrolling is on.

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Julia <julia@zed.dev>
2024-01-23 16:16:21 +01:00
Antonio Scandurra
a802bb284c
Fix horizontal scroll going too far to the left (#4213)
Previously one could scroll infinitely to the left. This clams it to 0.

Release Notes:

- Fixed horizontal scroll possibly going too far to the left.
2024-01-23 13:38:35 +01:00
Thorsten Ball
c8c605d23a Fix horizontal scroll going too far to the left
Previously one could scroll infinitely to the left. This clams it to 0.

Co-authored-by: Antonio <antonio@zed.dev>
2024-01-23 12:28:50 +01:00
Kirill Bulatov
4cccb4e3d0
Fix LSP shenanigans when opening and/or editing settings files (#4212)
Fixes
* LSP servers never being shut down on worktree release
* worktrees (and LSP servers) being re-created for settings files on
every opening

Also,
* removes `async` from `workspace_configuration` to simplify the code:
we only return static configurations now

Release Notes:

- Fixed excessive LSP server creation for Zed settings files
2024-01-23 13:20:00 +02:00
Kirill Bulatov
5e0cabc394 Create a special worktree for settings files
To avoid LSP server restarts/leaks when those are being opened

co-authored-by: Piotr <piotr@zed.dev>
2024-01-23 13:10:30 +02:00
Thorsten Ball
fc7458d13b
Trim diagnostic messages to fix rendering bug (#4210)
Before this change a diagnostic message with a trailing newline (e.g.
`line1\nline2\n`) would be rendered in a `Block` with `line_height: 2`.
But the content we then display in this block had 3 "lines", which
pushed the content out of the block.

This fixes the issue by trimming the newlines at the end from the
diagnostics.

Release Notes:

- Fixed rendering multi-line diagnostic errors inside of the editor.
2024-01-23 11:58:45 +01:00
Thorsten Ball
bf843e2131 Cache last used layer_id for StackingOrder
This optimizes rendering time by saving computation of the layer_id and
comparison when inserting it into the `BTreeMaps`.

Co-authored-by: Antonio <antonio@zed.dev>
2024-01-23 11:46:11 +01:00
Kirill Bulatov
ab8585ee7e Remove the async modifier from the workspace_configuration method 2024-01-23 11:58:17 +02:00
Thorsten Ball
f8939fd859 Trim diagnostic messages to fix rendering bug
Before this change a diagnostic message with a trailing newline (e.g.
`line1\nline2\n`) would be rendered in a `Block` with `line_height: 2`.
But the content we then display in this block had 3 "lines", which
pushed the content out of the block.

This fixes the issue by trimming the newlines at the end from the
diagnostics.

Co-authored-by: Antonio <antonio@zed.dev>
2024-01-23 10:36:06 +01:00
Kirill Bulatov
351914f4bd Clean up LSP servers on worktree release 2024-01-23 11:34:51 +02:00
Conrad Irwin
5a9f1e4eb7
fix local collab tests (#4209)
I was unable to run the collab tests locally because I would run out of
file descriptors.

From some digging it turned out that tokio allocates a new file
descriptor to do work on the CurrentThread using KQUEUE.

We create a new tokio Runtime with each database connection, and these
database connections were being retained by the Client, which is
retained by the Context.

Cleaning up our leaked contexts (and an unrelated retain cycle in the
UserStore) fixes the problem (though does make me
wonder if a different approach might be preferrable).

Release Notes:

- N/A
2024-01-22 23:17:23 -07:00
Conrad Irwin
ce0833eadf
Fix off-by-one highlighting in hover tooltip (#4206)
rust analyzer has a tendency to return markdown of the form:

```rust
 // <-- note the leading space
blah blah blah
```

This is clearly defectuous, so we used to .trim() the output.

Unfortunately we trim after applying syntax highlighting, so that causes
the output to look goofy.

Fix this by updating the highlighting when we trim.

[[PR Description]]

Release Notes:

- Fixed a bug where syntax highlighting was off in hover tooltips
2024-01-22 23:12:08 -07:00
Conrad Irwin
309148f7f0
Update Channel membership UI (#4203)
* Remove ability to act on people defined in parent channels
* Show promote buttons on guests

Release Notes:

- Improved channel membership manangement
2024-01-22 23:11:54 -07:00
Conrad Irwin
d4e83e48bd Fix docs 2024-01-22 23:10:53 -07:00
Conrad Irwin
34efb23bf6 Fix a circular reference between Client and UserStore
Before this change once the UserStore had been created, the Client would
never be dropped.
2024-01-22 23:05:58 -07:00
Conrad Irwin
0b1b758f02 Fix leaking test contexts
I was unable to run the collab tests locally because I would run out of
file descriptors.

From some digging it turned out that tokio allocates a new file
descriptor to do work on the CurrentThread using KQUEUE.

We create a new tokio Runtime with each database connection, and these
database connections were being retained by the Client, which is
retained by the Context.

Cleaning up our leaked contexts fixes the problem (though does make me
wonder if a different approach might be preferrable).
2024-01-22 23:05:54 -07:00
Mikayla
a241a13d60
fix test 2024-01-22 19:42:25 -08:00
Mikayla
938b84c045
Finish documenting GPUI 2024-01-22 19:33:45 -08:00
Mikayla
eab2e21126
Document more styling functions 2024-01-22 19:31:31 -08:00
Mikayla
a99d5b87e8
WIP: text_system 2024-01-22 19:30:40 -08:00
Mikayla
0c3fb449f0
Document geometry 2024-01-22 19:30:40 -08:00
Mikayla
1902df9316
WIP: Start geometry crate 2024-01-22 19:30:40 -08:00
Mikayla
1f94463ce2
Switch Arc<Mutex<Keymap>> to Rc<RefCell<Keymap>>, a relic of the GPUI2 port.
Make gpui pass clippy
2024-01-22 19:30:38 -08:00
Max Brunsfeld
ba5b969e10 collab 0.40.0 2024-01-22 17:30:55 -08:00
Max Brunsfeld
a529a53d51
Don't allow granting write access to guests who haven't signed the CLA, if the channel requires the zed CLA (#4208) 2024-01-22 17:29:23 -08:00
Max Brunsfeld
25708088b7 Add requires_zed_cla column to channels table
Don't allow granting guests write access in a call where the channel
or one of its ancestors requires the zed CLA, until that guest has
signed the Zed CLA.

Co-authored-by: Marshall <marshall@zed.dev>
2024-01-22 16:41:24 -08:00
Julia
f2eb78bbfc
Avoid overwriting mouse wheel scroll with selection auto-scroll (#4207)
Release Notes:

- Fixed an issue where mouse wheel events could be ignored while
selecting text near the top or bottom of the editor with the mouse.
2024-01-22 19:07:03 -05:00
Julia
a2aa47aba2 Avoid overwriting mouse wheel scroll with selection auto-scroll 2024-01-22 18:12:25 -05:00
Conrad Irwin
fd8d2d41b0 One off 2024-01-22 15:53:12 -07:00
Kirill Bulatov
92c4c84730
Fix the fonts panic and completions in the settings (#4205)
* Do not add fonts' `font_family` into the font completion list, if
there's no corresponding attribute in the font data
* Remove `font_style_name` and `font_name` attribute from the completion
options, since those bring `-Italic`, `-Bold` variants that are not
family names (which we use to load the fonts, so they are useless)

Release Notes:

- Improved font family names completion in the settings
2024-01-23 00:29:36 +02:00
Kirill Bulatov
a75fa35a08 Fix the fonts panic
co-authored-by: Piotr <piotr@zed.dev>
2024-01-23 00:23:48 +02:00
Conrad Irwin
98d514f5bf Fix off-by-one highlighting in hover tooltip
rust analyzer has a tendency to return markdown of the form:

```rust
 // <-- note the leading space
blah blah blah
```

This is clearly defectuous, so we used to .trim() the output.

Unfortunately we trim after applying syntax highlighting, so that causes
the output to look goofy.

Fix this by updating the highlighting when we trim.
2024-01-22 15:23:37 -07:00
Max Brunsfeld
676d2cb24a collab 0.39.0 2024-01-22 14:22:04 -08:00
Max Brunsfeld
44c2b8b063
Add REST APIs for signing the CLA, retrieving users who've signed the CLA (#4202) 2024-01-22 14:20:39 -08:00
Max Brunsfeld
b9458fe4ac Fix call to get_or_create_user in seed binary 2024-01-22 14:15:41 -08:00
Max Brunsfeld
03e008959f Fix get_or_create_user test 2024-01-22 14:12:31 -08:00
Max Brunsfeld
cd7f377c31 Allow checking CLA signatures by GitHub login
This will be used by CLA Bot.

Co-authored-by: Marshall <marshall@zed.dev>
2024-01-22 13:55:12 -08:00
Conrad Irwin
a9ddef8227 Update Channel membership UI
* Remove ability to act on people defined in parent channels
* Show promote buttons on guests
2024-01-22 14:48:14 -07:00
Conrad Irwin
43c21925ac
Hide editor hovers when a menu is open (#4200)
Release Notes:

- Fixed a bug where editor hover state could appear while menu open
([#2384](https://github.com/zed-industries/community/issues/2384)).
2024-01-22 14:41:03 -07:00
Max Brunsfeld
56556d71a1 Add API for retrieving the date that a contributor signed the CLA
Co-authored-by: Marshall <marshall@zed.dev>
2024-01-22 13:11:24 -08:00
Max Brunsfeld
6c937c4a90 Make POST /contributors API idempotent
Co-authored-by: Marshall <marshall@zed.dev>
2024-01-22 12:49:35 -08:00
Conrad Irwin
2445df8bdd Remove unused import? 2024-01-22 13:37:14 -07:00
Conrad Irwin
53b47c15ac Hide editor hovers when a menu is open 2024-01-22 13:33:13 -07:00
Conrad Irwin
c5465d26f8
Fix panel deserialization (#4198)
In the old world, panel loading happened strictly before workspace
deserialization. Now it's inverted.

Fix this by storing on the dock the serialized state so they can restore
state as panels are loaded.

[[PR Description]]

Release Notes:

- Fixed Zed forgetting which panels were open on boot.
([#2406](https://github.com/zed-industries/community/issues/2406)).
2024-01-22 12:37:38 -07:00
Conrad Irwin
36a8bbfd43 Fix panel deserialization
In the old world, panel loading happened strictly before workspace
deserialization. Now it's inverted.

Fix this by storing on the dock the serialized state so they can restore
state as panels are loaded.
2024-01-22 12:31:28 -07:00
Max Brunsfeld
1981de4cae Add REST APIs for getting and adding contributors
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-22 10:48:33 -08:00
Conrad Irwin
a1c4716eeb
Potential fix for #2422 (#4197)
- it seems like layer.drawable_size() is 0,0 in metal_renderer.rs:189 
- we set this in two places:
    - in response to a CALayerDelegate setFrameSize: event
- in response to a CALayerDelegate viewDidChangeBackingProperties:
event.
- it looks like if we don't set it in either of these cases we get a
different failure mode: the view is zoomed just wrong.
- That said, I can reproduce the screenshot if .scale_factor() returns
0.
- This might happen if [nativeWindow screen] is nil, which happens when
the window is off screen.
    - possible that zed started with offscreen window?
- I would expect that viewDidChangeBackingProperties would fire when
that changed.
    - potential fix: default to 2.0

Release Notes:

- Fixed Zed occasionally rendering blank on laungh
([#2422](https://github.com/zed-industries/community/issues/2422)).
2024-01-22 11:25:02 -07:00
Mikayla Maki
e896941981
Fix certain hovers being cut off (#4196)
Release Notes:

- Fixes a bug where the bottom of hover popovers would be cut off
([#2434](https://github.com/zed-industries/community/issues/2434)).
2024-01-22 10:19:39 -08:00
Conrad Irwin
72cb865108
jk (#4189)
Add support for mapping `jk` to escape in vim mode.

This changes the behaviour of the keymatches when there are pending
matches.

Before: Even if there was a pending match, any complete matches would be
triggered and the pending state lost.

After: If there is a pending match, any complete matches are delayed by
1s, or until more keys are typed.

Release Notes:

- Added support for mapping `jk` in vim mode
([#2378](https://github.com/zed-industries/community/issues/2378)),
([#176](https://github.com/zed-industries/community/issues/176))
2024-01-22 11:12:43 -07:00
Conrad Irwin
41a99c686b Potential fix for #2422 2024-01-22 11:10:15 -07:00
Mikayla
6419df82ee
Fix certain hovers being cut off 2024-01-22 09:49:07 -08:00
Conrad Irwin
c49477746e TYPO 2024-01-22 09:56:59 -07:00
Conrad Irwin
0903d29ab3 Improve logic for reused bindings, add docs. 2024-01-22 09:53:04 -07:00
Julia
3b3252b040 Rewrote and documented was_top_layer logic
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2024-01-22 11:50:47 -05:00
Julia
455d5eeb89 Preserve stacking order ID order when reusing cached view state
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2024-01-22 10:50:52 -05:00
Conrad Irwin
6c4d024237 TYPO 2024-01-22 08:40:21 -07:00
Conrad Irwin
c5d7c8e122 Fix cmd-k left 2024-01-22 08:38:20 -07:00
Julia
831769ce8c Ignore stacking order entry ids in was_top_layer 2024-01-22 10:16:59 -05:00
Julia
2c3d9805a4 Store a z-index id per-layer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2024-01-22 10:16:59 -05:00
Conrad Irwin
7ec4f22202 de-dbg! 2024-01-22 08:14:30 -07:00
Kirill Bulatov
7aa3d9d1fb Fix lightning bolt hover and git gutter mark overlapping 2024-01-22 16:01:32 +02:00
Piotr Osiewicz
b5cb8323d4 lsp-log: Reemit Editors search events.
NextMatch/PreviousMatch did not work due to us not updating the match index in the buffer search (that relied on an event being emitted).
2024-01-22 14:02:48 +01:00
Antonio Scandurra
f76a2502bb Show diagnostics on hover 2024-01-22 12:01:53 +01:00
Antonio Scandurra
de64de22a3 Introduce a ZED_MEASUREMENTS env var and use it to measure frame time 2024-01-22 11:39:20 +01:00
Thorsten Ball
2c737a1d39
Resize Nightly icons to same scale as Stable/Preview (#4179)
I'm sure @iamnbutler can do a better job here, this is just hacky, but
the size of the icon when doing `Cmd+tab` has been bugging me, so I
thought I'd resize them quickly to the dimensions the Stable/Preview
icons have.

Release Notes:

- N/A
2024-01-22 10:34:01 +01:00
Conrad Irwin
b9c7bafc80 Merge remote-tracking branch 'origin/main' into jk 2024-01-21 22:03:54 -07:00
Conrad Irwin
4143d3a36e Work on tests 2024-01-21 22:00:35 -07:00
Mikayla
b65cae5874
Moved Frame struct into element context, to be close to it's associated methods 2024-01-21 20:52:24 -08:00
Mikayla
c05edee2b5
Port the rest of the app 2024-01-21 20:26:33 -08:00
Mikayla
df4566fd1e
Refactor out element context from GPUI 2024-01-21 19:43:35 -08:00
Conrad Irwin
9d261cf859 Merge branch 'main' into jk 2024-01-21 20:36:18 -07:00
Conrad Irwin
8c541b4930 Comment out tests for nwo 2024-01-21 20:16:14 -07:00
Conrad Irwin
b06e2eb6af Update handling of 'pending' keys
Before this change if you had a matching binding and a pending key,
the matching binding happened unconditionally.

Now we will wait a second before triggering that binding to give you
time to complete the action.
2024-01-21 20:12:01 -07:00
Mikayla
2f9958621b
Do an initial pass on refactoring out ElementContext from WindowContext 2024-01-21 18:40:20 -08:00
Mikayla Maki
a8990baaac
Document more gpui (#4187)
Also add several `TODO!(docs)` comments to places that need more
feedback.

Release Notes:

- N/A
2024-01-21 15:10:04 -08:00
Mikayla
118a3461a7
Restore erronously removed APIs 2024-01-21 14:33:34 -08:00
Mikayla
660a391806
Fix typos, mark docs related todos in GPUI 2024-01-21 14:28:40 -08:00
Mikayla
aa57a4cfbc
Document / lockdown more of GPUI 2024-01-21 14:26:45 -08:00
Joseph T. Lyons
24f6c434cf Dont group messages after certain period of time 2024-01-21 16:08:41 -05:00
Joseph T. Lyons
4580172edb Fix chat timestamps 2024-01-21 15:15:17 -05:00
Conrad Irwin
b8ed83a452 Refactor key dispatch to work in terms of bindings 2024-01-21 12:27:26 -07:00
Piotr Osiewicz
6c82380232 chore: Fix clippy::needless_borrow up to an editor 2024-01-21 15:03:24 +01:00
Piotr Osiewicz
c3102feeeb chore: use WindowContext in Workspace where it is a sufficient context type 2024-01-21 14:28:19 +01:00
Thorsten Ball
29e74a648f
When searching in visual mode switch to normal mode (#4178)
This matches Neovim behaviour by setting the mode to `Normal` when using
search while in visual mode.

Release Notes:

- Fixed Vim mode not switching to normal mode from visual mode when
using search (`/`) while in visual mode.
2024-01-21 08:42:47 +01:00
Joseph T. Lyons
aa776bc9c4
Add some initial testing to telemetry (#4182)
This doesn't cover everything that should be tested in telemetry, but it
is a start. I'll add more over time.

Release Notes:

- N/A
2024-01-20 23:37:11 -05:00
Joseph T. Lyons
634f7f768c Merge branch 'main' into add-telemetry-tests 2024-01-20 23:28:01 -05:00
Joseph T. Lyons
c93d744be4 Add some initial testing to telemetry 2024-01-20 23:23:52 -05:00
Mikayla
476de329b3
Fix issues in element comment 2024-01-20 20:19:01 -08:00
Mikayla
2083fdcaf6
Fix compile issue 2024-01-20 20:15:43 -08:00
Mikayla
bf878b8257
Document the canvas and div 2024-01-20 20:15:23 -08:00
Mikayla
a44aae9e91
Finish documenting the action, asset, color, and element modules in GPUI
Remove SmallVec from the public API of GPUI
2024-01-20 20:15:23 -08:00
Conrad Irwin
3b84291343
Updates to chat after Hack#2 (#4175)
Release Notes:

- Channels: Improved font sizes in chat
- Channels: Added a link preview when hovering over links in chat
- Channels: Fixed rendering of newlines in chat messages
- Added a new setting "use_autoclose" (defaulting to true) that lets you
disable autoclose per language.
([#1420](https://github.com/zed-industries/community/issues/1420))
([#1903](https://github.com/zed-industries/community/issues/1903))
2024-01-20 20:03:37 -07:00
Mikayla
4184686e8d
Lock down test platform implementation 2024-01-20 15:03:36 -08:00
Mikayla
017661818d
Fix typo 2024-01-20 14:42:38 -08:00
Mikayla
9da6b8c7f6
Lock down mac os platform type visibility in the rest of GPUI
Add documentation to all platform types
2024-01-20 14:38:03 -08:00
Conrad Irwin
29ac1fd081 Merge remote-tracking branch 'origin/main' into chat-font-size 2024-01-20 14:51:53 -07:00
Conrad Irwin
6e1f44163e Render newlines as newlines in chat 2024-01-20 13:45:44 -07:00
Conrad Irwin
778856c101 Add a setting "use_autoclose" to control autoclose
Also disable autoclose for Chat
2024-01-20 13:33:03 -07:00
Conrad Irwin
42c81354fa Fix placeholder height 2024-01-20 11:12:51 -07:00
Thorsten Ball
a811b1503c Resize Nightly icons to same scale as Stable/Preview 2024-01-20 17:27:37 +01:00
Thorsten Ball
87be105af7 When searching in visual mode switch to normal mode
This matches Neovim behaviour by setting the mode to `Normal` when using
search while in visual mode.

Co-authored-by: Conrad <conrad@zed.dev>
2024-01-20 16:33:07 +01:00
Mikayla
33105486aa
Make platform input handler private
Automatically record the context on non-view input handlers
Simplify the async window context update() method
2024-01-20 06:56:19 -08:00
Max Brunsfeld
0858db9ebb
Autocomplete mentions (#4171)
Release Notes:

- Added autocomplete for @-mentions in the chat panel.
2024-01-19 17:03:56 -08:00
Max Brunsfeld
8fb0270b4a Make applying of additional completion edits go through the CompletionProvider 2024-01-19 16:56:28 -08:00
Max Brunsfeld
739d1179e3 Stop propagation when confirming a completion 2024-01-19 16:02:51 -08:00
Conrad Irwin
23d991962a Link previews in chat 2024-01-19 16:59:17 -07:00
Max Brunsfeld
4fb3e6d812 Ensure editors context menus get at least 3 lines of height 2024-01-19 15:47:42 -08:00
Marshall Bowers
24de848fdf
Prevent breadcrumbs from overflowing the toolbar (#4177)
This PR prevents the breadcrumbs from overflowing the toolbar when its
contents are long:

<img width="1270" alt="Screenshot 2024-01-19 at 6 15 58 PM"
src="https://github.com/zed-industries/zed/assets/1486634/ecee7a42-51ef-43d4-99a1-9c3da784dede">

Release Notes:

- Fixed an issue where long breadcrumbs would overflow the toolbar.
2024-01-19 18:23:14 -05:00
Mikayla
25f78a2ed1
Fix terminal selection firing when dragging anywhere 2024-01-19 15:02:27 -08:00
Mikayla
eaa0e93112
Fix hover popovers showing up over zoomed panels 2024-01-19 14:52:49 -08:00
Conrad Irwin
5dee8914ed Make chat font sizes consistently small 2024-01-19 15:27:05 -07:00
Marshall Bowers
7620feb8b2
Prevent many call participants from overflowing the title bar (#4173)
This PR fixes an issue where having a lot of participants in a call
could cause the avatars/facepiles to overflow the title bar, pushing the
call controls off-screen.

The participant list will now scroll when it would otherwise exceed the
available space:


https://github.com/zed-industries/zed/assets/1486634/806c77e6-bd4c-4864-8567-92e0960734ee

Release Notes:

- Fixed participant list overflowing the title bar.
2024-01-19 17:21:24 -05:00
Conrad Irwin
ac350e9d50
Fix positioning of windows on secondary displays (#4169)
CGDisplayBounds returns data in "global display coordinates" (which are
the same as Zed's coordinates), different from the NS APIs which use
"screen coordinates" (which have the Y axis inverted)

Also remove some transmutes while we're at it

Release Notes:

- Fixed position of notifications on secondary displays
2024-01-19 15:02:49 -07:00
Conrad Irwin
137e219830
Don't toggle WHOLE_WORD in vim search (#4165)
Fixes */# in visual mode, and avoids setting up irritating state.

[[PR Description]]

Release Notes:

- vim: Improved `*` and `#` to not toggle Zed's search state. Instead we
now use the regex to identify start and end of words (more like vim).
2024-01-19 15:02:38 -07:00
Conrad Irwin
af30a9b814 Show cursors sligthly longer 2024-01-19 14:38:17 -07:00
Max Brunsfeld
139986d080 Start work on autocomplete for chat mentions
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2024-01-19 13:12:57 -08:00
Conrad Irwin
cb84043400 Merge branch 'main' into fix-notification-positioning 2024-01-19 12:55:52 -07:00
Max Brunsfeld
1ceccdf03b Move the details of completion-resolution logic into Project
Co-authored-by: Conrad <conrad@zed.dev>
2024-01-19 11:52:28 -08:00
Conrad Irwin
00e46fdde0 Fix positioning of windows on secondary displays
CGDisplayBounds returns data in "global display coordinates" (which are
the same as Zed's coordinates), different from the NS APIs which use
"screen coordinates" (which have the Y axis inverted)

Also remove some transmutes while we're at it
2024-01-19 12:51:59 -07:00
Marshall Bowers
df2b0f6d2e
Add more terminal colors to the theme (#4168)
This PR adds more terminal colors that were present in the Zed1 themes
to the Zed2 theme.

Namely, we now have the `dim_` variants for the various ANSI colors and
various `foreground` colors.

Release Notes:

- Improved terminal colors.
2024-01-19 14:22:53 -05:00
Marshall Bowers
1cc7f66f86
Fix documentation labels obscuring other content in completion menu (#4167)
This PF fixes an issue where the documentation labels in the completion
menu could end up completing obscuring the primary content.

#### Before
<img width="691" alt="Screenshot 2024-01-19 at 1 42 19 PM"
src="https://github.com/zed-industries/zed/assets/1486634/187f2978-08be-4f5e-ba93-91ed09cd6e87">

#### After

<img width="704" alt="Screenshot 2024-01-19 at 1 39 45 PM"
src="https://github.com/zed-industries/zed/assets/1486634/e5929c04-bace-4336-b878-4ada5660d235">

Since this involved changes to the `ListItem`, I also made sure to test
the other problematic case that was fixed in #3845 to make sure we
didn't regress there:

<img width="665" alt="Screenshot 2024-01-19 at 1 39 11 PM"
src="https://github.com/zed-industries/zed/assets/1486634/14b72d44-b6a6-4aef-a708-37fb60b8875a">

I also tried to capture these cases in the `ListItem` stories to make it
easier to test all of them at once:

<img width="1141" alt="Screenshot 2024-01-19 at 1 40 03 PM"
src="https://github.com/zed-industries/zed/assets/1486634/333886ff-e394-4cba-89db-98352481c7f6">

Release Notes:

- Fixed an issue where documentation labels could obscure other content
in the editor completion menu
([#2419](https://github.com/zed-industries/community/issues/2419)).
2024-01-19 14:01:09 -05:00
Conrad Irwin
2166f071b3
Fix panic in window open (#4148)
Fix a panic caused by toggleFullScreen on one window untoggling
full-screen on
another.

I managed to reproduce this only once, which makes me sad, but this
change
should fix it regardless.

https://zed-industries.slack.com/archives/C04S6T1T7TQ/p1705631681238979

Release Notes:

- Fixed an occasional panic when opening a new fullscreen window.
2024-01-19 11:08:06 -07:00
Max Brunsfeld
9ec6855e6b
Start work on API docs for the language crate (#3981) 2024-01-19 10:04:45 -08:00
Conrad Irwin
0479ebc26d Don't toggle WHOLE_WORD in vim search
Fixes */# in visual mode, and avoids setting up irritating state.
2024-01-19 10:58:55 -07:00
Joseph T. Lyons
ce5adc7cde
Rename show cursors to display cursor names (#4162)
Release Notes:

- N/A
2024-01-19 12:23:27 -05:00
Marshall Bowers
0578c1bdae
Style notifications for notification panel (#4163)
This PR styles the notifications for the notification panel.

These are the notification toasts you receive when you have a new
notification (e.g., a mention in chat):

<img width="423" alt="Screenshot 2024-01-19 at 11 39 16 AM"
src="https://github.com/zed-industries/zed/assets/1486634/a1fc7a67-5aad-4cb2-8dc9-35d302984fcb">

Release Notes:

- Improved the look of toasts for incoming notifications.
2024-01-19 11:46:28 -05:00
Joseph T. Lyons
595428a8b1 Rename show cursors to display cursor names 2024-01-19 11:37:57 -05:00
Marshall Bowers
01f06f96a1
Update tenses of doc comment summary lines (#4161)
This PR updates the tenses used by the summary line of doc comments to
match the [Rust API documentation
conventions](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#summary-sentence).

Specifically:

> The summary line should be written in third person singular present
indicative form. Basically, this means write ‘Returns’ instead of
‘Return’.

I'm sure there are plenty occurrences that I missed.

Release Notes:

- N/A
2024-01-19 11:18:50 -05:00
Joseph T. Lyons
cb1b7915ee
Allow cursors to be shown via a command (#4153) 2024-01-19 11:09:49 -05:00
Marshall Bowers
14863e9a28
Fix assistant panel header when viewing conversation history (#4160)
This PR fixes the assistant panel header when in the conversation
history view to hide the irrelevant tools and/or the slots where they
would go.

Release Notes:

- Improved the assistant panel header when viewing conversation history.
2024-01-19 11:00:22 -05:00
Thorsten Ball
1a6cd73334 Cancel language server requests if request is dropped
Before this change, we would send requests to language servers without
canceling them even if we never wait for their response.

Example: when doing document highlights, we'd send a request (modulo
debouncing) whenever a change was made, ignoring previously sent
requests that might still be in-flight.

With this change, we now send a Cancel request (from the LSP spec) to
the language server in case no one listens to the response anymore
(which is what happens when the `Future` returned by `request_internal`)
is dropped.
2024-01-19 16:28:27 +01:00
Joseph T. Lyons
bcc13e151c Change struct field name 2024-01-19 07:52:28 -05:00
Antonio Scandurra
338dcd76b1
Center "Open Chat" button in chat panel (#4157)
The layout of the chat panel wasn't correct but this visual glitch was
being masked by caching, because it seems like Taffy was rendering
things slightly differently when laying out the chat panel as a detached
layout node. This wasn't an issue with caching, but rather an
inconsistency with how Taffy lays things out.

Release Notes:

- N/A
2024-01-19 12:43:27 +01:00
Antonio Scandurra
0b3923af52 Center "Open Chat" button in chat panel
The layout of the chat panel wasn't correct but this visual glitch
was being masked by caching, because it seems like Taffy was rendering
things slightly differently when laying out the chat panel as a detached
layout node. This wasn't an issue with caching, but rather an inconsistency
with how Taffy lays things out.

Co-Authored-By: Thorsten <thorsten@zed.dev>
Co-Authored-By: Piotr <piotr@zed.dev>
2024-01-19 12:20:18 +01:00
Antonio Scandurra
90c2da4dec
Reuse layout for view's element when it wasn't cached (#4156)
Refs https://github.com/zed-industries/zed/pull/4131
Refs https://github.com/zed-industries/community/issues/2415

Previously, when a view cache miss occurred during paint, we would
either use the element produced during layout or create a new, detached
node layout node. In both cases, we would issue a call to `draw`.

The problem with this approach, however, is that `draw` would always
paint the element at the given `bounds.origin`, which was required when
the layout node was detached but harmful when the element was already
embedded in the layout tree and already knew its bounds. In this second
case, in fact, it was as if we were positioning the element "twice",
which caused content to jump.

Release Notes:

- N/A
2024-01-19 10:44:06 +01:00
Antonio Scandurra
9446e573e9 Reuse layout for view's element when it wasn't cached 2024-01-19 10:26:39 +01:00
Kirill Bulatov
070de14a6b Show channel rename keybinding in the context menu 2024-01-19 11:23:05 +02:00
Kirill Bulatov
a4a0a02dc3
Avoid gutter resizes on line number increase/decrease (#4135) 2024-01-19 10:25:55 +02:00
Joseph T. Lyons
0062cc000b Allow cursors to be shown via a command 2024-01-19 02:58:30 -05:00
Marshall Bowers
4ce0c27e0a
Remove more commented-out code (#4150)
This PR removes some more commented-out code from various spots in the
codebase.

Release Notes:

- N/A
2024-01-18 23:17:41 -05:00
Marshall Bowers
ebce6226bb
Remove commented-out code in auto_update (#4149)
This PR removes some commented-out code in the `auto_update` crate that
we no longer need.

Release Notes:

- N/A
2024-01-18 23:12:42 -05:00
Conrad Irwin
fd726ad6ee collab 0.38.0 2024-01-18 21:03:55 -07:00
Conrad Irwin
d76bd100f5
Show cursors for remote participants (#4082)
This PR enables cursors for remote participants.

They are shown for 2 seconds when you focus a buffer, and then on hover.

Release Notes:

- Added usernames next to remote cursors
2024-01-18 20:58:09 -07:00
Conrad Irwin
87d60beda7 Fix a double borrow error in window.open
It seems that sometimes calling toggleFullScreen will cause the
display_layer callback of a different window to fire.
2024-01-18 20:55:50 -07:00
Marshall Bowers
03826be196
Fix docs references in ui (#4147)
This PR fixes some more references in the docs in the `ui` crate.

Release Notes:

- N/A
2024-01-18 22:52:30 -05:00
Marshall Bowers
decf320a74
Rename overflow_hidden_{x,y} to overflow_{x,y}_hidden (#4146)
This PR renames the `overflow_hidden_x` and `overflow_hidden_y` methods
to `overflow_x_hidden` and `overflow_y_hidden`, respectively.

This provides consistency with our `overflow_x_scroll` /
`overflow_y_scroll` methods, as well as better matches Tailwind's
naming.

Release Notes:

- N/A
2024-01-18 22:10:41 -05:00
Marshall Bowers
9993418f58
Prevent diagnostics from overflowing the status bar (#4145)
This PR makes it so long diagnostic messages no longer overflow the
status bar and push the right tools off-screen.

Here is an example with a long (placeholder) diagnostic message:

<img width="1136" alt="Screenshot 2024-01-18 at 9 47 07 PM"
src="https://github.com/zed-industries/zed/assets/1486634/18568527-c608-4d4a-9118-b84c6d81c13e">

Release Notes:

- Fixed long diagnostic messages overflowing the status bar.
2024-01-18 21:56:37 -05:00
Conrad Irwin
f8081edd56
Revert "Improve panic logging" (#4144)
This reverts commit 345b983c8e.

This seems to have caused only the first line of panics to be reported
in production builds.

Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2024-01-18 19:56:00 -07:00
Conrad Irwin
fbc693d1d7 Revert "Improve panic logging"
This reverts commit 345b983c8e.
2024-01-18 19:39:13 -07:00
Marshall Bowers
e278410fbc
Make FacePile a component again (#4143)
This PR turns `FacePile` back into a component.

Our usage of it seemed a little weird, with us calling `render`
manually.

We're now implementing `Styled` on `FacePile` through its inner `Div` so
that we can apply the `p_1` at the call site.

Release Notes:

- N/A
2024-01-18 20:49:51 -05:00
Mikayla Maki
bac2e59eac
Fix popin for project panel by pre-resolving keybindings in the project panel (#4141)
Also, factors out the fluent building APIs from IntoElement into their
own traits.

Also makes the project panel context menu initialization fluent:

<img width="1328" alt="Screenshot 2024-01-18 at 3 33 45 PM"
src="https://github.com/zed-industries/zed/assets/2280405/3468b6f2-07f0-48cf-bec1-ac0379333209">

Release Notes:

- Fixed pop in when right clicking on the project panel.
2024-01-18 16:16:50 -08:00
Mikayla Maki
20b58fea35
Merge branch 'main' into fix-popin-for-project-panel 2024-01-18 15:55:35 -08:00
Conrad Irwin
276032398b Fix overflow in hover handler 2024-01-18 16:53:05 -07:00
Marshall Bowers
3542b99c9d
Tweak the description of the gpui crate (#4142)
This PR tweaks the description of the `gpui` crate, since it's now the
only version.

There can only be one!

Release Notes:

- N/A
2024-01-18 18:52:16 -05:00
Max Brunsfeld
f11d676641 Remove missing docs warning for now 2024-01-18 15:51:25 -08:00
Mikayla
0e8bdda249
????? 2024-01-18 15:47:10 -08:00
Max Brunsfeld
058f39c180 Document DiagnosticSet, SyntaxMap 2024-01-18 15:44:24 -08:00
Mikayla
903176d8ff
Pull out fluent builder helpers into re-usable trait 2024-01-18 15:31:31 -08:00
Marshall Bowers
0691ad480b
Make clicking ListHeader labels toggle the disclosure (#4140)
This PR makes clicking the label inside of a `ListHeader` with a
disclosure also toggle the disclosure.

Release Notes:

- Added support for clicking the "Online", "Offline", and "Requests"
headers in the contact list to toggle their expansion.
2024-01-18 18:21:53 -05:00
Mikayla
a5084510a1
Fix popin for project panel by pre-resolving keybindings in terms of the project panel 2024-01-18 15:16:09 -08:00
Max Brunsfeld
b65cf6d2d9 Merge branch 'main' into language-api-docs 2024-01-18 15:06:45 -08:00
Conrad Irwin
e513020fbb Fine tune 2024-01-18 15:59:13 -07:00
Max Brunsfeld
7860372beb
gpui: Always recompute layout on cache miss. (#4131)
I'm not yet sure whether this is 100% correct, but it seems to alleviate
the following issue:
`When opening a dock, the panel doesn't appear right away. An empty dock
is briefly visible.`
Release Notes:

- Fixed panel layout being incorrect for a brief time after opening
(fixes https://github.com/zed-industries/community/issues/2415)
2024-01-18 14:44:35 -08:00
Max Brunsfeld
b0db38419c
Restore the colored background for collaborators that you are following (#4137) 2024-01-18 14:32:54 -08:00
Conrad Irwin
827a8dade5
Send crash reports to Slack automatically (#4111)
This uploads apples crash reports to our servers when telemetry is
enabled.

Rather than jumping via the website, it uploads to collab directly. (I'd
like
to update the panic handler to do this too to make it possible to work
on that end-to-end without zed.dev running).

Release Notes:

- Added reporting of crashes when telemetry is enabled
2024-01-18 15:30:39 -07:00
Max Brunsfeld
4b92a15ab3 Restore the colored background for collaborators that you're following 2024-01-18 13:47:43 -08:00
Marshall Bowers
547aab2fea
Style the reset key state for the assistant panel (#4136)
This PR styles the reset key state for the assistant panel.

Community issue: https://github.com/zed-industries/community/issues/2429

<img width="641" alt="Screenshot 2024-01-18 at 4 28 32 PM"
src="https://github.com/zed-industries/zed/assets/1486634/57377804-2867-45d3-906c-353130ec78e6">

Release Notes:

- Fixed the reset key screen for the assistant panel.
2024-01-18 16:38:14 -05:00
Kirill Bulatov
bf8e57098d Avoid gutter resizes on line number increase/decrease
Reserves 4 characters for the line number in the gutter to avoid editor bounds jumping when editing small files like commit messages.
2024-01-18 23:11:05 +02:00
Conrad Irwin
bfee008bb2 Merge branch 'main' into cursors 2024-01-18 14:03:27 -07:00
Conrad Irwin
578bcecdb6
Fix some cases of broken repeat in vim (#4132)
Release Notes:

- Fixed a case where `.` in vim might not repeat the last action
2024-01-18 13:39:41 -07:00
Conrad Irwin
6c2da0d25b Revert "Store a z-index id per-layer (#4128)"
This reverts commit 28a2337218, reversing
changes made to e992f84735.
2024-01-18 13:28:23 -07:00
Conrad Irwin
4e118f3dd7 Fix some cases of broken repeat in vim 2024-01-18 13:20:08 -07:00
Max Brunsfeld
77fc332d6f Make zed-local support opening 5 or 6 zed instances 2024-01-18 12:18:12 -08:00
Conrad Irwin
81baefb460
Fix right click handler for tabs (#4130)
Also, some fun test helpers

Co-Authored-By: Mikayla <mikayla@zed.dev>

You can now use .debug_selector() to make it possible for tests to find
a given element,
and .debug_bounds() to find the coordinates of where it was painted.


Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2024-01-18 13:07:25 -07:00
Piotr Osiewicz
4408d45f7a gpui: Always recompute layout on cache miss. 2024-01-18 20:55:41 +01:00
Conrad Irwin
920eced1d5 Fix right click handler for tabs
Also, some fun test helpers

Co-Authored-By: Mikayla <mikayla@zed.dev>
2024-01-18 12:10:38 -07:00
Antonio Scandurra
194e0f3231
Always synchronize terminal before rendering it (#4114)
Previously, we were trying not to synchronize the terminal too often
because there could be multiple layout/paint calls prior to rendering a
frame.

Now that we perform a single render pass per frame, we can just
synchronize the terminal state. Not doing so could make it seem like
we're dropping frames.

Release Notes:

- Improved terminal rendering performance.
2024-01-18 19:54:13 +01:00
Julia
28a2337218
Store a z-index id per-layer (#4128)
Release Notes:

- N/A
2024-01-18 13:31:45 -05:00
Max Brunsfeld
e992f84735 collab 0.37.0 2024-01-18 10:29:05 -08:00
Max Brunsfeld
f2f3a935b9
Store the impersonator id on access tokens created via ZED_IMPERSONATE (#4108)
* Use the impersonator id to prevent these tokens from counting against
the impersonated user when limiting the users' total of access tokens.
* When connecting using an access token with an impersonator add the
impersonator as a field to the tracing span that wraps the task for that
connection.
* Disallow impersonating users via the admin API token in production,
because when using the admin API token, we aren't able to identify the
impersonator.
2024-01-18 10:26:34 -08:00
Max Brunsfeld
bfe76316f7
Invoke pane's focus_in handler when pane is focused directly (#4129)
Fixes a bug where, when focusing a pane directly, it failed to transfer
focus to the active item.
2024-01-18 10:26:03 -08:00
Julia
bc2302f723 Store a z-index id per-layer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2024-01-18 13:24:25 -05:00
Max Brunsfeld
2e35d900e0 Invoke pane's focus_in handler when pane is focused directly 2024-01-18 10:13:03 -08:00
Conrad Irwin
2835c9a972 Don't send follower events from other panes
Co-Authored-By: Mikayla <mikayla@zed.dev>
2024-01-18 10:42:49 -07:00
Marshall Bowers
7b9e7fea4e
Use regular info color for speaker borders (#4126)
This PR updates the speaker borders to use the regular `info` status
color instead of the `info_border` color.

This should provide more contrast and make it clearer as to who is
speaking.

Release Notes:

- Made the active speakers' borders more visible when in a call.
2024-01-18 11:12:45 -05:00
Conrad Irwin
f1df6318ba Remove unused variable 2024-01-18 09:06:13 -07:00
Kirill Bulatov
49f8c1d67e
Wrap over picker's matches when reaching the start/end of the list (#4123) 2024-01-18 17:52:55 +02:00