Commit Graph

1324 Commits

Author SHA1 Message Date
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
0b1b758f02 Fix leaking test contexts
I was unable to run the collab tests locally because I would run out of
file descriptors.

From some digging it turned out that tokio allocates a new file
descriptor to do work on the CurrentThread using KQUEUE.

We create a new tokio Runtime with each database connection, and these
database connections were being retained by the Client, which is
retained by the Context.

Cleaning up our leaked contexts fixes the problem (though does make me
wonder if a different approach might be preferrable).
2024-01-22 23:05:54 -07:00
Max Brunsfeld
ba5b969e10 collab 0.40.0 2024-01-22 17:30:55 -08:00
Max Brunsfeld
25708088b7 Add requires_zed_cla column to channels table
Don't allow granting guests write access in a call where the channel
or one of its ancestors requires the zed CLA, until that guest has
signed the Zed CLA.

Co-authored-by: Marshall <marshall@zed.dev>
2024-01-22 16:41:24 -08:00
Max Brunsfeld
676d2cb24a collab 0.39.0 2024-01-22 14:22:04 -08:00
Max Brunsfeld
44c2b8b063
Add REST APIs for signing the CLA, retrieving users who've signed the CLA (#4202) 2024-01-22 14:20:39 -08:00
Max Brunsfeld
b9458fe4ac Fix call to get_or_create_user in seed binary 2024-01-22 14:15:41 -08:00
Max Brunsfeld
03e008959f Fix get_or_create_user test 2024-01-22 14:12:31 -08:00
Max Brunsfeld
cd7f377c31 Allow checking CLA signatures by GitHub login
This will be used by CLA Bot.

Co-authored-by: Marshall <marshall@zed.dev>
2024-01-22 13:55:12 -08:00
Max Brunsfeld
56556d71a1 Add API for retrieving the date that a contributor signed the CLA
Co-authored-by: Marshall <marshall@zed.dev>
2024-01-22 13:11:24 -08:00
Max Brunsfeld
6c937c4a90 Make POST /contributors API idempotent
Co-authored-by: Marshall <marshall@zed.dev>
2024-01-22 12:49:35 -08:00
Max Brunsfeld
1981de4cae Add REST APIs for getting and adding contributors
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-22 10:48:33 -08:00
Conrad Irwin
c5d7c8e122 Fix cmd-k left 2024-01-22 08:38:20 -07: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
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
e513020fbb Fine tune 2024-01-18 15:59:13 -07:00
Max Brunsfeld
b0db38419c
Restore the colored background for collaborators that you are following (#4137) 2024-01-18 14:32:54 -08: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
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
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
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
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
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
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 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
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
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
Mikayla
a99ee5e599
Fix test failures 2024-01-16 22:30:44 -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
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
c810af40d3 Fix multiple mentions in one message 2024-01-13 21:53:22 -07:00
Mikayla
5897b18cfd
remove more commented code 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
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
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
Mikayla
91d3ba5390
Switch to non-destructive migration 2024-01-11 10:33:33 -08:00