Commit Graph

13627 Commits

Author SHA1 Message Date
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
Piotr Osiewicz
9506fa461f Start documenting display_map module 2024-01-18 16:38:06 +01:00
Thorsten Ball
b30efc9e81 Fix missing icons: set svg_renderer when assets are updated
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-18 16:26:54 +01:00
Kirill Bulatov
36ed5a31df Wrap over picker's matches when reaching the end of the list 2024-01-18 16:54:35 +02:00
Thorsten Ball
87046eff3c
Fix focus and re-focus of project-wide search (#4121)
This fixes the issue of `Cmd-shift-f` not refocusing the search bar when
a project-wide search already exists.

It also fixes the handlers for "search in new" and "new search".


Release Notes:

- N/A
2024-01-18 15:26:29 +01:00
Thorsten Ball
130ea79c95 Fix focus and re-focus of project-wide search
This fixes the issue of `Cmd-shift-f` not refocusing the search bar when
a project-wide search already exists.

It also fixes the handlers for "search in new" and "new search".

Co-authored-by: Kirill <kirill@zed.dev>
2024-01-18 15:05:45 +01:00
Nathan Sobo
9e37232a13 Merge remote-tracking branch 'origin/main' into ownership-post 2024-01-18 07:01:54 -07:00
Nathan Sobo
f9165938b0 More adjustments for blog post 2024-01-18 07:01:46 -07:00
Piotr Osiewicz
b6d8665fc1 pane: stop propagation of drag/click events in resizing handle
This prevents focused editor from being scrolled while a pane is getting resized.

Fixes: Mouse down to start an editor resize causes a scroll
2024-01-18 14:24:03 +01:00
Joseph T. Lyons
7c5fdb3a44 Clean up view_release_notes() 2024-01-18 08:07:52 -05:00
Piotr Osiewicz
0a0921f88b gpui: Bring back family and style names in font name suggestions 2024-01-18 12:10:17 +01:00
Antonio Scandurra
5d6af532d9
Remove unused PlatformAtlas::clear method (#4116)
Release Notes:

- N/A
2024-01-18 11:09:12 +01:00
Thorsten Ball
233ae81e3a
Refactor LanguageSever::fake into FakeLanguageServer::new (#4117)
This is just moving code around and doesn't change behaviour, but it's
something Julia and I bumped into yesterday while writing docs.

Release Notes:

- N/A
2024-01-18 11:06:52 +01:00
Thorsten Ball
5e6d1a47b2 Refactor LanguageSever::fake into FakeLanguageServer::new
This is just moving code around and doesn't change behaviour, but it's
something Julia and I bumped into yesterday while writing docs.
2024-01-18 10:59:32 +01:00
Antonio Scandurra
559461923f Remove unused PlatformAtlas::clear method 2024-01-18 10:40:15 +01:00
Kirill Bulatov
b6786d5e41 Use a proper action when clicking navigate forward button 2024-01-18 11:37:02 +02:00
Antonio Scandurra
ed28170d42 Always synchronize terminal before rendering it
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.
2024-01-18 10:04:38 +01:00
Kirill Bulatov
aacb17ef38 Fix buffer search focus not working
When the Deploy action is called in the buffer with the buffer search bar already deployed, the focus should be on the search bar.
2024-01-18 10:51:28 +02:00
Joseph T. Lyons
b807e6fe80 Use try_global() 2024-01-18 01:33:30 -05:00
Conrad Irwin
4d9ff5c4ff Simplify service discovery in development 2024-01-17 23:06:03 -07:00
Conrad Irwin
ef6f39d090 Upload panics via zed.dev instead 2024-01-17 22:55:15 -07:00
Nathan Sobo
bef1b83265 Add ownership post example 2024-01-17 21:19:28 -07:00
Nathan Sobo
1d3ca8eb5d Adjust APIs for simpler examples in blog post 2024-01-17 21:19:28 -07:00
Conrad Irwin
345b983c8e Improve panic logging
Send along every symbol for inlined frames, and also include the address
(and if we have it filename + lineno)
2024-01-17 20:46:20 -07:00
Conrad Irwin
680929081d Send crash reports to Slack automatically 2024-01-17 19:51:33 -07:00
Max Brunsfeld
93d068a746 Update verify_access_token doc comment 2024-01-17 18:06:16 -08:00
Max Brunsfeld
9f04fd9019 For impersonating access tokens, store impersonatee in the new column
This way, we don't need an index on both columns
2024-01-17 18:06:16 -08:00
Max Brunsfeld
ab1bea515c Store the impersonator id on access tokens created via ZED_IMPERSONATE
* 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.

Co-authored-by: Marshall <marshall@zed.dev>
2024-01-17 18:06:16 -08:00
Mikayla Maki
933fb87013
Fix editor selection issue (#4110)
Release Notes:

- Fixes a bug where, editor selections would update in the wrong pane
when split.
2024-01-17 17:16:56 -08:00
Mikayla Maki
aa7351041d
Add typo detection to CI (#4107)
Adding the typos crate to our CI will take some doing, as we have
several tests which rely on typos in various ways (e.g. checking state
as the user types), but I thought I'd take a first stab at fixing what
it finds.

Release Notes:

- N/A
2024-01-17 17:13:47 -08:00
Mikayla
6ea23d0704
Fix canary 2024-01-17 17:03:17 -08:00
Mikayla
edb204511c
Fix selection bug in editor causing selections to be un-ended 2024-01-17 16:30:01 -08:00
Marshall Bowers
9521f49160
Clean up references in doc comments in lsp crate (#4109)
This PR cleans up a handful of references in doc comments in the `lsp`
crate so that `rustdoc` will link and display them correctly.

Release Notes:

- N/A
2024-01-17 19:06:19 -05:00
Piotr Osiewicz
ec2b299ecb
settings: Suggest fonts bundled in Zed (#4102)
Fixes an issue where Zed Sans is not being suggested as a font.

Release Notes:
- N/A
2024-01-18 00:54:07 +01:00
Mikayla
078fd35f4f
WIP 2024-01-17 15:52:54 -08:00
Piotr Osiewicz
6cbc49e5f0
Editor docs (#4097)
Release Notes:

- N/A

---------

Co-authored-by: Kirill <kirill@zed.dev>
2024-01-18 00:48:37 +01:00
Mikayla
e3e3ef528e
Add typos ci 2024-01-17 15:33:14 -08:00
Mikayla
e42a9ac2f1
Add typos configuration for zed and add a few more typo fixes 2024-01-17 15:22:37 -08:00
Max Brunsfeld
647b08b101
Update local development workflow to not involve zed.dev (#4103)
When testing Zed locally, it's rarely necessary to log in the real with,
via Zed.dev and GitHub. We usually use `zed-local`. Since zed.dev is not
going to be open source (at least right away), this PR removes it from
our local development workflow.

* Remove zed.dev from the Procfile
* Change the `seed` script to not create an admin user for your
signed-in github user
* Instead have both `zed-local` and the `seed` script read from an
`.admins.json` file, which the user can create in order to customize who
they sign in as when running `zed-local`.
* Update all of the docs for building and developing zed.
2024-01-17 15:07:20 -08:00
Mikayla
e6ca92ffa4
Fix a few more typos 2024-01-17 14:58:58 -08:00
Mikayla
285f4d1be9
Fix busted test 2024-01-17 14:57:13 -08:00
Mikayla
9a7d2e3fe4
fmt 2024-01-17 14:44:10 -08:00
Mikayla Maki
0711476fd5
Merge branch 'main' into fix-typos 2024-01-17 14:36:03 -08:00
Mikayla Maki
75f8748509
Document party 2 (#4106)
@mikayla-maki and @nathansobo's contributions

Release Notes:

- N/A
2024-01-17 14:33:52 -08:00
Mikayla
57400e9687
Fix typos detected by crate-ci/typos 2024-01-17 14:31:21 -08:00
Mikayla Maki
6f40da77b6
Fix scrolling in collab panel (#4105)
When the `List` element's state is `ListState::reset()`, it eagerly
trashes it's cached element heights in anticipation of a prompt render.
But, due to the recent `display_layer` changes, that re-render is not
always forthcoming. This is a problem for `ListState::scroll()`, which
depends on these cached elements to correctly calculate the new logical
scroll offset.

Solutions we attempted:

- Cache the element heights and continue the scroll calculation 
- This was conceptually incorrect, reset should only be called when the
underlying data has been changed, making any calculation with the old
results meaningless.
- Lazily re-compute the element heights in scroll 
- Beyond being a non-trivial refactor, this would probably also cause us
to double-render the list in a single frame, which is bad.
- Cache the scroll offset and only calculate it in paint 
- This solution felt awkward to implement and meant we can't supply
synchronous list scroll events.
- Delay resetting until paint 
- This means that all of the other APIs that `ListState` supplies would
give temporarily incorrect results, worsening the problem

Given these issues, we settled on the solution with the least
compromises: drop scroll events if the state has been `reset()` between
`paint()` and `scroll()`. This shifts the responsibility for the problem
out of the List element and into consumers of `List`, if you want
perfectly smooth scrolling then you need to use `reset()` judiciously
and prefer `splice()`.

That said, I tested this by aggressively scrolling the Collab panel, and
it seems to work as well as it did before.

This PR also includes some initial testing infrastructure for working
with input from the platform and rendered elements.

Release Notes:

- N/A
2024-01-17 14:11:34 -08:00
Mikayla
9eecda2dae
Update method name and partially document platform crate
co-authored-by: Nathan <nathan@zed.dev>
2024-01-17 14:07:57 -08:00
Mikayla
7a299e966a
Document view crate
co-authored-by: Nathan <nathan@zed.dev>
2024-01-17 14:07:55 -08:00
Mikayla
d67e461325
document app module in gpui 🎉
co-authored-by: Nathan <nathan@zed.dev>
2024-01-17 14:07:41 -08:00
Marshall Bowers
8f3d79c3b8
Fix file paths in stories (#4104)
This PR fixes some file paths used in our stories that were still
referencing the `ui2` crate.

Release Notes:

- N/A
2024-01-17 16:59:57 -05:00
Mikayla
6db18e8972
Drop scroll events if there's been a reset
co-authored-by: Nathan <nathan@zed.dev>
co-authored-by: Conrad <conrad@zed.dev>
2024-01-17 13:57:16 -08:00
Max Brunsfeld
9367f719f2 Rework db-seeding, so that it doesn't depend on a github auth token
Instead, admins are specified using a JSON file, 'admins.json'. This file is
gitignored. If it is not present, there is a default list of admins in
'admins.default.json'.
2024-01-17 13:28:58 -08:00
Marshall Bowers
b2afa73321
Decrease the size of timestamps in the assistant conversation editor (#4101)
This PR decreases the size of the timestamps in the assistant's
conversation editor.

Ideally we'd want to align the baseline of the timestamp text with the
text in the sender button. I spent a while trying to do this, but it
seems like it may be pretty tricky.

Release Notes:

- Decreased the size of timestamps in the assistant panel conversation
editor.
2024-01-17 15:45:17 -05:00
Kirill Bulatov
1e6757755e Ignore buffer search events if it's not for the current buffer 2024-01-17 22:18:54 +02:00
Kirill Bulatov
65be909378 Implement similar workspace registration flow for project search actions 2024-01-17 22:08:40 +02:00
Kirill Bulatov
0be2f7f328 Properly register buffer_search'es actions handlers
Now those handlers do not intercept events/actions when the buffer search bar is dismissed.

co-authored-by: Piotr <piotr@zed.dev>
2024-01-17 22:08:40 +02:00
Kirill Bulatov
306e4693fa Start adding project search listeners to workspace
co-authored-by: Piotr <piotr@zed.dev>

To be able to trigger them from search multibuffer excerpts.
2024-01-17 22:08:40 +02:00
Max Brunsfeld
c6c56c35df
Downgrade LiveKit client (#4096)
There's a deadlock that we're seeing when joining a room, which we think
is a bug in the LiveKit client.

Also, we're still getting crashes when leaving calls:
https://github.com/livekit/client-sdk-swift/issues/299.

At this point, we believe both problems are due to recent changes to the
LiveKit swift sdk.
2024-01-17 11:17:22 -08:00
Conrad Irwin
15a21f5517
Also update chat location when opening a new workspace (#4099)
This happens a lot in guest workflows where they open the call with a
link and are jumped straight to a shared workspace.

Release Notes:

- Fixed opening the chat automatically in new windows
2024-01-17 12:02:16 -07:00
Julia
e1194e0cac
Document LSP crate (#4098)
Release Notes:

- N/A
2024-01-17 14:01:41 -05:00
Conrad Irwin
552d2c26f5 Also update chat location when opening a new workspace
This happens a lot in guest workflows where they open the call with a
link and are jumped straight to a shared workspace.
2024-01-17 11:41:42 -07:00
Julia
d7503a7d47 Document LSP crate
Co-Authored-By: Thorsten Ball <thorsten@zed.dev>
2024-01-17 13:39:37 -05:00
Marshall Bowers
cf5dc099fb
Add more documentation to collab (#4095)
This PR adds more documentation to the `collab` crate.

Release Notes:

- N/A

---------

Co-authored-by: Conrad <conrad@zed.dev>
2024-01-17 13:38:12 -05:00
Max Brunsfeld
6734e528a8 Revert "Bump livekit client"
This reverts commit 5730d0ef21.
2024-01-17 10:33:32 -08:00
Marshall Bowers
4e4a1e0dd1
Document the public interface of the vim crate (#4093)
This PR documents the public interface of the `vim` crate.

Release Notes:

- N/A

---------

Co-authored-by: Conrad <conrad@zed.dev>
2024-01-17 13:32:38 -05:00
Max Brunsfeld
6457ccf9ec Add docs for buffer.rs
Co-authored-by: Antonio <antonio@zed.dev>
2024-01-17 10:08:42 -08:00
Conrad Irwin
ef0432da0d Hide cursors by default, but show some 2024-01-17 10:14:20 -07:00
Marshall Bowers
df67917768
Make channel buttons square (#4092)
This PR makes the channel buttons square.

Release Notes:

- Adjusted the shape of the channel buttons.
2024-01-17 11:47:43 -05:00
Nate Butler
19c488b378
Add the color crate (#4063)
This PR adds the `color` crate, which will be the home of a number of
color-related utilities, and also acts as an interface between
[`palette`](https://crates.io/crates/palette) and the way `gpui` colors
work.

The goal of this crate is to centralize color utilities like mixing and
blending, building color ramps and sets of colors for state and more.

## Todo:

- [x] hex -> Color
- [x] Color mixing
- [x] Color blending using blend modes (overlay, multiply, etc)
- [ ] ~~Build color ramp from color~~
- [x] Build state set from color
- [ ] ~~Update Theme to use the color crate~~

Release Notes:

- None (Internal changes: Adds the `color` crate for working with
colors.)
2024-01-17 11:47:23 -05:00
Nate Butler
4cdcac1b16 Update docs 2024-01-17 11:39:09 -05:00
Marshall Bowers
9c557aae9e
Fix regression of welcome screen background color (#4091)
In #3910 we made the welcome screen use the same background color as the
editor.

However, this later regressed in
cdd5cb16ed.

This PR fixes that regression and restores the correct color for the
welcome page.

Release Notes:

- Fixed the background color of the welcome screen.
2024-01-17 11:00:59 -05:00
Conrad Irwin
e2788f1f0f
Limit number of collaborators in local Facepiles (#4083)
Release Notes:

- Improves the rendering of the facepile in the titlebar with many
people
2024-01-17 08:34:56 -07:00
Conrad Irwin
65664452f5
Allow leaving calls once project is unshared (#4081)
Release Notes:

- Fixes a bug where you could not use call controls after a project was
unshared
2024-01-17 08:34:45 -07:00
Julia
2fbf42d7df
Z index shenanigans (#4089)
Release Notes:

- Fixed a bug allowing certain UI elements to render incorrectly when
overlapping.
2024-01-17 09:48:08 -05:00
Kirill Bulatov
a601e96b6c Style collab notifications properly 2024-01-17 16:44:43 +02:00
Julia
977832a04e Refresh window, bypassing view cache, when opening hover or context menu 2024-01-17 09:40:16 -05:00
Thorsten Ball
51127460b2 Remove memmove to improve terminal performance
Co-authored-by: Antonio <antonio@zed.dev>
2024-01-17 15:02:06 +01:00
Thorsten Ball
5b0b9ff582 Submit bigger primitive batches when rendering
Before this change we wouldn't submit all possible primitives of the
same kind that are less-than the max order.

Result was that we would submit, say, 10 paths each in a separate batch
instead of actually batching them.

This was overly strict because even if the order of two different
primitives was the same, we could have still batched the 1st primitive
kind, if its implicit ordering was less than 2nd kind.

Example: say we have the following primitives and these orders

  5x paths, order 3
  2x sprites, order 3

Previously, we would submit 1 path, 1 path, 1 path, 1 path, 1 path, then
the sprites.

With this changes, we batch the 5 paths into one batch.

Co-authored-by: Antonio <antonio@zed.dev>
2024-01-17 13:50:55 +01:00
Thorsten Ball
04922d649c Fix missing Ctrl-[ bindings in Vim mode
This "adds" the keybindings I was missing in Vim mode (e.g. `Ctrl-[` to
cancel a selection) by fixing the definitions in the keymap from
`Ctrl+[` to `Ctrl-[`.
2024-01-17 12:22:05 +01:00
Antonio Scandurra
0cfec6e713
Fix segfault when drawing paths (#4084)
Previously, we were using `size_of` but passing the wrong type in
(`MonochromeSprite` instead of `PathSprite`). This caused us to read
outside of the `sprites` smallvec and triggered the segfault. This
reverts #4078 because I don't think using a `SmallVec` was the issue (it
might have masked this problem though, because we would most of the time
copy from the stack and not from the heap).

With this pull request we are also fixing another potential source of
segfaults, due to checking if we exhausted the instance buffer too late
when drawing underlines.

Release Notes:

- Fixed a crash that could happen during rendering.
2024-01-17 10:18:04 +01:00
Kirill Bulatov
39dff0e827 Stop using button for collab notifications 2024-01-17 11:06:46 +02:00
Antonio Scandurra
9c33790809 Check if we exhausted the instance buffer prior to copying underlines
This fixes another potential segfault.
2024-01-17 09:50:55 +01:00
Antonio Scandurra
97bd3e1fde Fix segfault caused by wrong size of path sprites bytes length
Previously, we were using `size_of` but passing the wrong type in
(MonochromeSprite instead of PathSprite). This caused us to read outside
of the `sprites` smallvec and triggered the segfault.
2024-01-17 09:45:46 +01:00
Mikayla
80852c3e18
Add documentation to the new test 2024-01-16 22:34:15 -08:00
Mikayla
a99ee5e599
Fix test failures 2024-01-16 22:30:44 -08:00
Mikayla
cae35d3334
Fix draw helper, add helper traits for selecting groupings of input events 2024-01-16 22:19:55 -08:00
Conrad Irwin
0ca9f286c6 Show cursors for remote participants 2024-01-16 21:54:49 -07:00
Conrad Irwin
1d5b237b64 Allow leaving calls once project is unshared 2024-01-16 21:54:13 -07:00
Conrad Irwin
8be798d1c0 Limit number of collaborators in local Facepiles 2024-01-16 19:49:48 -07:00
Mikayla
db433586aa
Add some small test code for tracking down this list bug 2024-01-16 16:52:55 -08:00
Marshall Bowers
26a3f68080
Tweak mute indicator positioning (#4080)
This PR tweaks the positioning of the mute indicators so that they cover
a little bit less of the avatar:

#### Before

<img width="305" alt="Screenshot 2024-01-16 at 6 32 51 PM"
src="https://github.com/zed-industries/zed/assets/1486634/3f6ad2f4-2c3e-498b-97a4-8b522f3ceda9">

#### After

<img width="311" alt="Screenshot 2024-01-16 at 6 26 48 PM"
src="https://github.com/zed-industries/zed/assets/1486634/37161557-084d-4b69-b61f-a0958e8e867c">

(It's a bit hard to tell in the screenshot, but there is a gap between
the bottom of the indicator and the top of the color ribbon).

Release Notes:

- N/A
2024-01-16 18:49:37 -05:00
Joseph T. Lyons
54dcb1d33c Rename variable 2024-01-16 18:35:50 -05:00
Joseph T. Lyons
0c59f510d2 Remove dbg!()s 2024-01-16 18:33:43 -05:00
Joseph T. Lyons
00682b8903 Do not reset timer for each reported event 2024-01-16 18:31:00 -05:00
Conrad Irwin
391a61cdc2
Play guess who's to blame (#4078)
We're occasionally seeing a crash in MetalRenderer::draw.

Looking at the backtrace, it seems almost certainly to be happening in
the call to `ptr::copy_nonoverlapping` on line 604 (see `#Don't Panic!`
channel notes)

As we already have added bounds checking to the destination, it seems
most
likely (however improbable) that somehow we're getting an invalid Ptr
and
length from the SmallVec.

To try and make progress on this, let's try a Vec for a bit lest there
is a subtle issue in SmallVec (though I couldn't spot one).


Release Notes:

- (maybe) Fixes SEGFAULT in MetalRenderer::draw
2024-01-16 16:10:36 -07:00
Conrad Irwin
cce3cf145c Play guess who's to blame 2024-01-16 15:39:37 -07:00
Marshall Bowers
4e8ad363f1
Increase border width used to indicate speaking (#4077)
This PR increases the width of the border that we use to indicate when a
call participant is speaking.

This should make it more apparent in the UI when someone is speaking.

Release Notes:

- Increased the width of the ring used to indicate when someone is
speaking in a call.
2024-01-16 17:09:28 -05:00
Conrad Irwin
c8a6b0d8aa
Enable Channels for everyone (#4058)
[[PR Description]]

Release Notes:

- Adds Channels, a new mechanism for collaboration. [Read
More...](https://zed.dev/blog/channels)
2024-01-16 14:53:24 -07:00
Conrad Irwin
6bcc97ead4
channel management fixes (#4066)
- Close modals when focus leaves
- Disallow self-management for admins

Release Notes:

- Fixes changing role of invited channel members
2024-01-16 14:53:14 -07:00
Marshall Bowers
2e03c848e3
Add dedicated indicator for showing a muted call participant (#4076)
This PR improves the muted indicators to make it clearer when a call
participant is muted.

Previously we used a red border color to denote when a participant was
muted.

Now we render an indicator with an icon to more clearly indicate the
participant's muted status:

<img width="303" alt="Screenshot 2024-01-16 at 4 05 15 PM"
src="https://github.com/zed-industries/zed/assets/1486634/d30fcd84-48e7-4959-b3c4-1054162c6bd6">

Hovering over the indicator will display a tooltip for further
explanation:

<img width="456" alt="Screenshot 2024-01-16 at 4 05 25 PM"
src="https://github.com/zed-industries/zed/assets/1486634/6345846f-196c-47d9-8d65-c8d86e63f823">

This change also paves the way for denoting the deafened status for call
participants.

Release Notes:

- Improved the mute indicator for call participants.
2024-01-16 16:18:06 -05:00
Marshall Bowers
9903b7ae6e
Add color ribbon for local player (#4075)
This PR adds a color ribbon for the local player in the current call.

This fixes the alignment of the local user's avatar so that it lines up
with the rest of the collaborators in the call:

<img width="307" alt="Screenshot 2024-01-16 at 2 56 04 PM"
src="https://github.com/zed-industries/zed/assets/1486634/979ee3fa-70c9-482a-9351-020402ad68b9">

Release Notes:

- Added a color ribbon for the local player when in a call.
2024-01-16 15:17:29 -05:00
Piotr Osiewicz
ff67d9dea0 Add font name completions to ui_font_family and terminal::font_family 2024-01-16 20:32:21 +01:00
Piotr Osiewicz
f011953484 Rename all_font_families to all_font_names 2024-01-16 20:32:21 +01:00
Marshall Bowers
ca4a8b2226
Rework Avatar indicator to be more general-purpose (#4073)
This PR reworks the way we add indicators to `Avatar`s to make them more
general-purpose.

Previously we had logic specific to the availability indicator embedded
in the `Avatar` component, which made it unwieldy to repurpose for
something else.

Now the `indicator` is just a slot that we can put anything into.

Release Notes:

- N/A
2024-01-16 14:05:05 -05:00
Mikayla Maki
d00067cd86
Switch project search deploy behavior to be isolated to a pane (#4072)
This adjusts the solution in
https://github.com/zed-industries/zed/pull/4014 to fix the double-focus
issue, allowing each pane's project search to work independently.

Release Notes:

- Changed the name of the `workspace::DeploySearch` action to
`pane::DeploySearch` and changed it's behavior to open a new search OR
focus an existing project search in the current pane.
(https://github.com/zed-industries/community/issues/2395)
2024-01-16 10:41:57 -08:00
Mikayla
36ff35fcca
Change name of deploy action to indicate what scope it operates at 2024-01-16 10:30:21 -08:00
Mikayla
52267a5dec
Adjust project search behavior to be isolated to a pane 2024-01-16 10:06:48 -08:00
Thorsten Ball
3d041f4e91
Fix overlapping block headers when using custom line height (#4071)
This fixes block headers overlapping over text in the buffer when using
a custom line height of 1.25.

It fixes the issue by making the parent container a v-flex,
vertically-justifying the content and moving from relative padding to
absolute padding for the header itself.

## Before/After

With setting:
```json
  "buffer_line_height": {
    "custom": 1.25
  },
```

### Before

![screenshot-2024-01-16-16 48
48@2x](https://github.com/zed-industries/zed/assets/1185253/8c3b977e-333f-403c-a4d3-0911f3fac5e0)

### After

![screenshot-2024-01-16-16 50
13@2x](https://github.com/zed-industries/zed/assets/1185253/2d854eba-c4c4-4bce-b60b-dd250856b08f)

### Release notes
Release Notes:

- Fixed headers in multi-buffers overlapping over content of the buffer
2024-01-16 17:27:36 +01:00
Julia
60b79ef2ea Prevent content mask breaks from having the same z-index
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2024-01-16 11:23:28 -05:00
Julia
4f25df6ce2 Prevent div background/content/border from interleaving at same z-index
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2024-01-16 11:22:14 -05:00
Thorsten Ball
62f5becf1f Fix rustfmt by pulling out long string into constant 2024-01-16 17:20:36 +01:00
Thorsten Ball
1cbdf2ba22 Fix overlapping block headers when using custom line height
This fixes block headers overlapping over text in the buffer when using
a custom line height of 1.25.

It fixes the issue by making the parent container a v-flex,
vertically-justifying the content and moving from relative padding to
absolute padding for the header itself.

Co-authored-by: antonio <antonio@zed.dev>
Co-authored-by: julia <julia@zed.dev>
Co-authored-by: marshall <marshall@zed.dev>
2024-01-16 17:20:27 +01:00
Julia
4e0c8dcea9 Revert "Use taffy to retrieve the parent for a given layout node"
This reverts commit 5904bcf1c2.

Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2024-01-16 10:44:24 -05:00
Thorsten Ball
f938bae0a2 Use NSScreen to fetch primary display
According to Chromium source, `NSScreen::screens` should always get us
one display.

We made this change because we ran into panics caused by the previous
`unwrap()` when `CGGetActiveDisplayList` might return an empty list.
2024-01-16 14:23:10 +01:00
Thorsten Ball
03bfe3ef80 Call CGGetActiveDisplayList once to avoid panic
Previously we called CGGetActiveDisplayList twice: once to get the
number of displays and then to get the displays.

We saw a panic due to no displays being returned here. As a first
attempt to fix the panic, we're reducing the amount of calls to
CGGetActiveDisplayList and just do one with the trade-off being that we
pre-allocate 32 pointers in a Vec.
2024-01-16 12:01:54 +01:00
Kirill Bulatov
074966427d Fix previous theme not being applied on startup 2024-01-16 11:23:34 +02:00
Kirill Bulatov
ec3cfc33d6
Adds a way to select items under multiple carets (#4067)
Deals with https://github.com/zed-industries/community/issues/2374

Release Notes:

- Added a way to select items under multiple carets with
`editor::SelectNext` and `editor::SelectPrevious` commands
2024-01-16 11:08:48 +02:00
Kirill Bulatov
25abe8f981 Fix the tests 2024-01-16 10:58:27 +02:00
Kirill Bulatov
fbb363e83a Add tests 2024-01-16 10:07:31 +02:00
Nate Butler
dde0056845 Use srgb, get mix and blend working 2024-01-16 01:08:17 -05:00
Nate Butler
bdb06f183b Add a rudimentary state color builder 2024-01-16 00:07:06 -05:00
Conrad Irwin
18739477f7 Clippy 2024-01-15 20:12:20 -07:00
Conrad Irwin
036e637208 Disallow self-management for admins 2024-01-15 19:31:01 -07:00
Conrad Irwin
62232060e6 Close modals when focus leaves
This is more similar to zed1's behaviour, and allows us to work around
the difficulty in defining `on_mouse_down_out` for modals that have
overlays.
2024-01-15 19:20:35 -07:00
Joseph T. Lyons
268d156fad Add command palette action events 2024-01-15 20:22:47 -05:00
Max Brunsfeld
deac172e39
Restore re-rendering of editors on buffer font size changes (#4064)
Now that views are cached, we need to explicitly `.notify()` text
editors when the buffer font size changes.

* [x] Notify editors when settings change, or adjusting buffer font size
* [x] Figure out why non-focused editors still do not re-render when
adjusting buffer font size
* [x] Reset buffer font size adjustment when the size is updated in the
user's settings
2024-01-15 17:13:13 -08:00
Max Brunsfeld
d84785f7e8 Put back logic for resetting buffer font adjustment on settings change. 2024-01-15 17:03:02 -08:00
Max Brunsfeld
1e755aa00f Notify global observers when removing a global 2024-01-15 17:02:20 -08:00
Max Brunsfeld
8f1633e798 Iterate from leaf to root when marking views dirty in notify 2024-01-15 16:49:06 -08:00
Conrad Irwin
f220323176
Fix fallback font (#4062)
As this is used if you mis-spell "buffer_font_family", it should be
monospace.

Also treat "Zed Mono" and "Zed Sans" as valid fonts

Follow up to #4045

Release Notes:

- Fixes font validation to allow "Zed Mono" as a valid font
2024-01-15 17:08:04 -07:00
Max Brunsfeld
8f262892a0 Notify editors on buffer font size changes 2024-01-15 14:53:24 -08:00
Max Brunsfeld
e57c32effb
Avoid playing newly published audio tracks when deafened (#4040)
Release Notes:

- Fixed a bug where the 'deafen' button would only apply to audio from
the call's current participants, but not any participants who joined
after the button was pressed.
- Fixed a bug where after being granted write access to a channel, the
microphone icon appeared non-muted, even though audio was not shared.
2024-01-15 14:08:49 -08:00
Max Brunsfeld
e90794d3ec Add and enhance tests for muting/deafening, fix exposed logic errors 2024-01-15 14:03:38 -08:00
Nate Butler
8c9f3a7322 init color crate 2024-01-15 17:01:07 -05:00
Kirill Bulatov
55671eac40 Select next/previous word for multiple carets if possible 2024-01-15 23:42:36 +02:00
Joseph T. Lyons
acf85db44e
Add more open events (#4061)
Adds open events for

- Welcome page
- Project search
- Project diagnostics

Release Notes:

- N/A
2024-01-15 16:36:24 -05:00
Antonio Scandurra
b565c44a9e
Avoid panicking when closing a dragged tab (#4057)
Release Notes:

- Fixed a panic that could occur when closing a tab while dragging it.
2024-01-15 22:34:33 +01:00
Conrad Irwin
f0ed80cd8e Fix fallback font
As this is used if you mis-spell "buffer_font_family", it should be
monospace.

Also treat "Zed Mono" and "Zed Sans" as valid fonts
2024-01-15 14:32:48 -07:00
Joseph T. Lyons
24db41fcdd Remove debugs 2024-01-15 16:29:58 -05:00
Joseph T. Lyons
355d1fca82 Remove button event function 2024-01-15 16:28:28 -05:00
Joseph T. Lyons
148c294c02 Removed button event 2024-01-15 16:26:56 -05:00
Joseph T. Lyons
ba9a9f4f17 Add more open events
project search
diagnostics
welcome page
2024-01-15 16:26:04 -05:00
Piotr Osiewicz
9a70a89477
Fix project panel being toggled on workspace startup. (#4059)
A sequence of events: Launch Zed -> Quit Zed -> Launch Zed would leave
you with a project panel in a a different state on each open (e.g. if it
is open on 1st one, 2nd run will have it closed). We were essentially
not tracking whether the deserialization took place.

Release Notes:

- Fixed project panel being toggled on/off on startup due to incorrect
tracking of serialization state (solves
https://github.com/zed-industries/community/issues/2406)
2024-01-15 22:23:16 +01:00
Conrad Irwin
97047ffaca Enable Channels for everyone 2024-01-15 13:33:58 -07:00
Kirill Bulatov
92add99260 Add LSP logs into the end of the editor, not after its caret
Also prevent tabs from being added in readonly editors
2024-01-15 22:12:52 +02:00
Antonio Scandurra
e60117dc54 Avoid panicking when closing a dragged tab
Co-Authored-By: Max <max@zed.dev>
Co-Authored-By: Nathan <nathan@zed.dev>
2024-01-15 19:46:34 +01:00
Antonio Scandurra
1b35b93e77
Avoid retrieving layout bounds inside of right click menu event handler (#4056)
By the time the event handler is invoked, all information about the
rendered layout tree is gone.

Release Notes:

- N/A
2024-01-15 19:42:47 +01:00
Antonio Scandurra
e4728b04ca
Preserve tooltips requested by cached views (#4055)
Release Notes:

- N/A
2024-01-15 19:42:39 +01:00
Antonio Scandurra
a56265e607 Avoid retrieving layout bounds inside of right click menu event handler
Co-Authored-By: Nathan <nathan@zed.dev>
Co-Authored-By: Max <max@zed.dev>
2024-01-15 19:27:18 +01:00
Antonio Scandurra
69bbcba99a Preserve tooltips requested by cached views
Co-Authored-By: Nathan <nathan@zed.dev>
Co-Authored-By: Max <max@zed.dev>
2024-01-15 19:19:27 +01:00
Thorsten Ball
b9be2147e8 Fix unaligned close button in tab bar
Co-authored-by: Marshall <marshall@zed.dev>
2024-01-15 18:16:41 +01:00
Marshall Bowers
90f4c70a82
Rename h_stack and v_stack to h_flex and v_flex, respectively (#4053)
This PR renames the `h_stack` and `v_stack` to `h_flex` and `v_flex`,
respectively.

We were previously using `h_stack` and `v_stack` to match SwiftUI, but
`h_flex` and `v_flex` fit better with the web/flexbox terminology that
the rest of GPUI uses.

Additionally, we were already calling the utility functions used to
implement `h_stack` and `v_stack` by the new names.

Release Notes:

- N/A
2024-01-15 11:34:06 -05:00
Marshall Bowers
b136d21ebf
Make tab close button square (#4052)
This PR makes the close button for tabs square.

`IconButton` now accepts a `shape`, and using `IconButtonShape::Square`
will ensure the `IconButton` is square with respect to its contained
icon.

#### Before

<img width="119" alt="Screenshot 2024-01-15 at 10 32 40 AM"
src="https://github.com/zed-industries/zed/assets/1486634/dc806b9b-411f-4cd9-8c10-676d2cbd298b">

#### After

<img width="116" alt="Screenshot 2024-01-15 at 10 32 24 AM"
src="https://github.com/zed-industries/zed/assets/1486634/8b4ef43c-14b6-449f-a235-5d7affd82c4e">

Release Notes:

- Changed the tab close button to be square.
2024-01-15 10:43:03 -05:00
Antonio Scandurra
1da9c8b1e9
Rebuild shader header when cbindgen sources have changed (#4051)
This was causing the Metal shaders to incorrectly interpret the
primitives submitted by GPUI, which in turn caused rendering to be
completely borked.

Release Notes:

- N/A
2024-01-15 16:32:09 +01:00
Julia
ef4831b868
Prevent storybook dialog from swallowing terminal cursor when ctrl-c-ed (#4050)
Honestly thought this was a bug with our terminal port lol. Turns out
its an oversight in the `dialoguer` crate but its seems pretty easy to
work around so might as well

Release Notes:

- N/A
2024-01-15 10:25:11 -05:00
Antonio Scandurra
0ff5603dc9 Rebuild shader header when cbindgen sources have changed
Co-Authored-By: Thorsten <thorsten@zed.dev>
2024-01-15 16:23:22 +01:00
Julia
5000a53a61 Prevent storybook dialog from swallowing terminal cursor when ctrl-c-ed 2024-01-15 10:19:08 -05:00
Piotr Osiewicz
e52a2298cc
gpui: Pin to font-kit with improved OTC parsing performance. (#4047)
Details are in https://github.com/zed-industries/font-kit/pull/1; We're
not doing anything too fancy, really. Still, you should mostly see font
loading times drop significantly for font collections
Release Notes:
- Improved loading performance of large font collections (e.g. Iosevka).
Fixes https://github.com/zed-industries/community/issues/1745,
https://github.com/zed-industries/community/issues/246


https://github.com/zed-industries/zed/assets/24362066/f70edbad-ded6-4c12-9c6d-7a487f330a1b
2024-01-15 15:46:18 +01:00
Kirill Bulatov
fc294ce0b1
Disable copilot for feedback and lsp log editors (#4048)
LSP log editor caused recursive flood of messages, and feedback editor
is better with people writing their own feedback.

Release Notes:

- Fixed hanging due to excessive logs when browsing Copilot LSP logs
2024-01-15 15:59:27 +02:00
Kirill Bulatov
253c8dbe8e Disable copilot for feedback and lsp log editors
LSP log editor caused recursive flood of messages, and feedback editor is better with people writing their own feedback.
2024-01-15 15:49:23 +02:00
Thorsten Ball
80c0d09b15
Fix editor stealing click events from copy-error button (#4046)
This fixes the click event on the "copy error message" button by
changing the `editor` element to ignore mouse-down events when the
default was prevented. That's similar to how `div` does it.

Release Notes:

- Fixed a bug that prevented "copy error message" button from being
clicked.
2024-01-15 14:03:15 +01:00
Thorsten Ball
74f3366f42 Fix editor stealing click events from copy-error button
Co-authored-by: Antonio <antonio@zed.dev>
2024-01-15 13:47:09 +01:00
Antonio Scandurra
05d05b051b Pop node from dispatch tree during cx.paint_view
Co-Authored-By: Thorsten <thorsten@zed.dev>
2024-01-15 11:46:46 +01:00
Antonio Scandurra
4ff514ca7e Merge remote-tracking branch 'origin/main' into cache
# Conflicts:
#	crates/gpui/src/elements/div.rs
2024-01-15 11:37:46 +01:00
Conrad Irwin
29ce109211
chat panel ++ (#4044)
- Update chat panel with current channel
- Open chat panel for guests
- Open chat when joining a channel with guests
- Some tweaks for chat panels
- Don't lose focus on default panel state
- Make chat prettier (to my eyes at least)
- Fix multiple mentions in one message
- Show a border when scrolled in chat
- Fix re-docking chat panel
- Move settings subscription to dock

[[PR Description]]

Release Notes:

- Opens chat by default when joining a public channel
- Improves chat panel UI
2024-01-14 13:54:10 -07:00
Conrad Irwin
b34c78016f Fix tests for TestPanel 2024-01-14 12:26:54 -07:00
Conrad Irwin
4d87a67af8 Remove unused imports 2024-01-13 22:44:47 -07:00
Conrad Irwin
898645681f Move settings subscription to dock
Reduces likelihood of panels being unable to move themselves
2024-01-13 22:41:26 -07:00
Conrad Irwin
e90ddba2c3 Default to Zed Sans for UI 2024-01-13 22:38:22 -07:00
Conrad Irwin
fee369bca1 Fix re-docking chat panel 2024-01-13 22:26:25 -07:00
Conrad Irwin
818cbb2415 Show a border when scrolled in chat 2024-01-13 22:19:21 -07:00
Conrad Irwin
c810af40d3 Fix multiple mentions in one message 2024-01-13 21:53:22 -07:00
Conrad Irwin
f6ef07e716 Make chat prettier (to my eyes at least) 2024-01-13 21:37:13 -07:00
Conrad Irwin
c2ff9fe2da Don't lose focus on default panel state 2024-01-13 14:32:24 -07:00
Mikayla Maki
89f0d1643e
Restore temp file initialization in telemetry code (#4043)
Release Notes:

- Fix 'open telemetry log' command to actually show the telemetry log.
2024-01-13 09:04:08 -08:00
Mikayla
4d6dfa319d
Don't open files unescessary in dev builds 2024-01-12 22:47:07 -08:00
Mikayla
1d7dc96135
Restore temp file initialization in telemetry code 2024-01-12 21:37:09 -08:00
Mikayla Maki
acb13738b8
Disable searches for '.' in the terminal. (#4042)
Release Notes:

- N/A A crash that could occur when searching for '.' in the terminal
with a large monitor.
2024-01-12 21:17:10 -08:00
Mikayla
78858d4d11
Disable searches for '.', so that users with large monitors don't accidentally crash the terminal when searching for dot files. 2024-01-12 21:12:02 -08:00
Mikayla
bb35805f9b
fmt 2024-01-12 21:02:01 -08:00
Mikayla
bfb59f1598
Remove last stale code 2024-01-12 20:59:19 -08:00
Mikayla
5897b18cfd
remove more commented code 2024-01-12 20:10:40 -08:00
Mikayla
3a836b8026
Remove some comments 2024-01-12 20:10:40 -08:00
Max Brunsfeld
51218811cf Don't initialize audio crate in integration tests
Otherwise, a lot of time is spent in Audio::play_sound
2024-01-12 17:29:33 -08:00
Nathan Sobo
d2c436dcdc
fix bounds checks (#4038)
Ensure we `panic()` instead of crash on graphics memory buffer overflow

Also bump the buffer size to 32Mb from 8Mb to make this rarer (but still
possible)

Release Notes: Fixes some crahes due to lack of graphics buffer spacae
2024-01-12 15:28:19 -08:00
Max Brunsfeld
c2cf28804a Don't run newly published audio tracks when deafened
Also, simplify the management of the muted and deafened state in Room.
2024-01-12 15:12:29 -08:00
Conrad Irwin
eafe0944e0 Some tweaks for chat panels 2024-01-12 16:01:51 -07:00
Julia
8014d9a643
Still paint group hover handler for invisible divs (#4039)
Fixes bug where tab close icon show on hover is inconsistent

Release Notes:

- Fixed a bug where a tab's close icon would not always appear on hover.
2024-01-12 17:52:24 -05:00
Max Brunsfeld
aa50f69940 Add LiveKit APIs for starting and stopping audio tracks 2024-01-12 14:46:17 -08:00
Julia
cdc227b32f Still paint group hover handler for invisible divs
Fixes bug where tab close icon show on hover is inconsistent
2024-01-12 17:44:15 -05:00
Conrad Irwin
50f3bbbc8b Open chat when joining a channel with guests
(and close it when leaving a channel again)
2024-01-12 15:08:14 -07:00
Conrad Irwin
aa5c6a8aa3 Update graphics memory assert to be more helpful 2024-01-12 14:35:50 -07:00
Mikayla
324d1d119b
Add some context to assert 2024-01-12 12:40:37 -08:00
Conrad Irwin
551fd9ba7e Boop 2024-01-12 12:40:09 -07:00
Max Brunsfeld
7dc28aad78 Forbid paste, undo, redo on read-only editors 2024-01-12 10:38:05 -08:00
Conrad Irwin
f0d490c671 Open chat panel for guests 2024-01-12 10:34:24 -07:00
Conrad Irwin
dc158f708f Update chat panel with current channel 2024-01-12 10:23:30 -07:00
Antonio Scandurra
f4a7f6f4c3 Fix warning 2024-01-12 18:06:18 +01:00
Conrad Irwin
981858ef3c Fix panic with many participants 2024-01-12 10:02:55 -07:00
Antonio Scandurra
817b641c17 Ensure editor elements invalidate their parent views on notify
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2024-01-12 17:36:11 +01:00
Marshall Bowers
bc09ce6ffc
Clean up some theme TODOs (#4034)
This PR cleans up some TODOs we had in the themes.

We won't be addressing these in the immediate term, so no need to have
them show up when folks are looking for TODOs to burn down before
launch.

I added some general notes as signposts until we're ready to revisit
this.

Release Notes:

- N/A
2024-01-12 10:37:18 -05:00
Antonio Scandurra
a32ad3f907 Fix editor tests 2024-01-12 14:50:42 +01:00
Antonio Scandurra
94293b3bf9 Merge remote-tracking branch 'origin/main' into cache
# Conflicts:
#	crates/gpui/src/window.rs
2024-01-12 14:31:13 +01:00
Max Brunsfeld
08a4307d71 Fix failure to write to keychain because of dropping a future 2024-01-11 16:22:34 -08:00
Max Brunsfeld
02029c945a Suppress unused field warning 2024-01-11 16:21:55 -08:00
Max Brunsfeld
43fbe6fedf
Temporarily avoid releasing livekit RemoteAudioTracks on drop (#4030)
This release call was added during the conversion to gpui2. I think it
is probably valid, but want to remove it on the off chance that it is
causing the crash that we're seeing in the `livekit.multicast` thread
when leaving a room.

Most likely, this is not going to fix anything, and is just introducing
a small memory leak, but it is a step back to how the app worked with
gpui 1.
2024-01-11 15:53:01 -08:00
Max Brunsfeld
9d50697caa Temporarily avoid releasing livekit RemoteAudioTracks on drop
This release call was added during the conversion to gpui2. I think
it is probably valid, but want to remove it on the off chance that
it is causing the crash that we're seeing in the `livekit.multicast`
thread when leaving a room.
2024-01-11 15:46:21 -08:00
Piotr Osiewicz
8d294211db settings.json: Suggest font names for buffer_font_family 2024-01-11 23:23:10 +01:00
Piotr Osiewicz
a1049546a2 gpui: Validate font contents at load time.
During layout of EditorElement we use 'm' character from current font to calculate sizes, panicking with fonts that do not have that character (e.g. Arabic fonts). It's not really EditorElement's fault, as it assumes that the font it's dealing with is gonna have that character available.
To prevent a crash, I added validation while loading a family that a given font contains the glyphs we're gonna use down the line.
2024-01-11 23:23:10 +01:00
Max Brunsfeld
258c2fdad4 Fix routing of leader updates from unshared projects
Previously, leader updates in unshared projects would be sent to
all followers regardless of project, as if they were not scoped
to any project.
2024-01-11 13:47:31 -08:00
Conrad Irwin
7c817642b8
Don't hold platform lock while calling user callbacks (#4027)
Inspired by a bug where using Edit -> Copy from the menu created a
deadlock.

Release Notes:

- Fix a deadlock when copying from Edit -> Copy
2024-01-11 14:26:34 -07:00
Conrad Irwin
a8b8be47e0 Don't hold platform lock while calling user callbacks
Inspired by a bug where using Edit -> Copy from the menu created a
deadlock.
2024-01-11 13:52:50 -07:00
Max Brunsfeld
cb11fb68cb
Avoid bright green separators when displaying untitled buffers in multi-buffers (#4024)
Release notes:

- Fixed unstyled excerpt separators when showing untitled buffers in
multi-buffers.
2024-01-11 12:19:55 -08:00
Mikayla
d2b15c90e8
collab 0.36.1 2024-01-11 11:00:42 -08:00
Mikayla Maki
e3c9c602f9
Whoops (#4011)
Fixes a spelling mistake I made in the database schema 😬

Release Notes:

- n/a
2024-01-11 10:57:08 -08:00
Conrad Irwin
4d66ade332
Fix multi-key shortcuts (#4025)
An old fix was ported over from gpui1, and the two fixes could not exist
side-by-side. Delete this code and let the keymap handle it

Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2024-01-11 11:36:51 -07:00
Mikayla
91d3ba5390
Switch to non-destructive migration 2024-01-11 10:33:33 -08:00
Conrad Irwin
43183538a7
Stop following when project is unshared (#4010)
Before this change the views would continue to update in the background
of the "disconnected" dialogue, which was disconcerting.

[[PR Description]]

Release Notes:

- Fixed an edge-case where following didn't handle unshare correctly
2024-01-11 11:26:56 -07:00
Conrad Irwin
51cc6b1e1c
Guard against infinite loop in focus handling (#4023)
Release Notes:

- Fix an infinite loop in focus handling
2024-01-11 11:26:37 -07:00
Conrad Irwin
23fe720ca6 Fix multi-key shortcuts
An old fix was ported over from gpui1, and the two fixes could not exist
side-by-side. Delete this code and let the keymap handle it
2024-01-11 11:24:55 -07:00
Max Brunsfeld
5feae86900 Avoid bright green separators when displaying untitled buffers in multi-buffers 2024-01-11 09:55:16 -08:00
Piotr Osiewicz
a98d048905
gpui: Make TextSystem::line_wrapper non-fallible. (#4022)
Editors WrapMap could become desynchronised if user had an invalid font
specified in their config. Compared to Zed1, WrapMap ignored the
resolution failure instead of panicking. Now, if there's an invalid font
in the user config, we just fall back to an arbitrary default.


Release Notes:
- Fixed the editor panic in presence of invalid font name in the config
(fixes https://github.com/zed-industries/community/issues/2397)

---------

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-01-11 18:52:00 +01:00
Piotr Osiewicz
af790d11ee Add test for new DeploySearch behaviour 2024-01-11 18:39:28 +01:00
Piotr Osiewicz
634a55257d project search: Do not open a new existing item in the current pane for DeploySearch
Fixes https://github.com/zed-industries/community/issues/2395 using the first approach suggested in the original post (focus the existing search without bringing it over to a pane).
2024-01-11 18:39:28 +01:00
Conrad Irwin
06493471aa Guard against infinite loop in focus handling 2024-01-11 10:38:08 -07:00
Joseph T. Lyons
a9fce19048 Return a single Option from EventCoalescer 2024-01-11 12:27:59 -05:00
Antonio Scandurra
11b433dc1c Move back to sorting entries in the depth map as we insert them 2024-01-11 18:24:07 +01:00
Joseph T. Lyons
06ce1af530 Only return environment when period ends 2024-01-11 11:30:22 -05:00
Joseph T. Lyons
f4c698ba27 Fix bug with improperly reported environment
When logging the edit environment, we were logging the newest environment being sent into the EventCoalescer on the latest activity log, when we should've been logging the environment that was associated with the ended period within the EventCoalescer.
2024-01-11 11:24:55 -05:00
Antonio Scandurra
101cedb5f7 💄 2024-01-11 16:59:33 +01:00
Kirill Bulatov
35db07fff1
Show abs path matches in file finder (#4018)
Deals with https://github.com/zed-industries/community/issues/2158

Release Notes:

- Make File finder to show matching file for the abs path queries
2024-01-11 17:57:31 +02:00
Antonio Scandurra
cbbba41748 Reuse line layouts when reusing view 2024-01-11 16:57:06 +01:00
Kirill Bulatov
dd6e2df2a1 Show abs path matches in file finder 2024-01-11 17:49:46 +02:00
Kirill Bulatov
ba83623c84 Fix whitespace symbol colors in the editor, use zed1 one
co-authored-by: Marshall Bowers <marshall@zed.dev>
2024-01-11 17:43:49 +02:00
Kirill Bulatov
9bb50a5ded Restore hover action in the editor 2024-01-11 16:19:44 +02:00
Antonio Scandurra
18eaefd0ed Reuse cursor style when reusing a view tree 2024-01-11 15:03:34 +01:00
Kirill Bulatov
4fe0c473ca
Do not split on only external directories being drag and dropped (#4015)
Release Notes:

- Fixed drag and dropped folders opening an empty split pane
2024-01-11 15:23:53 +02:00
Joseph T. Lyons
75cb409d2e
Instrument edit events (#4006)
The goal of this PR is to send up events that contain the duration of
keyboard activity within Zed. I built the `EventCoalescer`, which gets
called called each time a key is pressed, within any environment (in the
case of this PR, within "editor" and "terminal). The" `EventCoalescer`
holds a start and end DateTime and adjusts the end instant as events
come in, until a timeout from the last event is hit.

I did my best to keep this mechanism efficient (avoiding vectors to
store moments in time, avoiding spawning timers threads, etc.), because
I know this is going to be per keystroke, but its behind a lock on the
telemetry struck, since it has to know when the environment changes, in
which point, it will automatically end the activity period, even if
there is no timeout. Because we have to have access to it from different
parts of the system, we have to go through the lock, which worried me a
bit (@mikayla-maki's intuition is that it should be fine).

As for the event, I take the time between the durations reported by the
event coalescer and send that up to zed - the indention is to
reconstruct the start and end times on zed.dev, in the same way we use
the event offset times and the time on zed.dev to get the official event
timestamp, and avoid the issue of the user having their system clocks
set wrong.

I'd really appreciate it if @nathansobo or @maxbrunsfeld could check
this out.

Release Notes:

- N/A
2024-01-11 08:19:29 -05:00
Kirill Bulatov
2e36b0b72a Do not split on only external directories being drag and dropped 2024-01-11 15:09:43 +02:00
Kirill Bulatov
348bc842ef
Enforce no dbg! and todo! in Rust code via clippy lints in the CI job (#4005)
Release Notes:

- N/A
2024-01-11 14:25:31 +02:00
Antonio Scandurra
50ccdf5c16 Reuse input handler when reusing a view tree 2024-01-11 13:22:59 +01:00
Kirill Bulatov
41bc49af36 Remove redundant install Rust steps
Those were not installing Rust but configuring it via rustup, and
those configurations were done on `stable` toolchain which is not what we use (see rust-toolchain.toml)

co-authored-by: Piotr <piotr@zed.dev>
2024-01-11 14:11:13 +02:00
Kirill Bulatov
a5dd2535f1 Properly require clippy installation, try to shuffle clippy arguments
co-authored-by: Piotr <piotr@zed.dev>
2024-01-11 13:56:28 +02:00
Antonio Scandurra
d088ace404 Explicitly push a node in the dispatch tree when painting a new view 2024-01-11 12:48:05 +01:00
Antonio Scandurra
142a8b68c8 Avoid casting view ids to u32
Also, it looks like using a u64 directly doesn't work well with Metal
shaders, so we unpack the u64 into two u32s.
2024-01-11 12:28:48 +01:00
Piotr Osiewicz
0db7559e96
editor: extend diff hunk range for custom transform blocks. (#4012)
Reported by Mikayla:

![image](https://github.com/zed-industries/zed/assets/24362066/b744d82e-328f-4554-becf-96f9fa92bfc8)
Note how the line with rust analyzer error does not have a git diff
hunk.
vs:

![image](https://github.com/zed-industries/zed/assets/24362066/e285af7a-b8ab-40e9-a9c6-b4ab8d6c4cd0)

Release Notes:
- N/A
2024-01-11 12:26:12 +01:00
Mikayla
6503dd51dd
enviroment -> environment 2024-01-10 22:57:58 -08:00
Joseph T. Lyons
0df4bfacc2 Increase debug mode queue size 2024-01-11 01:12:49 -05:00
Joseph T. Lyons
8a61d5059b Never send an an empty set of events 2024-01-11 01:12:30 -05:00
Conrad Irwin
f418bd907d Stop following when project is unshared
Before this change the views would continue to update in the background
of the "disconnected" dialogue, which was disconcerting.
2024-01-10 23:09:09 -07:00
Mikayla Maki
31689c09e5
Uncomment last tests (#4009)
With this, we're done all known things that need porting. 

Release Notes:

-
2024-01-10 20:00:14 -08:00
Mikayla
83163a0031
Reverse context arrays in child predicate test 2024-01-10 19:54:39 -08:00
Mikayla
38396d4281
Add remaining tests
co-authored-by: Conrad <conrad@zed.dev>
2024-01-10 19:39:43 -08:00
Mikayla
a5ca58354d
Fix first few asserts 2024-01-10 18:26:01 -08:00
Joseph T. Lyons
bddf827bc1 Add reminder for the future 2024-01-10 21:02:34 -05:00
Mikayla Maki
44969460cd
Remove remaining port related todos (#3994)
TODO:
- [x] Audit all TODO comments in Zed source and mark port related ones
with a !
- [x] Resolve all todos written as `todo!`

Release Notes:

- N/A
2024-01-10 17:31:05 -08:00
Max Brunsfeld
cb5d4edc4b
Handle reconnects to the livekit server in which local tracks are unpublished (#3992)
Release notes:

* Fixed a bug where network interruptions could cause audio and screen
sharing to stop working without indicating that they were stopped, and
there was no way to restart the audio stream.
2024-01-10 16:34:11 -08:00
Mikayla
1932a298cb
Add back ime_key 2024-01-10 16:29:00 -08:00
Max Brunsfeld
75fdaeb56f Detect when a track is unpublished due to reconnecting to livekit
Co-authored-by: Julia <julia@zed.dev>
2024-01-10 16:12:26 -08:00
Max Brunsfeld
2d1eb0c56c Expose a single updates stream from live_kit_client::Room
Co-authored-by: Julia <julia@zed.dev>
2024-01-10 16:10:52 -08:00
Conrad Irwin
b907f375a3
Fix fold-related panic (#4008)
Although it's not super clear why this fails; in zed1 we used to have a
bounds
check. Restoring the bounds check for now, but leaving a debug_assert!
in case
a local reproduction happens.

Release Notes:

- Fix a panic that happened sometimes when rendering folds
2024-01-10 16:53:25 -07:00
Conrad Irwin
766a869208 Fix fold-related panic 2024-01-10 15:51:13 -07:00
Joseph T. Lyons
b4444bdfc0 Rename field in telemetry struct 2024-01-10 17:41:02 -05:00
Kirill Bulatov
2e9c9adfbe Remove active call data when it was accepted
That hopefully helps with call notifications sometimes not being closed

co-authored-by: Max <max@zed.dev>
2024-01-11 00:35:00 +02:00
Kirill Bulatov
7b3e7ee3cc Enfoce no dbg! and todo! in Rust code via clippy lints in the CI job 2024-01-11 00:26:46 +02:00
Antonio Scandurra
a4ef1bc096 Rename reuse_geometry to reuse_view 2024-01-10 23:06:10 +01:00
Joseph T. Lyons
9df29fb347 WIP 2024-01-10 17:04:26 -05:00
Antonio Scandurra
1c260e6dfd Merge remote-tracking branch 'origin/main' into cache
# Conflicts:
#	crates/copilot/src/sign_in.rs
#	crates/gpui/src/window.rs
#	crates/workspace/src/pane_group.rs
2024-01-10 22:58:52 +01:00
Joseph T. Lyons
b26a468820 Merge branch 'main' into instrument-keyboard-events 2024-01-10 16:03:01 -05:00
Mikayla
f71a0cddb8
Remove last todos 2024-01-10 12:13:12 -08:00
Mikayla
4bcac68c8c
Restore GPUI test 2024-01-10 11:43:52 -08:00
Piotr Osiewicz
9553759899
Remove todo from search tests 2024-01-10 11:26:11 -08:00
Mikayla
7ef88397c9
Fix seg fault when using the WindowContext::on_window_should_close() API 2024-01-10 11:26:11 -08:00
Mikayla
2a09c6aad5
Restore missing test 2024-01-10 11:26:11 -08:00
Mikayla
c98d7adf83
Audit all TODOs in Zed and mark port related todos 2024-01-10 11:26:11 -08:00
Max Brunsfeld
02ef6fc973
Ensure ArenaRef pointers are aligned to their contained type (#4002)
We think this may fix a segfault that sometimes occurs during
`display_layer`.
2024-01-10 10:53:24 -08:00
Conrad Irwin
61a9a3a274 Revert "Remove ChannelsAlpha flag"
This reverts commit 1c1151a0ed.
2024-01-10 11:52:33 -07:00
Max Brunsfeld
69a93edabd Ensure ArenaRef pointers are aligned to their contained type
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2024-01-10 10:36:08 -08:00
Conrad Irwin
8d1bca450f Remove extra assertion
As part of debugging the port of following tests we added an assertion
that the project was dropped. Now that we initialize the editor and
handle focus correctly in tests, the project is retained by
`refresh_document_highlights`. That doesn't affect the meaning of the
tests
2024-01-10 10:18:45 -07:00
Piotr Osiewicz
282184a673
editor: Use inclusive ranges for git diff resolution. (#3999)
The culprit was in display map which was resolving next valid point for
the editor, without regard for whether that point belongs to the same excerpt. We now make an end point a minimum of the end point passed in and the start of excerpt header, if there are any. 
This bug existed in Zed1 as well.

Fixes: Diff markers in multibuffer search overlap with dividers between
excepts (shouldn't extend all the way into the divider region)


Release Notes:
- Fixed diff markers being drawn incorrectly near headers in multibuffer
views.
2024-01-10 18:11:05 +01:00
Conrad Irwin
f16331a331
Remove ChannelsAlpha flag (#4001)
Welcome to the party!

[[PR Description]]

Release Notes:

- Added Channels for structured real-time collaboration (TODO: link)
2024-01-10 10:02:52 -07:00
Conrad Irwin
5dff458014
Ensure focus_in and focus_out fire on window activation (#3993)
Also:
- Rename cx.on_blur to cx.on_focus_lost
- Fix a bug where notify calls in focus handlers were ignored
- Fix a bug where vim would get stuck in the wrong mode when switching
  windows

Release Notes:

- (preview only) vim: fix switching between multiple windows
2024-01-10 10:00:07 -07:00
Conrad Irwin
1c1151a0ed Remove ChannelsAlpha flag
Welcome to the party!
2024-01-10 09:29:44 -07:00
Antonio Scandurra
2923b71f83 Replace WindowContext::notify with WindowContext::refresh 2024-01-10 17:27:02 +01:00
Conrad Irwin
f8e4fd012f collab 0.36.0 2024-01-10 09:26:15 -07:00
Marshall Bowers
a5203364b1
Use the .selected style for buffer search option buttons (#4000)
This PR updates the `IconButton`s used to control the buffer search
options to use the `.selected` state to denote when they are active.
This matches what we are doing in the project search.

This should improve the contrast in certain themes.

Release Notes:

- Improved the active style for the search options in buffer search.
2024-01-10 10:35:06 -05:00
Marshall Bowers
aff119b80a
Fix possessive "its" in docs and comments (#3998)
This PR fixes a number of places where we were incorrectly using "it's"
where we needed to use the possessive "its".

Release Notes:

- N/A
2024-01-10 10:09:48 -05:00
Antonio Scandurra
d0c101cb6e Reuse depth map entries and retain element states for cached trees 2024-01-10 15:00:40 +01:00
Piotr Osiewicz
1c77104050 chore: Enable asset compression
This reduces size of release binary by ~20% from 134MB to 107MB without noticeable slowdown on startup. Assets are decompressed granularly, on first access
2024-01-10 13:54:25 +01:00
Kirill Bulatov
c197ea49ca Simplify uniform list scrolling logic 2024-01-10 13:45:50 +02:00
Kirill Bulatov
f57ff1c660 Make the scroll position updated as soon as possible to the correct deferred value
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2024-01-10 12:16:06 +02:00
Antonio Scandurra
881c532256 Insert primitives associated with views from a previous scene 2024-01-10 10:50:16 +01:00
Kirill Bulatov
927e0db750 An attempt to defer scrolls during empty initial state 2024-01-10 11:26:23 +02:00
Kirill Bulatov
6809b92e34 Disable synthetic drag on drag and drop
Otherwise, conflicting MouseMove events are generated and page regions start to flicker.
2024-01-10 11:18:45 +02:00
Joseph T. Lyons
d3d6b53a74 WIP 2024-01-10 02:05:42 -05:00
Conrad Irwin
3c2ebc3d88
Prototype cursor sharing (the inefficient way) (#3970)
Release Notes:

- Sync guest users' cursor positions
2024-01-09 22:21:24 -07:00
Conrad Irwin
5d3f5611e5
guest promotion (#3969)
Release Notes:

- Adds the ability to promote read-only guests to read-write
participants in calls
2024-01-09 22:21:13 -07:00
Conrad Irwin
2ca462722c Fix some tests (mostly more run_until_parked's...) 2024-01-09 22:14:11 -07:00
Conrad Irwin
8ceb9fd67f
Run migrations on development server start (#3971)
Release Notes:

- N/A
2024-01-09 21:42:30 -07:00
Conrad Irwin
72c022f413 Ensure focus-sensitive tests have active windows 2024-01-09 21:38:06 -07:00
Conrad Irwin
1bf33b4b61 Ensure focus_in and focus_out fire on window activation
Also:
- Rename cx.on_blur to cx.on_focus_lost
- Fix a bug where notify calls in focus handlers were ignored
- Fix a bug where vim would get stuck in the wrong mode when switching
  windows
2024-01-09 20:55:00 -07:00