Commit Graph

13366 Commits

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