Commit Graph
17246 Commits
Author SHA1 Message Date
JuliaandAntonio Scandurra 8e8a62e6bc 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
Julia 3f49c0bd32 Ignore stacking order entry ids in was_top_layer 2024-01-22 10:16:59 -05:00
JuliaandNathan Sobo 7772e3f8a7 Store a z-index id per-layer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2024-01-22 10:16:59 -05:00
Kirill Bulatov b5d05c786e 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 3d872db65d Fix lightning bolt hover and git gutter mark overlapping 2024-01-22 16:01:32 +02:00
Piotr Osiewicz 1f65c520b6 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 0771cdf812 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 45eacd8c06 Show diagnostics on hover 2024-01-22 12:01:53 +01:00
Antonio Scandurra 5ab2a86f73 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 142075e967 Introduce a ZED_MEASUREMENTS env var and use it to measure frame time 2024-01-22 11:39:20 +01:00
Antonio Scandurra 37fb1ef018 Introduce script/histogram to produce before/after comparisons 2024-01-22 11:22:22 +01:00
Thorsten Ball dade4e8a82 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
Mikayla Maki 4d0a187fd8 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 d4d96348c6 Moved Frame struct into element context, to be close to it's associated methods 2024-01-21 20:52:24 -08:00
Mikayla ecf0d04804 Port the rest of the app 2024-01-21 20:26:33 -08:00
Mikayla b18e2a8e55 Refactor out element context from GPUI 2024-01-21 19:43:35 -08:00
Mikayla cbb1d055fb Do an initial pass on refactoring out ElementContext from WindowContext 2024-01-21 18:40:20 -08:00
Mikayla Maki b60c8a4cee 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 91ecd8a9ad Restore erronously removed APIs 2024-01-21 14:33:34 -08:00
Mikayla 5383377472 Fix typos, mark docs related todos in GPUI 2024-01-21 14:28:40 -08:00
Mikayla 25f5c4aa1a Document / lockdown more of GPUI 2024-01-21 14:26:45 -08:00
Joseph T. Lyons 0e1e4bbba0 Dont group chat messages after certain period of time (#4186)
<img width="447" alt="SCR-20240121-ofhg"
src="https://github.com/zed-industries/zed/assets/19867440/7fe13a74-45c7-43ec-a5e8-5127bc285b32">

In this screenshot, the first two messages were sent back-to-back, but
the third message was sent nearly two hours later. Coalescing the
messages doesn't feel right after a certain period of time, as it gives
misleading timestamps on messages. Discord has this feature, but I'm not
sure what the value they use is. I've set the threshold to 5 minutes for
now.

<img width="480" alt="SCR-20240121-oghs"
src="https://github.com/zed-industries/zed/assets/19867440/ee1cfe36-7c13-4072-9f66-93e2de6542f1">

Release Notes:

- Improved the grouping of chat messages from same user. Grouping now
only occurs if the user sends multiple messages, in succession, within a
specified duration of time.
2024-01-21 16:14:59 -05:00
Joseph T. Lyons b5de3730ad Dont group messages after certain period of time 2024-01-21 16:08:41 -05:00
Joseph T. Lyons b1c686fbbf Fix chat timestamps (#4185)
A user was not seeing the "yesterday" text in their chat timestamps for
messages right before the midnight boundary

Release Notes:

- Fixed bugs in formatting of chat timestamps
2024-01-21 15:21:18 -05:00
Joseph T. Lyons b0892cf7f7 Fix chat timestamps 2024-01-21 15:15:17 -05:00
Piotr Osiewicz a8f1c15a1e chore: Fix clippy::needless_borrow up to an editor 2024-01-21 15:03:24 +01:00
Piotr Osiewicz 160adfe8f9 chore: use WindowContext in Workspace where it is a sufficient context type 2024-01-21 14:28:19 +01:00
Thorsten Ball 2edbfac197 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 0b6c6919f4 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 f6ddf469eb Merge branch 'main' into add-telemetry-tests 2024-01-20 23:28:01 -05:00
Mikayla Maki ec074d4de8 Document the action, asset, color, element, canvas, and div modules (#4181)
That took a while.

I also removed an instance of SmallVec leaking into the public GPUI
APIs.

Release Notes:

- N/A
2024-01-20 20:26:11 -08:00
Joseph T. Lyons 60065c80db Add some initial testing to telemetry 2024-01-20 23:23:52 -05:00
Mikayla ce91c04d2f Fix issues in element comment 2024-01-20 20:19:01 -08:00
Mikayla 881ea4c41b Fix compile issue 2024-01-20 20:15:43 -08:00
Mikayla 6ac33dad51 Document the canvas and div 2024-01-20 20:15:23 -08:00
Mikayla e3ad0f794c 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 023ee8f83d 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 Maki 6ddcbe6ab2 Document the gpui platform code (#4180)
In the process I also:
- Made the AsyncWindowContext slightly more ergonomic.
- Refactored the input handler traits to enable easy, non-view input
handlers
- Locked down the visibility on all mac-specific GPUI code
- Documented all remaining, public types

Release Notes:

- N/A
2024-01-20 15:11:03 -08:00
Mikayla 860e6cc756 Lock down test platform implementation 2024-01-20 15:03:36 -08:00
Mikayla 67d68085a8 Fix typo 2024-01-20 14:42:38 -08:00
Mikayla 0eaa421c75 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 d7a7a545d9 Merge remote-tracking branch 'origin/main' into chat-font-size 2024-01-20 14:51:53 -07:00
Conrad Irwin 326bc92666 Render newlines as newlines in chat 2024-01-20 13:45:44 -07:00
Conrad Irwin 9d5e3fe30f Add a setting "use_autoclose" to control autoclose
Also disable autoclose for Chat
2024-01-20 13:33:03 -07:00
Conrad Irwin 7cdfd70b03 shift-enter for newline in chat 2024-01-20 13:31:19 -07:00
Conrad Irwin 37861ed228 Fix placeholder height 2024-01-20 11:12:51 -07:00
Thorsten Ball da1dfa8de9 Resize Nightly icons to same scale as Stable/Preview 2024-01-20 17:27:37 +01:00
Thorsten BallandConrad 2832b149be 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 ac8bcd985f 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 dfa271e391 Autocomplete mentions (#4171)
Release Notes:

- Added autocomplete for @-mentions in the chat panel.
2024-01-19 17:03:56 -08:00