Commit Graph

830 Commits

Author SHA1 Message Date
Marshall Bowers
22fe03913c
Move Clippy configuration to the workspace level (#8891)
This PR moves the Clippy configuration up to the workspace level.

We're using the [`lints`
table](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table)
to configure the Clippy ruleset in the workspace's `Cargo.toml`.

Each crate in the workspace now has the following in their own
`Cargo.toml` to inherit the lints from the workspace:

```toml
[lints]
workspace = true
```

This allows for configuring rust-analyzer to show Clippy lints in the
editor by using the following configuration in your Zed `settings.json`:

```json
{
  "lsp": {
    "rust-analyzer": {
      "initialization_options": {
        "check": {
          "command": "clippy"
        }
      }
    }
  }
```

Release Notes:

- N/A
2024-03-05 12:01:17 -05:00
Conrad Irwin
27c5343707
hosted projects (#8627)
- **Allow joining a hosted project**

You can't yet do anything in a hosted project, but you can join it and
look how empty it is.

Release Notes:

- N/A
2024-03-04 19:17:40 -07:00
Conrad Irwin
f53823c840
Remove release channel from Zed URLs (#8863)
Also adds a new command `cli: Register Zed Scheme` that will cause URLs
to be opened in the current zed version, and we call this implicitly if
you install the CLI

Also add some status reporting to install cli

Fixes: #8857



Release Notes:

- Added success/error reporting to `cli: Install Cli`
([#8857](https://github.com/zed-industries/zed/issues/8857)).
- Removed `zed-{preview,nightly,dev}:` url schemes (used by channel
links)
- Added `cli: Register Zed Scheme` to control which zed handles the
`zed://` scheme (defaults to the most recently installed, or
the version that you last used `cli: Install Cli` with)
2024-03-04 16:08:47 -07:00
Marshall Bowers
fe04f69caf
Enable clippy::useless_conversion (#8767)
This PR enables the
[`clippy::useless_conversion`](https://rust-lang.github.io/rust-clippy/master/index.html#/useless_conversion)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-03 10:22:55 -05:00
Marshall Bowers
33790b81fc
Enable clippy::useless_format (#8758)
This PR enables the
[`clippy::useless_format`](https://rust-lang.github.io/rust-clippy/master/index.html#/useless_format)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-02 23:31:58 -05:00
Marshall Bowers
191fcf67d1
Enable clippy::nonminimal_bool (#8755)
This PR enables the
[`clippy::nonminimal_bool`](https://rust-lang.github.io/rust-clippy/master/index.html#/nonminimal_bool)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-02 22:57:37 -05:00
Marshall Bowers
2f876471a1
Enable clippy::extra_unused_lifetimes (#8754)
This PR enables the
[`clippy::extra_unused_lifetimes`](https://rust-lang.github.io/rust-clippy/master/index.html#/extra_unused_lifetimes)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-02 22:43:00 -05:00
Marshall Bowers
ea68f86476
Enable clippy::option_map_unit_fn (#8751)
This PR enables the
[`clippy::option_map_unit_fn`](https://rust-lang.github.io/rust-clippy/master/index.html#/option_map_unit_fn)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-02 22:08:37 -05:00
Marshall Bowers
3e287911c3
Enable clippy::unnecessary_find_map (#8740)
This PR enables the
[`clippy::unnecessary_find_map`](https://rust-lang.github.io/rust-clippy/master/index.html#/unnecessary_find_map)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-02 20:39:03 -05:00
Marshall Bowers
f79f56f8b4
Enable clippy::unnecessary_filter_map (#8738)
This PR enables the
[`clippy::unnecessary_filter_map`](https://rust-lang.github.io/rust-clippy/master/index.html#/unnecessary_filter_map)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-02 20:16:54 -05:00
Marshall Bowers
fc8e515fe8
Enable clippy::too_many_arguments (#8734)
This PR enables the
[`clippy::too_many_arguments`](https://rust-lang.github.io/rust-clippy/master/index.html#/too_many_arguments)
rule.

I opted to add `#[allow(clippy::too_many_arguments)]` on the individual
violations, as reworking them to take fewer arguments is a more involved
task.

Release Notes:

- N/A
2024-03-02 18:42:05 -05:00
Marshall Bowers
eaf2fbb21b
Enable clippy::map_flatten (#8733)
This PR enables the
[`clippy::map_flatten`](https://rust-lang.github.io/rust-clippy/master/index.html#/map_flatten)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-02 18:24:22 -05:00
Marshall Bowers
9735912965
Enable clippy::clone_on_copy (#8728)
This PR enables the
[`clippy::clone_on_copy`](https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_copy)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-02 17:37:48 -05:00
Marshall Bowers
5935681c5c
Enable clippy::single_char_pattern (#8727)
This PR enables the
[`clippy::single_char_pattern`](https://rust-lang.github.io/rust-clippy/master/index.html#/single_char_pattern)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-02 17:04:59 -05:00
Marshall Bowers
ca2cda8d2a
Remove unneeded 'static lifetimes on &strs in constants (#8698)
This PR removes unneeded `'static` lifetimes on `&str`s stored in
`const` declarations.

This addresses some Clippy lints about
[`redundant_static_lifetimes`](https://rust-lang.github.io/rust-clippy/master/index.html#/redundant_static_lifetimes).

In item-level `const` declarations we can rely on lifetime elision and
use the default `'static` lifetime.

Note that associated constants still require an explicit `'static`
lifetime, as explained in
https://github.com/rust-lang/rust/issues/115010.

Release Notes:

- N/A
2024-03-02 00:40:49 -05:00
Nathan Sobo
4cc4f08a53
Remove ! from todo!() in comments (#8643)
This practice makes it difficult to locate todo!s in my code when I'm
working. Let's take out the bang if we want to keep doing this.

Release Notes:

- N/A
2024-02-29 18:19:05 -07:00
Conrad Irwin
b3b94e64ba
Ensure panel and pane sizes are integral (#8619)
Fixes: #8050

For some reason that we didn't investigate, if you have view caching
enabled,
and you have non-integer sized bounds, and you are right aligning
things, the
co-ordinates can differ by +/- 1px when using the cached view.

The easiest fix for now is to just not do that.

Co-Authored-By: Antonio <as-cii@zed.dev>

Release Notes:

- Fixed the pane icons flickering
([#8050](https://github.com/zed-industries/zed/issues/8050)).

Co-authored-by: Antonio <as-cii@zed.dev>
2024-02-29 09:16:42 -07:00
Conrad Irwin
c31626717f
channel projects (#8456)
Add plumbing for hosted projects. This will currently show them if they
exist
but provides no UX to create/rename/delete them.

Also changed the `ChannelId` type to not auto-cast to u64; this avoids
type
confusion if you have multiple id types.


Release Notes:

- N/A
2024-02-26 22:15:11 -07:00
Dzmitry Malyshau
a44fc24445
Clean up many small dependencies (part 3) (#8425)
Follow-up to #8353

Release Notes:
- N/A
2024-02-26 11:08:57 +02:00
Kirill Bulatov
c29ea9bdbc Allow using context in the placeholder_text method 2024-02-25 00:08:57 +02:00
Bennet Bo Fenner
dc7e14f888
Respect user preferences when formatting timestamp (#7994)
This is a follow up to #7945. The current behaviour reads the locale and
infers from that which type of time format should be used (12 hour/24
hour).
However, in macOS you can override this behaviour, e.g. you can use
en_US locale but still use the 24 hour clock format (Can be customized
under Settings > General > Date & Format > 24-hour time). You can even
customize the date format.

This PR uses the macOS specific `CFDateFormatter` API, which outputs
time format strings, that respect those settings.

Partially fixes #7956 (as its not implemented for linux)

Release Notes:

- Added localization support for all macOS specific date and time
configurations in chat
2024-02-23 19:18:06 -07:00
Bennet Bo Fenner
c90065e6ea
chat: add copy text entry to message menu (#8271)
As we don't have selection inside the chat right now (which might be
complicated to implement, e.g. cross element selection and markdown
blocks), I think its viable to support copying the whole text of a
message using the message menu:

![image](https://github.com/zed-industries/zed/assets/53836821/6092dfed-0297-457e-9455-ba1e6190e288)

Release Notes:

- Added option to copy the text of a message within the chat
2024-02-23 08:00:20 -07:00
Marshall Bowers
0de8672044
Add SystemClock (#8239)
This PR adds a `SystemClock` trait for abstracting away the system
clock.

This allows us to swap out the real system clock with a
`FakeSystemClock` in the tests, thus allowing the fake passage of time.

We're using this in `Telemetry` to better mock the clock for testing
purposes.

Release Notes:

- N/A
2024-02-22 22:28:08 -05:00
Conrad Irwin
250df707bf
Tidy up indicators in collab panel (#8214)
Move away from columns of icons towards the "changed" info dot we used
for files.

Secondary actions for chat/notes still show up (if you're lucky) on
hover.

Co-Authored-By: Marshall <marshall@zed.dev>



Release Notes:

- Improved design of collab panel

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-02-22 13:30:43 -05:00
Conrad Irwin
c6826a61a0
talkers (#8158)
Release Notes:

- Added an "Unmute" action for guests in calls. This lets them use the
mic, but not edit projects.
2024-02-22 10:07:36 -07:00
Ngô Quốc Đạt
95d5ea7edc
Add "Extensions" item to user menu (#8183)
<img width="274" alt="Screenshot 2024-02-22 at 18 12 52"
src="https://github.com/zed-industries/zed/assets/56961917/9057d1be-bedb-474a-a663-c53d62366f26">

Release Note:

- Add "Extensions" menu item to the UI
2024-02-22 14:01:20 +02:00
Bennet Bo Fenner
49a53e7654
titlebar: show placeholder when no project is selected (#8021)
When no project is selected, the recent project dropdown is displaying
an empty string, making the button basically impossible to click. This
PR adds a placeholder value for that case.

Here is what it looks like now:

![image](https://github.com/zed-industries/zed/assets/53836821/c831a1eb-722e-4189-8f8b-8b3039daf8f8)



Release Notes:

- Added placeholder to titlebar when no project is selected
2024-02-21 14:08:20 -07:00
Bennet Bo Fenner
3ef8a9910d
chat: auto detect links (#8028)
@ConradIrwin here's our current implementation for auto detecting links
in the chat.
We also fixed an edge case where the close reply to preview button was
cut off (rendered off screen).

Release Notes:

- Added auto detection for links in the chat panel.

---------

Co-authored-by: Remco Smits <62463826+RemcoSmitsDev@users.noreply.github.com>
2024-02-19 21:49:47 -07:00
Remco Smits
aad7761038
Add an indicator to the channel chat to see all the messages that you missed (#7781)
This pull requests add the following features:
- Show indicator before first unseen message
- Scroll to last unseen message

<img width="241" alt="Screenshot 2024-02-14 at 18 10 35"
src="https://github.com/zed-industries/zed/assets/62463826/ca396daf-7102-4eac-ae50-7d0b5ba9b6d5">


https://github.com/zed-industries/zed/assets/62463826/3a5c4afb-aea7-4e7b-98f6-515c027ef83b

### Questions: 
1. Should we hide the indicator after a couple of seconds? Now the
indicator will hide when you close/reopen the channel chat, because when
the last unseen channel message ID is not smaller than the last message
we will not show it.

Release Notes:
- Added unseen messages indicator for the channel chat.
2024-02-19 19:20:02 -07:00
Bennet Bo Fenner
c33efe8cd0
recent projects: cleanup ui (#7528)
As the ui for the file finder was recently changed in #7364, I think it
makes sense to also update the ui of the recent projects overlay.

Before:

![image](https://github.com/zed-industries/zed/assets/53836821/8a0f5bef-9b37-40f3-a974-9dfd7833cc71)

After:

![image](https://github.com/zed-industries/zed/assets/53836821/7e9f934a-1ac3-4716-b7b6-67a7435f3bde)


Release Notes:

- Improved UI of recent project overlay
2024-02-19 14:37:52 +02:00
evrsen
98ffdca32e
Add locale-based time formatting in the chat panel (#7945)
This commit addresses the issue of time formats displayed in the chat
panel. Previously, the time was always displayed in a 12-hour format,
regardless of the user's locale. The `format_timestamp` function has
been updated to check the system locale and format the time accordingly.


Release Notes:
- Fixed time formatting in the chat panel to be locale based.
2024-02-17 08:44:28 -07:00
Conrad Irwin
43e8fdbe82
Fix a missing follower update on re-activate (#7918)
This could cause following to get into a bad state temporarily

Release Notes:

- Fixed a bug around following if the follow started while the workspace
was inactive.
2024-02-16 11:33:49 -07:00
Marshall Bowers
4310b0b8de
Replace full with size_full (#7888)
This PR removes the `full` style method and replaces it with
`size_full`, as the two do the same thing.

This is the generated code for `size_full`:

```rs
#[doc = "Sets the width and height of the element.\n\n100%"]
fn size_full(mut self) -> Self {
    let style = self.style();
    style.size.width = Some((gpui::relative(1.)).into());
    style.size.height = Some((gpui::relative(1.)).into());
    self
}
```

Release Notes:

- N/A
2024-02-15 22:26:49 -05:00
Marshall Bowers
ef551cedef
Add CheckboxWithLabel component (#7881)
This PR builds on top of #7878 by adding a general-purpose
`CheckboxWithLabel` component to use for checkboxes that have attached
labels.

This component encompasses the functionality of allowing to click on the
label to toggle the value of the checkbox.

There was only one other occurrence of a checkbox with a label—the
"Public" checkbox in the channel management modal—and this has been
updated to use `CheckboxWithLabel`.

Resolves #7794.

Release Notes:

- Added support for clicking the label of the "Public" checkbox in the
channel management modal to toggle the value
([#7794](https://github.com/zed-industries/zed/issues/7794)).
2024-02-15 21:00:30 -05:00
Conrad Irwin
2294d99046
revert single channel click (#7738)
- Revert "collab tweaks (#7706)"
- Revert "2112 (#7640)"
- Revert "single click channel (#7596)"
- Reserve protobufs
- Don't revert migrations

Release Notes:

- N/A

**or**

- N/A
2024-02-13 12:53:49 -07:00
Conrad Irwin
21d2b5fe50
collab tweaks (#7706)
- Don't leave call when clicking on channel
- Don't prompt to leave a call you're not in

Release Notes:

- N/A
2024-02-12 16:08:35 -07:00
Conrad Irwin
0304edd8ab
2112 (#7640)
It's still slow, but should now work reliably

Release Notes:

- N/A
2024-02-09 18:33:28 -07:00
Conrad Irwin
efe23ebfcd
single click channel (#7596)
- Open channel notes and chat on channel click
- WIP
- Fix compile error
- Don't join live kit until requested
- Track in_call state separately from in_room



Release Notes:

- Improved channels: you can now be in a channel without joining the
audio call automatically

**or**

- N/A

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2024-02-09 14:18:27 -07:00
Bennet Bo Fenner
ef8cab65b0 allow closing reply to preview with action
Co-Authored-By: Remco Smits <62463826+RemcoSmitsDev@users.noreply.github.com>
2024-02-07 21:14:36 +01:00
Marshall Bowers
c322179bb9
Initialize the SystemAppearance using the app's global window appearance (#7508)
This PR changes our approach to initializing the `SystemAppearance` so
that we can do it earlier in the startup process.

Previously we were using the appearance from the window, meaning that we
couldn't initialize the value until we first opened the window.

Now we read the `window_appearance` from the `AppContext`. On macOS this
is backed by the
[`effectiveAppearance`](https://developer.apple.com/documentation/appkit/nsapplication/2967171-effectiveappearance)
on the `NSApplication`.

We currently still watch for changes to the appearance at the window
level, as the only hook I could find in the documentation is
[`viewDidChangeEffectiveAppearance`](https://developer.apple.com/documentation/appkit/nsview/2977088-viewdidchangeeffectiveappearance),
which is at the `NSView` level.

In my testing this makes it so Zed appropriately chooses the correct
light/dark theme on startup.

Release Notes:

- N/A
2024-02-07 11:51:18 -05:00
Kieran Gill
ad3940c66f
text rendering: support strikethroughs (#7363)
<img width="1269" alt="image"
src="https://github.com/zed-industries/zed/assets/18583882/d4c93033-b2ac-4ae0-8e12-457f256ee869">

Release Notes:

- Added support for styling text with strikethrough.

Related: 
- https://github.com/zed-industries/zed/issues/5364
- https://github.com/zed-industries/zed/pull/7345
2024-02-07 16:51:27 +02:00
Remco Smits
6c4b96ec76
Add the ability to reply to a message (#7170)
Feature
- [x] Allow to click on reply to go to the real message
    - [x] In chat
- [x] Show only a part of the message that you reply to
    - [x] In chat
    - [x] In reply preview

TODO’s
- [x] Fix migration
    - [x] timestamp(in filename)
    - [x] remove the reference to the reply_message_id
- [x] Fix markdown cache for reply message
- [x] Fix spacing when first message is a reply to you and you want to
reply to that message.
- [x] Fetch message that you replied to
    - [x] allow fetching messages that are not inside the current view 
- [x] When message is deleted, we should show a text like `message
deleted` or something
    - [x] Show correct GitHub username + icon after `Replied to: `
    - [x] Show correct message(now it's hard-coded)
- [x] Add icon to reply + add the onClick logic
- [x] Show message that you want to reply to
  - [x] Allow to click away the message that you want to reply to
  - [x] Fix hard-coded GitHub user + icon after `Reply tp:`
  - [x] Add tests

<img width="242" alt="Screenshot 2024-02-06 at 20 51 40"
src="https://github.com/zed-industries/zed/assets/62463826/a7a5f3e0-dee3-4d38-95db-258b169e4498">
<img width="240" alt="Screenshot 2024-02-06 at 20 52 02"
src="https://github.com/zed-industries/zed/assets/62463826/3e136de3-4135-4c07-bd43-30089b677c0a">


Release Notes:

- Added the ability to reply to a message.
- Added highlight message when you click on mention notifications or a
reply message.

---------

Co-authored-by: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-02-06 13:22:54 -07:00
Piotr Osiewicz
743f9b345f
chore: Move workspace dependencies to workspace.dependencies (#7454)
We should prefer referring to local deps via `.workspace = true` from
now on.

Release Notes:

- N/A
2024-02-06 20:41:36 +01:00
Marshall Bowers
0b2a9d2bea
Remove empty message editor placeholder (#7444)
This PR removes the placeholder that we previously displayed for the
chat message editor.

With the changes in #7441 we can no longer hit this codepath.

Release Notes:

- N/A
2024-02-06 11:37:08 -05:00
Marshall Bowers
56f7f18033
Hide the chat message editor when there is no active chat (#7441)
This PR makes it so the chat message editor is hidden when not in an
active chat.

Release Notes:

- Changed the chat message editor to be hidden when not in an active
chat.
2024-02-06 10:18:17 -05:00
Conrad Irwin
0c34bd8935
fix following bugs (#7406)
- Another broken following test
- Fix following between two windows

Release Notes:

- Fixed following when the leader has multiple Zed windows open
2024-02-05 15:12:25 -07:00
Marshall Bowers
a80a3b8706
Add support for specifying both light and dark themes in settings.json (#7404)
This PR adds support for configuring both a light and dark theme in
`settings.json`.

In addition to accepting just a theme name, the `theme` field now also
accepts an object in the following form:

```jsonc
{
  "theme": {
    "mode": "system",
    "light": "One Light",
    "dark": "One Dark"
  }
}
```

Both `light` and `dark` are required, and indicate which theme should be
used when the system is in light mode and dark mode, respectively.

The `mode` field is optional and indicates which theme should be used:
- `"system"` - Use the theme that corresponds to the system's
appearance.
- `"light"` - Use the theme indicated by the `light` field.
- `"dark"` - Use the theme indicated by the `dark` field.

Thank you to @Yesterday17 for taking a first stab at this in #6881!

Release Notes:

- Added support for configuring both a light and dark theme and
switching between them based on system preference.
2024-02-05 15:39:01 -05:00
Conrad Irwin
1f6bd6760f
Fix main (#7293)
Release Notes:

- N/A
2024-02-02 12:21:45 -05:00
Conrad Irwin
074acacdf7
Do more on channel join (#7268)
This change makes it so that if you are the first to join a channel,
your project is automatically shared.

It also makes it so that if you join a channel via a link and there are
no shared projects, you open the notes instead of an empty workspace
with nothing.

This is to try and address the discoverability of project sharing: we've
had
two reviews that have talked about channels, but not talked about
sharing
projects into them, which makes me suspect they didn't know about the
feature.

Release Notes:

- Added a setting `share_on_join` (defaulting to true). When set, and
you join an empty channel, your project is automatically shared.
2024-02-02 09:52:30 -07:00
Bennet Bo Fenner
cf4f3ed79a
Fix padding for notes label (#7280)
Fixes the padding of the "notes" button in collab-ui. I'm not sure why
the previous code used `div().h_7().w_full()`. Am I missing something
here?

### Before
![Screenshot 2024-02-02 at 15 26
44](https://github.com/zed-industries/zed/assets/53836821/0577b706-b433-4e02-802b-b6eccefb3acd)

### After
![Screenshot 2024-02-02 at 15 27
26](https://github.com/zed-industries/zed/assets/53836821/00fd81d8-82a1-4936-829c-022554259fd5)



Release Notes:
- Fixed padding of the "notes" button in the collaboration panel.

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-02-02 11:04:43 -05:00
Conrad Irwin
69e0ea92e4
Links to channel notes (#7262)
Release Notes:

- Added outline support for Markdown files
- Added the ability to link to channel notes:
https://zed.dev/channel/zed-283/notes#Roadmap
2024-02-01 22:22:02 -07:00
Kieran Gill
8bafc61ef5
Add initial markdown preview to Zed (#6958)
Adds a "markdown: open preview" action to open a markdown preview.

https://github.com/zed-industries/zed/assets/18583882/6fd7f009-53f7-4f98-84ea-7dd3f0dd11bf


This PR extends the work done in `crates/rich_text` to render markdown
to also support:

- Variable heading sizes
- Markdown tables
- Code blocks
- Block quotes

## Release Notes

- Added `Markdown: Open preview` action to partially close
([#6789](https://github.com/zed-industries/zed/issues/6789)).

## Known issues that will not be included in this PR

- Images.
- Nested block quotes.
- Footnote Reference.
- Headers highlighting.
- Inline code highlighting (this will need to be implemented in
`rich_text`)
- Checkboxes (`- [ ]` and `- [x]`)
- Syntax highlighting in code blocks.
- Markdown table text alignment.
- Inner markdown URL clicks
2024-02-01 11:03:09 +02:00
Conrad Irwin
3025e5620d
Tell the user when screen-sharing fails (#7171)
Release Notes:

- Added an alert when screen-sharing fails
2024-01-31 16:28:32 -07:00
Marshall Bowers
e338f34097
Sort dependencies in Cargo.toml files (#7126)
This PR sorts the dependency lists in our `Cargo.toml` files so that
they are in alphabetical order.

This should make them easier to visually scan when looking for a
dependency.

Apologies in advance for any merge conflicts 🙈 

Release Notes:

- N/A
2024-01-30 21:41:29 -05:00
Remco Smits
30b9cef5ba
Improve mention visibility by adding a background color (#7014)
When the chat if going fast, It's hard to see who is mentioning you, so
this feature will make it more clear by the UI instead of needing to
read all the messages.

<img width="242" alt="Screenshot 2024-01-29 at 21 19 07"
src="https://github.com/zed-industries/zed/assets/62463826/65ec307d-5027-4ead-9568-854fc746c822">

Release Notes:

- Added background to messages that mention you.
2024-01-30 09:58:36 -08:00
Marshall Bowers
2980f0508c
Rework loading images from files (#7088)
This PR is a follow-up to #7084, where I noted that I wasn't satisfied
with using `SharedUri` to represent both URIs and paths on the local
filesystem:

> I'm still not entirely happy with this naming, as the file paths that
we can store in here are not _really_ URIs, as they are lacking a
protocol.
>
> I want to explore changing `SharedUri` / `SharedUrl` back to alway
storing a URL and treat local filepaths differently, as it seems we're
conflating two different concerns under the same umbrella, at the
moment.

`SharedUri` has now been reverted to just containing a `SharedString`
with a URI.

`ImageSource` now has a new `File` variant that is used to load an image
from a `PathBuf`.

Release Notes:

- N/A
2024-01-30 11:26:02 -05:00
Marshall Bowers
6c7893db35
Rename SharedUrl to SharedUri (#7084)
This PR renames `SharedUrl` to `SharedUri` to better reflect its intent.

I'm still not entirely happy with this naming, as the file paths that we
can store in here are not _really_ URIs, as they are lacking a protocol.

I want to explore changing `SharedUri` / `SharedUrl` back to alway
storing a URL and treat local filepaths differently, as it seems we're
conflating two different concerns under the same umbrella, at the
moment.

Release Notes:

- N/A
2024-01-30 09:54:23 -05:00
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