Commit Graph

17434 Commits

Author SHA1 Message Date
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
2bfbd72483
Remove unused import? (#4201)
Release builds are currently failing:
https://github.com/zed-industries/zed/actions/runs/7616903969/job/20744857084

It is unclear to me why debug builds are not.

Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2024-01-22 13:48:36 -07: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
Julia
9d221a139d
Z index with flicker fix (#4170)
Part of `was_top_layer` was checking if a opaque level starts with the
current stacking order, but now that each entry in the order has an id,
those comparison checks were failing as every entry generated is now
unique

I'll admit I'm still a little fuzzy on the specific reasons for this
function to be defined as it is so I'd appreciate another set of eyes

Release Notes:

- N/A
2024-01-22 13:11:12 -05: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
942edbfcbb Run tests even if lint/fmt/spell/squawk fails 2024-01-22 10:00:32 -07: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
5b906e731d
Fix lightning bolt hover and git gutter mark overlapping (#4195)
Bumps `gutter_padding_factor` from 3.5 to 4.0 due git mark on the gutter
becoming much thicker than in Zed1:
 
Current:

![current_zed_2](https://github.com/zed-industries/zed/assets/2690773/f7f0f76b-63a2-4790-a4f4-ca791b617a64)

Fixed:

![new_zed2](https://github.com/zed-industries/zed/assets/2690773/0075567d-e661-4140-8ffa-ec17d72f8e54)

Stable (no hover background appearing):

![zed_1](https://github.com/zed-industries/zed/assets/2690773/c3366845-b763-46f7-a2c7-48dd72dc4f10)

Release Notes:

- Fixed gutter marks overlapping with hover highlights
2024-01-22 16:12:34 +02: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
426ef75f4e
Show diagnostics on hover (#4192)
Fixes https://github.com/zed-industries/community/issues/2426

Release Notes:

- Fixed a bug that was preventing diagnostics from being shown on hover.
2024-01-22 12:09:46 +01:00
Antonio Scandurra
f76a2502bb Show diagnostics on hover 2024-01-22 12:01:53 +01:00
Antonio Scandurra
4312c7d1e6
Introduce ZED_MEASUREMENTS=1 and script/histogram (#4191)
With this pull request, we're introducing a `ZED_MEASUREMENTS` variable
which is used by the `measure` function to print to stderr how long it
took to execute a given closure. This is used right now to measure frame
time when a new frame is requested. This data can be plotted as a
histogram via `script/histogram`.

Here's a workflow I typically use:

- Run `export ZED_MEASUREMENTS=1`
- Checkout a commit that you want to measure the performance of
- Run zed in release mode and use it for 5-10 seconds
- Copy the printed measurements into a file, say `version-a`
- Checkout another commit that you want to measure the performance of
- Run zed in release mode and use it for 5-10 seconds
- Copy the printed measurements into a file, say `version-b`
- Run `script/histogram version-a version-b` (note that you can supply
however many files you want)

Release Notes:

- N/A
2024-01-22 11:54:48 +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
Antonio Scandurra
10ca33ce02 Introduce script/histogram to produce before/after comparisons 2024-01-22 11:22:22 +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 Maki
9bcf27b05b
WIP: Refactor out ElementContext from WindowContext (#4166)
During the doc parties, I've sometimes struggled with how and where to
describe the high level intention behind various APIs that are available
in GPUI. Fortunately, rust doc has a tool for this: Module level
documentation. However, writing this kind of documentation for the
`WindowContext` is difficult, as it bundles up the nice, high level GPUI
APIs for entity management and view rendering, with all of the low level
imperative APIs that `Element`s use to draw to the screen. Splitting
these apart into an `ElementContext`, which contains a `WindowContext`,
gives us a way to corral the element systems into their own API and
module, allowing us to document the Element system on it's own terms,
and enforce the correct usage of our APIs, and helps people who are
exploring our APIs through autocomplete to not be overloaded with
non-applicable methods.

Release Notes:

- N/A
2024-01-21 20:59:59 -08: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