Commit Graph

13492 Commits

Author SHA1 Message Date
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