Commit Graph

17222 Commits

Author SHA1 Message Date
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
Nate Butler
ed67363ea3
Update README.md
FIx typos
2024-01-17 13:24:05 -05:00
Nate Butler
c4ba5ef03f
Update Readme & building Zed doc (#4094)
This PR cleans out the README.md, moves most relevant build details to
`docs/src/developing_zed__building_zed.md`.

It also restructures and cleans up the Building Zed doc.

There are a number of outstanding TODOs to have this doc be ready for
external folks to be able to build Zed.

Release Notes:

- N/A
2024-01-17 13:23:09 -05:00
Nate Butler
d0f22df1eb Reorganize building zed doc
Co-Authored-By: Joseph T. Lyons <19867440+JosephTLyons@users.noreply.github.com>
2024-01-17 13:20:27 -05:00
Nate Butler
29df128d31
Add CONTRIBUTING.md (#3656)
Written by @iamnbutler 

This PR adds a basic CONTRIBUTING.md. It has a few links that need to be
added, which we marked as coming soon.

Here are a number of follow up tasks we need to do:

- [ ] Add CLA link
- [ ] Add public roadmap link
- [ ] Add link to channels doc once it is up
- [ ] Add link explaining how to find a channel related to your
contribution or or to create one

Release Notes:

- N/A
2024-01-17 13:12:14 -05:00
Nate Butler
b64ae4df9c Update developing zed doc
Co-Authored-By: Joseph T. Lyons <19867440+JosephTLyons@users.noreply.github.com>
2024-01-17 13:09:13 -05:00
Nate Butler
9415f098d7 Clean out old readme contents
Co-Authored-By: Joseph T. Lyons <19867440+JosephTLyons@users.noreply.github.com>
2024-01-17 13:09:02 -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
Nate Butler
904695e482 Refine MVP CONTRIBUTING.md
Co-Authored-By: Joseph T. Lyons <19867440+JosephTLyons@users.noreply.github.com>
2024-01-17 12:32:08 -05: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
Thorsten Ball
21ceb14f65
Remove memmove to improve terminal performance (#4088)
This removes the terminal performance slightly by removing memmoves that
aren't needed after inlining a call.

It also removes a possibly unnecessary `String` allocation.

Release Notes:

- Improved terminal rendering performance by reducing allocations and
memory operations.
2024-01-17 15:43:29 +01: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
Antonio Scandurra
79679cb616
Submit bigger primitive batches when rendering (#4087)
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.

Release Notes:

- Improved performance when rendering lots of selection.
2024-01-17 15:00:47 +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
f6b7a06199
Fix missing Ctrl-[ bindings in Vim mode (#4086)
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-[`.

Release Notes:

- Fixed missing `Ctrl-[` keybindings in Vim mode where `Ctrl-[` should
act like `Esc` but didn't.
2024-01-17 12:26:47 +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
3789e7ebcc
Stop using button for collab notifications (#4085)
Attempts to fix 
<img width="472" alt="Screenshot 2024-01-16 at 19 41 56"
src="https://github.com/zed-industries/zed/assets/2690773/5a8d0691-eabb-4e92-9186-362ca8ef9ca6">

by switching from buttons to labels (so that they can wrap) and adding a
background to them, so they are more visible

<img width="446" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/bb228aae-0abc-45b4-a0f5-a928a2e64390">
<img width="485" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/b7fa3598-59b8-4a74-97e6-790695e37047">


Release Notes:

- N/A
2024-01-17 11:17:37 +02: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
9cd81ad255
Do not reset timer for each reported event (#4079)
Always attempt to flush after the timeout period.

Release Notes:

- N/A
2024-01-16 18:44:02 -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