We want to encourage people to use WindowContext::mouse_position, which
requests the position from the platform.
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
Fixes
https://linear.app/zed-industries/issue/Z-1510/join-project-notification-takes-up-full-screen-on-a-second-monitor
There were multiple mistakes in the positioning of Zed's notification
windows, one of which lead to the notifications taking up the full
screen on secondary displays 😱 .
* Wrong sign for the vertical padding (moving the window *upward*
instead of downward)
* Using the screen's full frame instead of its "visible frame" (which
accounts for app menu bar)
* Wrong coordinate translation between our coordinates and AppKit's
coordinates. Regardless of which display a given window appears on, the
coordinate translation needs to use the height of the *main* display.
Release Notes:
- Fixed a bug where call notifications were accidentally full-screen on
all displays except the main display.
### Summary
This PR introduces channels: a new way of starting collaboration
sessions. You can create channels and invite others to join them. You
can then hold a call in a channel, where any member of the channel is
free to join the call without needing to be invited.
Channels are displayed in a new panel called the collaboration panel,
which now also contains the contacts list, and the current call. The
collaboration popover has been removed from the titlebar.
![Screen Shot 2023-08-15 at 9 25 37
AM](https://github.com/zed-industries/zed/assets/326587/0f989dea-7fb7-4d50-9acd-25c8f1c30cd1)
For now, the channels functionality will only be revealed to staff, so
the public-facing change is just the move from the popover to the panel.
### To-do
* User-facing UI
* [x] signed-out state for collab panel
* [x] new icon for collab panel
* [x] for now, channels section only appears for zed staff
* [x] current call section styling
(https://zed-industries.slack.com/archives/C05CJUNF2BU/p1691189389988239?thread_ts=1691189120.403009&cid=C05CJUNF2BU)
* [x] Channel members
* Channels
* [x] style channel name editor
* [x] decide on a special "empty state" for the panel, when user has no
contacts
* [x] ensure channels are sorted in a consistent way (expose channel id
paths to client)
* [x] Figure out layered panels UX
* [x] Change add contacts to be the same kind of tabbed modal
* [x] race condition between channel updates and user fetches
(`ChannelStore::handle_update_contacts`)
* [x] race condition between joining channels and channel update
messages `collab::rpc::channel_updated`)
* [x] don't display mic as muted when microphone share is pending upon
first joining call
Release Notes:
- Moved the collaboration dropdown into its own panel.
- Added settings for disabling the AI assistant panel button.
- Switch to lazily initializing audio output sources
(https://github.com/zed-industries/community/issues/1840,
https://github.com/zed-industries/community/issues/1919)