Commit Graph
31406 Commits
Author SHA1 Message Date
Conrad Irwin 05439b5b15 Disallow self-management for admins 2024-01-15 19:31:01 -07:00
Conrad Irwin a2e5241a92 Close modals when focus leaves
This is more similar to zed1's behaviour, and allows us to work around
the difficulty in defining `on_mouse_down_out` for modals that have
overlays.
2024-01-15 19:20:35 -07:00
Joseph T. Lyons 7a265e9121 Add command palette action events 2024-01-15 20:22:47 -05:00
Max Brunsfeld 24c70bf320 Restore re-rendering of editors on buffer font size changes (#4064)
Now that views are cached, we need to explicitly `.notify()` text
editors when the buffer font size changes.

* [x] Notify editors when settings change, or adjusting buffer font size
* [x] Figure out why non-focused editors still do not re-render when
adjusting buffer font size
* [x] Reset buffer font size adjustment when the size is updated in the
user's settings
2024-01-15 17:13:13 -08:00
Max Brunsfeld 461334cad4 Put back logic for resetting buffer font adjustment on settings change. 2024-01-15 17:03:02 -08:00
Max Brunsfeld df116f435c Notify global observers when removing a global 2024-01-15 17:02:20 -08:00
Max Brunsfeld b22a5c0186 Iterate from leaf to root when marking views dirty in notify 2024-01-15 16:49:06 -08:00
Conrad Irwin 6564fbb559 Fix fallback font (#4062)
As this is used if you mis-spell "buffer_font_family", it should be
monospace.

Also treat "Zed Mono" and "Zed Sans" as valid fonts

Follow up to #4045

Release Notes:

- Fixes font validation to allow "Zed Mono" as a valid font
2024-01-15 17:08:04 -07:00
Max Brunsfeld d5f1ebe4e3 Notify editors on buffer font size changes 2024-01-15 14:53:24 -08:00
Max Brunsfeld d2f724df7f 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 8dfc542f46 Add and enhance tests for muting/deafening, fix exposed logic errors 2024-01-15 14:03:38 -08:00
Nate Butler f48496cb60 init color crate 2024-01-15 17:01:07 -05:00
Kirill Bulatov 01541ce56f Select next/previous word for multiple carets if possible 2024-01-15 23:42:36 +02:00
Joseph T. Lyons b7089c0ff6 Add more open events (#4061)
Adds open events for

- Welcome page
- Project search
- Project diagnostics

Release Notes:

- N/A
2024-01-15 16:36:24 -05:00
Antonio Scandurra 3fea6c4fe8 Avoid panicking when closing a dragged tab (#4057)
Release Notes:

- Fixed a panic that could occur when closing a tab while dragging it.
2024-01-15 22:34:33 +01:00
Conrad Irwin fbf7f8f5cb Fix fallback font
As this is used if you mis-spell "buffer_font_family", it should be
monospace.

Also treat "Zed Mono" and "Zed Sans" as valid fonts
2024-01-15 14:32:48 -07:00
Joseph T. Lyons 37b7515a9d Remove debugs 2024-01-15 16:29:58 -05:00
Joseph T. Lyons 93ffacdf9f Remove button event function 2024-01-15 16:28:28 -05:00
Joseph T. Lyons 49c244bfb2 Removed button event 2024-01-15 16:26:56 -05:00
Joseph T. Lyons fa0ba2cca2 Add more open events
project search
diagnostics
welcome page
2024-01-15 16:26:04 -05:00
Piotr Osiewicz 946c114773 Fix project panel being toggled on workspace startup. (#4059)
A sequence of events: Launch Zed -> Quit Zed -> Launch Zed would leave
you with a project panel in a a different state on each open (e.g. if it
is open on 1st one, 2nd run will have it closed). We were essentially
not tracking whether the deserialization took place.

Release Notes:

- Fixed project panel being toggled on/off on startup due to incorrect
tracking of serialization state (solves
https://github.com/zed-industries/community/issues/2406)
2024-01-15 22:23:16 +01:00
Conrad Irwin db36ec1319 Enable Channels for everyone 2024-01-15 13:33:58 -07:00
Kirill Bulatov 62707d9be9 Add LSP logs into the end of the editor, not after its caret
Also prevent tabs from being added in readonly editors
2024-01-15 22:12:52 +02:00
0e084ebd2f Avoid panicking when closing a dragged tab
Co-Authored-By: Max <max@zed.dev>
Co-Authored-By: Nathan <nathan@zed.dev>
2024-01-15 19:46:34 +01:00
Antonio Scandurra e4efad0856 Avoid retrieving layout bounds inside of right click menu event handler (#4056)
By the time the event handler is invoked, all information about the
rendered layout tree is gone.

Release Notes:

- N/A
2024-01-15 19:42:47 +01:00
Antonio Scandurra 5fd00b6fbc Preserve tooltips requested by cached views (#4055)
Release Notes:

- N/A
2024-01-15 19:42:39 +01:00
6539892ad9 Avoid retrieving layout bounds inside of right click menu event handler
Co-Authored-By: Nathan <nathan@zed.dev>
Co-Authored-By: Max <max@zed.dev>
2024-01-15 19:27:18 +01:00
f3087a8cf7 Preserve tooltips requested by cached views
Co-Authored-By: Nathan <nathan@zed.dev>
Co-Authored-By: Max <max@zed.dev>
2024-01-15 19:19:27 +01:00
Thorsten BallandMarshall 84220a83eb Fix unaligned close button in tab bar
Co-authored-by: Marshall <marshall@zed.dev>
2024-01-15 18:16:41 +01:00
Marshall Bowers dc67b7bcaa Rename h_stack and v_stack to h_flex and v_flex, respectively (#4053)
This PR renames the `h_stack` and `v_stack` to `h_flex` and `v_flex`,
respectively.

We were previously using `h_stack` and `v_stack` to match SwiftUI, but
`h_flex` and `v_flex` fit better with the web/flexbox terminology that
the rest of GPUI uses.

Additionally, we were already calling the utility functions used to
implement `h_stack` and `v_stack` by the new names.

Release Notes:

- N/A
2024-01-15 11:34:06 -05:00
Marshall Bowers 2999a0fd58 Make tab close button square (#4052)
This PR makes the close button for tabs square.

`IconButton` now accepts a `shape`, and using `IconButtonShape::Square`
will ensure the `IconButton` is square with respect to its contained
icon.

#### Before

<img width="119" alt="Screenshot 2024-01-15 at 10 32 40 AM"
src="https://github.com/zed-industries/zed/assets/1486634/dc806b9b-411f-4cd9-8c10-676d2cbd298b">

#### After

<img width="116" alt="Screenshot 2024-01-15 at 10 32 24 AM"
src="https://github.com/zed-industries/zed/assets/1486634/8b4ef43c-14b6-449f-a235-5d7affd82c4e">

Release Notes:

- Changed the tab close button to be square.
2024-01-15 10:43:03 -05:00
Antonio Scandurra 410faa43a1 Rebuild shader header when cbindgen sources have changed (#4051)
This was causing the Metal shaders to incorrectly interpret the
primitives submitted by GPUI, which in turn caused rendering to be
completely borked.

Release Notes:

- N/A
2024-01-15 16:32:09 +01:00
Julia b528a20102 Prevent storybook dialog from swallowing terminal cursor when ctrl-c-ed (#4050)
Honestly thought this was a bug with our terminal port lol. Turns out
its an oversight in the `dialoguer` crate but its seems pretty easy to
work around so might as well

Release Notes:

- N/A
2024-01-15 10:25:11 -05:00
Antonio ScandurraandThorsten 90e010b532 Rebuild shader header when cbindgen sources have changed
Co-Authored-By: Thorsten <thorsten@zed.dev>
2024-01-15 16:23:22 +01:00
Julia fdb2cfe3d5 Prevent storybook dialog from swallowing terminal cursor when ctrl-c-ed 2024-01-15 10:19:08 -05:00
Piotr Osiewicz f8791b44f5 gpui: Pin to font-kit with improved OTC parsing performance. (#4047)
Details are in https://github.com/zed-industries/font-kit/pull/1; We're
not doing anything too fancy, really. Still, you should mostly see font
loading times drop significantly for font collections
Release Notes:
- Improved loading performance of large font collections (e.g. Iosevka).
Fixes https://github.com/zed-industries/community/issues/1745,
https://github.com/zed-industries/community/issues/246


https://github.com/zed-industries/zed/assets/24362066/f70edbad-ded6-4c12-9c6d-7a487f330a1b
2024-01-15 15:46:18 +01:00
Kirill Bulatov 7755e5145e Disable copilot for feedback and lsp log editors (#4048)
LSP log editor caused recursive flood of messages, and feedback editor
is better with people writing their own feedback.

Release Notes:

- Fixed hanging due to excessive logs when browsing Copilot LSP logs
2024-01-15 15:59:27 +02:00
Kirill Bulatov e5827c49ff Disable copilot for feedback and lsp log editors
LSP log editor caused recursive flood of messages, and feedback editor is better with people writing their own feedback.
2024-01-15 15:49:23 +02:00
Thorsten Ball b0976f74cb Fix editor stealing click events from copy-error button (#4046)
This fixes the click event on the "copy error message" button by
changing the `editor` element to ignore mouse-down events when the
default was prevented. That's similar to how `div` does it.

Release Notes:

- Fixed a bug that prevented "copy error message" button from being
clicked.
2024-01-15 14:03:15 +01:00
Thorsten BallandAntonio 530638a765 Fix editor stealing click events from copy-error button
Co-authored-by: Antonio <antonio@zed.dev>
2024-01-15 13:47:09 +01:00
Antonio ScandurraandThorsten 4ba5fbd20e Pop node from dispatch tree during cx.paint_view
Co-Authored-By: Thorsten <thorsten@zed.dev>
2024-01-15 11:46:46 +01:00
Antonio Scandurra 9526dee28b Merge remote-tracking branch 'origin/main' into cache
# Conflicts:
#	crates/gpui/src/elements/div.rs
2024-01-15 11:37:46 +01:00
Conrad Irwin 4704e268d2 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 3378cab3f7 Fix tests for TestPanel 2024-01-14 12:26:54 -07:00
Conrad Irwin d1d9c3fca6 Remove unused imports 2024-01-13 22:44:47 -07:00
Conrad Irwin d6d8d41808 Move settings subscription to dock
Reduces likelihood of panels being unable to move themselves
2024-01-13 22:41:26 -07:00
Conrad Irwin 0fdbce875b Default to Zed Sans for UI 2024-01-13 22:38:22 -07:00
Conrad Irwin 39c6156210 Fix re-docking chat panel 2024-01-13 22:26:25 -07:00
Conrad Irwin 2ea8c1baee Show a border when scrolled in chat 2024-01-13 22:19:21 -07:00
Conrad Irwin d97618364c Fix multiple mentions in one message 2024-01-13 21:53:22 -07:00