Commit Graph

723 Commits

Author SHA1 Message Date
Bennet Bo Fenner
dd74643993
gpui: Support loading image from filesystem (#6978)
This PR implements support for loading and displaying images from a
local file using gpui's `img` element.

API Changes:
- Changed `SharedUrl` to `SharedUrl::File`, `SharedUrl::Network`

Usage:
```rust
// load from network
img(SharedUrl::network(...)) // previously img(SharedUrl(...)

// load from filesystem
img(SharedUrl::file(...))
```

This will be useful when implementing markdown image support, because we
need to be able to render images from the filesystem (relative/absolute
path), e.g. when implementing markdown preview #5064.

I also added an example `image` to the gpui crate, let me know if this
is useful. Showcase:
<img width="872" alt="image"
src="https://github.com/zed-industries/zed/assets/53836821/b4310a26-db81-44fa-9a7b-61e7d0ad4349">

**Note**: The example is fetching images from [Lorem
Picsum](https://picsum.photos) ([Github
Repo](https://github.com/DMarby/picsum-photos)), which is a free
resource for fetching images in a specific size. Please let me know if
you're okay with using this in the example.
2024-01-29 21:56:51 -08:00
Marshall Bowers
0cb8b0e451
Clean up Cargo.toml files (#7044)
This PR cleans up some inconsistencies in the `Cargo.toml` files that
were driving me crazy.

Release Notes:

- N/A
2024-01-29 23:47:20 -05:00
Julia
941e838be9 Prevent z-index id shuffle when number of z-indicies in the scene change 2024-01-29 13:08:40 -05:00
Julia
849a1324f7 Fix hovering over elements nested inside their parents
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2024-01-29 13:08:40 -05:00
Piotr Osiewicz
0a0a866dd5
Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535)
Release Notes:
- N/A
2024-01-27 13:51:16 +01:00
Marshall Bowers
c3110d3dce
Rename BellBadged to BellDot (#6820)
This PR renames the `BellBadged` icon to `BellDot` to be a bit clearer
as to what its contents are.

Release Notes:

- N/A
2024-01-26 18:48:16 -05:00
David Rachmaninoff
62365e6a29
Add a badge to the bell icon on new notifications (#6751)
It changes the icon if a new notification event is consumed and changes
it back to normal upon toggling NotificationPanel.

Added a new field to NotificationPanel:
	- have_unseen_notifications: bool

Added a new icon asset
	- IconName::BellBadged => "assets/icons/bell_badged.svg"

Release Notes:

- Added a badge to bell icon for new notifications
([#6721](https://github.com/zed-industries/zed/issues/6721)).
2024-01-26 18:31:17 -05:00
Conrad Irwin
a0f8a2342f Add a hover menu to see who's in a channel
Co-Authored-By: Max <max@zed.dev>
Inspired-By: @RemcoSmitsDev
2024-01-26 12:25:00 -07:00
Conrad Irwin
95fab1037f Make contacts use right click menu for call
Fixes accidental anxiety.

Co-Authored-By: Max <max@zed.dev>
2024-01-26 11:59:57 -07:00
Conrad Irwin
fd5994bc0a Allow people to leave channels
Co-Authored-By: Max <max@zed.dev>
2024-01-26 11:38:13 -07:00
Conrad Irwin
8bc105ca1d
Simplify Membership Management (#6747)
Simplify Zed's collaboration system by:
- Only allowing member management on root channels.
- Disallowing moving sub-channels between different roots.
- Disallowing public channels nested under private channels.

This should make the mental model easier to understand, and makes it
clearer
who has what access. It is also significantly simpler to implement, and
so
hopefully more performant and less buggy.

Still TODO:
- [x] Update collab_ui to match.
- [x] Fix channel buffer tests.

Release Notes:

- Simplified channel membership management.
2024-01-26 11:17:16 -07:00
Conrad Irwin
08de0d88b1 Update channel moving to match 2024-01-26 10:07:51 -07:00
Conrad Irwin
c6d33d4bb9 Only allow Manage Members on root channels 2024-01-26 09:40:41 -07:00
Conrad Irwin
4b672621d3 Aggressively simplify channel permissions:
- Only allow setting permissions on the root channel
- Only allow public channels to be children of public channels
2024-01-25 23:26:32 -07:00
Conrad Irwin
716221cd38 Simplify handling of syncing versions
Currently whenever a channel changes we send a huge amount of data to
each member. This is the first step in reducing that

Co-Authored-By: Max <max@zed.dev>
Co-Authored-By: bennetbo <bennetbo@gmx.de>
2024-01-25 15:41:53 -07:00
Marshall Bowers
6103f67875
Make follower avatars smaller (#6724)
This PR makes the avatars of followers in a facepile smaller than the
leader's avatar.

<img width="227" alt="Screenshot 2024-01-25 at 1 42 14 PM"
src="https://github.com/zed-industries/zed/assets/1486634/defc22b4-4ae1-4d63-a0d8-53e3ca8cce04">

Release Notes:

- Adjusted the size of follower avatars to be smaller than the leader.

Co-authored-by: Conrad <conrad@zed.dev>
2024-01-25 13:53:50 -05:00
Conrad Irwin
01424a62ea Allow prompts to have detail, and use for good
Make channel panel errors louder
2024-01-24 23:15:37 -07:00
Julia
569bb687be
Prevent channel from vertically growing when containing facepile (#6439)
Previously at UI font size of 20
 - User-less channel: 28 px tall
 - Occupied channel: 30 px tall
 
Now, still at UI font size 20:
 - User-less channel: 30 px tall
 - Occupied channel: 30 px tall

Release Notes:

- Fixed an issue where a channel would grow in height while showing
participant avatars.
2024-01-24 16:17:25 -05:00
Julia
9bc968eabb Prevent channel from vertically growing when containing facepile 2024-01-24 15:57:12 -05:00
Conrad Irwin
4ac3095a15
chat mentions for newly joined users (#5099)
Release Notes:

- Added chat mentions for everyone in the call
2024-01-24 13:33:23 -07:00
Conrad Irwin
2a11c22760 Ensure chat opens when guests join shared projects
This was broken because the panel was created before being added to a
dock. Invert the control order and add `starts_open()` to the Panel
trait.
2024-01-24 12:06:03 -07:00
Conrad Irwin
e072c96003 Fix tests 2024-01-24 11:35:10 -07:00
Conrad Irwin
c5ad1728f9 Clippy 2024-01-24 11:18:17 -07:00
Conrad Irwin
c1df166700 Allow completions of everyone in the call 2024-01-24 10:51:46 -07:00
Max Brunsfeld
c81d318098 Start work on allowing mentions for all users in call 2024-01-24 09:45:26 -08:00
Mikayla Maki
be4d314858
Revert "Improve completion, action and shared project popovers' layout" (#4233)
Reverts zed-industries/zed#4226

Unfortunately there where some worse states possible after this PR.
Reverting until after the launch, as the problems it addresses are still
bad.

![Screenshot 2024-01-23 at 3 20
59 PM](https://github.com/zed-industries/zed/assets/2280405/d25ab0d5-db49-44cb-b865-e320a97616ce)
2024-01-23 15:34:48 -08:00
Piotr Osiewicz
f2ff7fa4d5
chore: Change AGPL-licensed crates to GPL (except for collab) (#4231)
- [x] Fill in GPL license text.
- [x] live_kit_client depends on live_kit_server as non-dev dependency,
even though it seems to only be used for tests. Is that an issue?

Release Notes:
- N/A
2024-01-24 00:26:58 +01:00
Mikayla Maki
9f6072c6b6
Revert "Improve completion, action and shared project popovers' layout" 2024-01-23 15:26:11 -08:00
Kirill Bulatov
cad6bab48e Fix sharing project notification size 2024-01-23 21:44:18 +02:00
Piotr Osiewicz
21e6b09361
Remove license-file from Cargo.toml as it is apparently redundant (#4218)
Release Notes:

- N/A
2024-01-23 17:40:30 +01:00
Piotr Osiewicz
678bdddd7d
chore: Add crate licenses. (#4158)
- GPUI and all dependencies: Apache 2
- Everything else: AGPL

Here's a script that I've generated for it:
https://gist.github.com/osiewicz/6afdd6626e517da24a2092807e6f0b6e

Release Notes:
- N/A

---------

Co-authored-by: David <david@zed.dev>
2024-01-23 16:56:22 +01:00
Conrad Irwin
a9ddef8227 Update Channel membership UI
* Remove ability to act on people defined in parent channels
* Show promote buttons on guests
2024-01-22 14:48:14 -07:00
Julia
2c3d9805a4 Store a z-index id per-layer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2024-01-22 10:16:59 -05:00
Joseph T. Lyons
24f6c434cf Dont group messages after certain period of time 2024-01-21 16:08:41 -05:00
Joseph T. Lyons
4580172edb Fix chat timestamps 2024-01-21 15:15:17 -05: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
29ac1fd081 Merge remote-tracking branch 'origin/main' into chat-font-size 2024-01-20 14:51:53 -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
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
4fb3e6d812 Ensure editors context menus get at least 3 lines of height 2024-01-19 15:47:42 -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
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
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
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
Kirill Bulatov
070de14a6b Show channel rename keybinding in the context menu 2024-01-19 11:23:05 +02: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