Commit Graph

16674 Commits

Author SHA1 Message Date
Marshall Bowers
74dadd68d2
Clean up references in doc comments (#3983)
This PR cleans up a number of references in doc comments so that
`rustdoc` will link and display them correctly.

Release Notes:

- N/A
2024-01-09 14:48:48 -05:00
Nathan Sobo
00c3afd330
Add documentation to GPUI (#3980)
🍐d with @conrad @mikayla-maki on covering some of the surface area.

Release Notes:

- N/A
2024-01-09 12:10:53 -07:00
Nathan Sobo
42cbd103fb Even more docs
Co-authored-by: Conrad <conrad@zed.dev>
2024-01-09 12:02:12 -07:00
Nathan Sobo
458c672a72 Add more API docs
Co-Authored-By: Conrad <conrad@zed.dev>
2024-01-09 11:16:56 -07:00
Nathan Sobo
59f41acb82 Add a bunch of docs
Co-Authored-By: Conrad <conrad@zed.dev>
Co-Authored-By: Mikayla <mikayla@zed.dev>
2024-01-09 11:02:57 -07:00
Piotr Osiewicz
ab6cd1d93a
chore: cfg(test) a test in rpc. (#3978)
The test in particular should be included in our release binary at
present. :/
Release Notes:

- N/A
2024-01-09 18:00:54 +01:00
Marshall Bowers
824d06e2b2
Remove Default impl for StatusColors (#3977)
This PR removes the `Default` impl for `StatusColors`.

Since we need default light and dark variants for `StatusColors`, we
can't use a single `Default` impl.

Release Notes:

- N/A
2024-01-09 11:31:19 -05:00
Piotr Osiewicz
d374953180
search: Remove newlines from query used for tab_content. (#3976)
Fixes https://github.com/zed-industries/community/issues/2388
Release Notes:

- Fixed tab content of project search overflowing the tab for queries
with newlines.
2024-01-09 17:16:25 +01:00
Marshall Bowers
f0ef63bfa0
gpui: Add SharedUrl type (#3975)
This PR adds a `SharedUrl` type to GPUI.

It's just like a `SharedString`, but for denoting that the contained
value is a URL.

Mainlined from @nathansobo's GPUI blog post:
https://github.com/zed-industries/zed/pull/3968/files#diff-7ee75937e2daf7dd53f71b17698d8bd6d46993d06928d411781b9bd739b5f231R9-R12

Release Notes:

- N/A
2024-01-09 10:55:49 -05:00
Marshall Bowers
fa53353c57
Rename IconElement to just Icon (#3974)
This PR renames the `IconElement` component to just `Icon`.

This better matches the rest of our components, as `IconElement` was the
only one using this naming convention.

The `Icon` enum has been renamed to `IconName` to free up the name.

I was trying to come up with a way that would allow rendering an
`Icon::Zed` directly (and thus make the `IconElement` a hidden part of
the API), but I couldn't come up with a way to do this cleanly.

Release Notes:

- N/A
2024-01-09 10:11:20 -05:00
Piotr Osiewicz
29ed067b26
Add a missing default value to docs (#3973)
Release Notes:

- N/A
2024-01-09 12:20:52 +01:00
Kirill Bulatov
a0f9393c1f
Remove some todo!'s from the code (#3972)
Release Notes:

- N/A
2024-01-09 11:45:09 +02:00
Kirill Bulatov
625c9d8980 Remove some todo!'s 2024-01-09 11:36:36 +02:00
Kirill Bulatov
aa1d2d2f24 Remove dbg! usage from tests 2024-01-09 10:08:27 +02:00
Marshall Bowers
4afa5fb23e
Add stories for collab notifications (#3967)
This PR adds some basic stories for collab notifications to make them
easier to work on:

<img width="1076" alt="Screenshot 2024-01-08 at 9 43 39 PM"
src="https://github.com/zed-industries/zed/assets/1486634/4a0adcfa-1134-49c2-b589-74ac1d52af4c">

I factored out a `CollabNotification` component that defines the general
structure for one of these notifications, and this is the component that
we use in the stories, with representative values passed to it to
simulate the different instances of the notification.

We can't use the actual notification components in the stories due to
their data dependencies.

Release Notes:

- N/A
2024-01-08 21:54:59 -05:00
Marshall Bowers
c40a7f3445
Stop propagation when deploying the context menu for a project panel entry (#3965)
This PR fixes an issue where right-click on any project panel entry
would cause the context menu on the root of the project panel
(introduced in #3954) to deploy.

We need to stop propagation in the handler on the inner project panel
list items so that the click event doesn't bubble up the tree.

Release Notes:

- Fixed an issue where the project panel was always deploying the root
context menu rather than on the clicked item.
2024-01-08 20:51:14 -05:00
Mikayla Maki
6982b4b42e
Fix off by 1 error when computing available key bindings (#3964)
Fixes https://github.com/zed-industries/community/issues/2379

Release Notes:

- Fixed issue where keybindings in some context menus would not show
reliably.
2024-01-08 17:40:43 -08:00
Mikayla
0684369734
Fix off by 1 error when computing available key bindings 2024-01-08 17:30:24 -08:00
Mikayla Maki
435b5ca753
Restore the terminal cursor settings (#3963)
As it says on the tin

Release Notes:

- Restored the terminal cursor's I-beam and pointing hand settings
2024-01-08 16:07:08 -08:00
Mikayla
ec7db3f528
Restore the terminal cursor settings 2024-01-08 16:02:39 -08:00
Mikayla Maki
68e705db5b
Restore the active pane magnification feature (#3961)
As it says on the tin

Release Notes:

- Restored the active pane magnification setting.
2024-01-08 15:58:57 -08:00
Conrad Irwin
ca0c06b577
Fix assets build (#3962)
Release Notes:

- N/A
2024-01-08 16:57:36 -07:00
Conrad Irwin
6f6fa5b79e Fix assets build 2024-01-08 16:53:01 -07:00
Mikayla
51caa74349
Restore the active pane magnification feature 2024-01-08 15:48:31 -08:00
Marshall Bowers
4007b2f72b
Tighten up feedback modal design (#3960)
This PR tightens up the design of the feedback dialog:

<img width="680" alt="Screenshot 2024-01-08 at 6 20 50 PM"
src="https://github.com/zed-industries/zed/assets/1486634/8dc0e687-2459-4ab3-b69f-b610ce067ef1">

<img width="682" alt="Screenshot 2024-01-08 at 6 21 24 PM"
src="https://github.com/zed-industries/zed/assets/1486634/f0730710-16e0-4d61-a919-60874442186a">

Release Notes:

- Improved the design of the feedback dialog.
2024-01-08 18:28:37 -05:00
Conrad Irwin
32cd95674f Push branch before tag 2024-01-08 15:49:03 -07:00
Conrad Irwin
e876262579 collab 0.35.0 2024-01-08 15:47:59 -07:00
Marshall Bowers
fac8ebf2cc
Fix error border color for email input in feedback dialog (#3959)
This PR fixes the border color used when the email input in the feedback
dialog is invalid.

Previously this was hardcoded just to `red` instead of using the
appropriate color from the theme.

<img width="653" alt="Screenshot 2024-01-08 at 5 40 07 PM"
src="https://github.com/zed-industries/zed/assets/1486634/ea01cd76-d661-4512-b668-c82b8d00d84e">

Release Notes:

- Fixed the border color used for the email input in the feedback dialog
when an invalid email is entered.
2024-01-08 17:46:25 -05:00
Conrad Irwin
475d91ace0
guest acls (#3958)
- First pass of real access control
- Check user is host for host-broadcasted project messages
- Only allow read-write users to update buffers

[[PR Description]]

Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2024-01-08 15:45:21 -07:00
Conrad Irwin
59a1648445
Disallow creating files with '..' (#3156)
Release Notes:

- Fixed a crash that could occur when creating files with '..' in the
path
2024-01-08 15:43:57 -07:00
Conrad Irwin
d7c5d29237 Only allow read-write users to update buffers 2024-01-08 15:39:24 -07:00
Conrad Irwin
71149bc7cc Fix relative path opening from project symbols
Co-Authored-By: Max <max@zed.dev>
2024-01-08 15:12:22 -07:00
Piotr Osiewicz
ae6d09b9b2
chore: Extract assets module out of zed crate. (#3957)
This essentially shaves off about 10% off of an incremental build after
project change and potentially more if you're changing stuff like
`welcome` that's very close to the `zed` crate in the dep graph. That's
because macro expansion takes place even in incremental builds it seems?
And zed (lib) + zed (bin) could take up to 4 seconds out of an
incremental build, which is a *lot* in a 10s build. In reality though it
shaves 1 second off of 5 seconds incremental 'welcome'/ 1s off of 10s
'project' builds.

Note that we had `assets` crate in the past (removed in #2575 /cc
@maxbrunsfeld), but this is a bit different, because `assets` is a
dependency of *just* zed and nothing else. We essentially cache macro
expansion results ourselves.

Release Notes:

- N/A
2024-01-08 22:49:14 +01:00
Marshall Bowers
80f204fabb
Style the chat panel message input (#3956)
This PR styles the message input in the chat panel.

<img width="242" alt="Screenshot 2024-01-08 at 4 28 33 PM"
src="https://github.com/zed-industries/zed/assets/1486634/48e83692-878e-4891-8e40-8738cdeb23a8">

Release Notes:

- Improved the styling of the message editor in the chat panel.
2024-01-08 16:45:18 -05:00
Conrad Irwin
c951b4c5fa
Fix prevention of cross-channel joins (#3949)
Co-Authored-By: Max <max@zed.dev>

[[PR Description]]

Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2024-01-08 14:17:44 -07:00
Conrad Irwin
aed97f6c29 Use "test" consistently 2024-01-08 14:07:18 -07:00
Marshall Bowers
667d90180d
Improve chat panel empty states (#3955)
This PR improves the empty states for the chat panel:

- The signed-out state has been updated to match our other signed-out
panel states.
- A new state has been added to account for the case where a user is
signed in but doesn't have an active chat.

Release Notes:

- Improved the design of empty states in the chat panel.
2024-01-08 15:56:52 -05:00
Conrad Irwin
ed76315387 Fix prevention of cross-channel joins
Co-Authored-By: Max <max@zed.dev>
2024-01-08 13:47:27 -07:00
Conrad Irwin
604fcd8f1d No .. paths... 2024-01-08 13:46:08 -07:00
Kirill Bulatov
a2a0628bfc
Show context menu on project panel empty space right click (#3954)
Deals with https://github.com/zed-industries/community/issues/2383

Release Notes:

- Fixed context menu not shown when right clicking empty project panel
space
2024-01-08 22:16:18 +02:00
Kirill Bulatov
35ce34c676 Show context menu on project panel empty space right click 2024-01-08 22:12:40 +02:00
Max Brunsfeld
18b31f1552 Check user is host for host-broadcasted project messages 2024-01-08 12:04:59 -08:00
Kirill Bulatov
7235b3d29f
Clean up outline selections when its modal gets closed (#3953)
Release Notes:

- Fixed outline selections not being cleared on certain modal dismiss
actions
2024-01-08 22:02:22 +02:00
Kirill Bulatov
2ca17bd03e Clean up outline selections when its modal gets closed 2024-01-08 21:52:03 +02:00
Piotr Osiewicz
dd730549df
chore: Fix spurious rebuilds of Zed library and binary (#3952)
Currently when one runs `cargo build` twice without changing anything,
zed lib and binary are gonna get rebuilt every time. I checked out cargo
logs and it turns out we were querying wrong path to `.git/logs/HEAD` in
our build.rs, causing it to rerun on every build and thus marking zed
lib as dirty.

See logs (`CARGO_LOG=cargo::core::compiler::fingerprint=trace cargo
build`):
```
0.501173792s  INFO cargo::core::compiler::fingerprint: fingerprint dirty for zed v0.120.0 (/Users/hiro/Projects/zed/crates/zed)/RunCustomBuild/TargetInner { ..: custom_build_target("build-script-build", "/Users/hiro/Projects/zed/crates/zed/build.rs", Edition2021) }
0.501180417s  INFO cargo::core::compiler::fingerprint:     dirty: FsStatusOutdated(StaleItem(MissingFile("/Users/hiro/Projects/zed/crates/zed/.git/logs/HEAD")))
```
The path to .git directory is relative to crates/zed and not to the
workspace's root.

/cc @maxbrunsfeld 

Release Notes:
- N/A
2024-01-08 20:46:35 +01:00
Marshall Bowers
8214a7f656
Fix inconsistent sizing between the buffer search and the project search (#3951)
This PR fixes the inconsistent sizing between the buffer search and the
project search when both elements have both a primary and secondary item
shown in the toolbar.

Release Notes:

- Fixed some inconsistent sizing in the buffer search and project search
when both have two rows of tools in the toolbar.
2024-01-08 14:40:48 -05:00
Conrad Irwin
a3bc48261e First pass of real access control
Co-Authored-By: Max<max@zed.dev>
2024-01-08 12:23:40 -07:00
Marshall Bowers
5c28c688fa
theme: Removed commented-out ActiveTheme impl (#3950)
This PR removes a commented-out implementation for the `ActiveTheme`
trait on the `WindowContext`.

We don't need this implementation as we can go through the
`AppContext`'s implementation.

Release Notes:

- N/A
2024-01-08 13:51:18 -05:00
Marshall Bowers
9b06c66e00
terminal: Remove resolved TODO (#3948)
This PR removes a resolved TODO in the `terminal` crate.

Release Notes:

- N/A
2024-01-08 13:39:56 -05:00
Marshall Bowers
00fc22a461
terminal: Clean up doc comment for rgb_for_index (#3947)
This PR cleans up the doc comment for the `rgb_for_index` function.

Release Notes:

- N/A
2024-01-08 13:33:41 -05:00