We've investigated another spurious failure, this time with test_multiple_excerpts_large_multibuffer; sadly it didn't really get us anywhere, so for now we're relaxing an assert.
Co-authored-by: Kirill <kirill@zed.dev>
Returned highlights were okay, but the test was trying to normalize the output by sorting the highlights by color. The ordering is different between gpui1 Color and gpui2 Hsla.
These tests failed due to an indefinite hang in buffer.condition in the following code:
\`\`\`rust
let buffer = cx
.add_model(|cx| Buffer::new(0, cx.model_id() as u64, text).with_language(language, cx));
buffer.condition(cx, |buf, _| !buf.is_parsing()).await;
`\`\`
In both gpui1 and gpui2 \`.with_language\` spawns a task that notifies the context once it's done. The \`condition\` waits for notifications to be raised. The gist of the problem was that in gpui2, the spawned task was scheduled straight away, so we never really saw the notification with \`condition\`, causing us to wait indefinitely. This is probably a difference in test between schedulers in gpui1 and gpui2, but I kind of sidestepped the issue by spawning a condition before firing off a parsing task with \`set_language\`.
- +language_selector2
- Language Selector 2 working!
- Prevent languages showing in wrong order first
- copilot_menu2 (though only tested offling, which is insufficient)
- Dismiss tooltips at capture
- Get ChannelModal opening
[[PR Description]]
Release Notes:
- N/A
Without this, hitting cmd-n on the context menu in the project browser
invokes the workspace::NewFile action instead of the project::NewFile
action. We're considering changing the behavior so that bindings with no
context can only invoke global actions.
Co-Authored-By: Max <max@zed.dev>
This fixes a bug where it was possible to put the channel tree into a
bad state by accidentally dragging a channel into itself or one of its
descendants.
This PR extends `Button` with support for an optional icon to be
displayed next to the label.
As part of this, the functionality for displaying an icon within a
button has been factored out into an internal `ButtonIcon` component.
`ButtonIcon` is now used by both `IconButton` and `Button` to
encapsulate the concerns of an icon that is rendered within a button.
Release Notes:
- N/A
This PR adds a new `selected_label` method to `Button`.
This can be used to set a different label that should be rendered when
the `Button` is selected.
Release Notes:
- N/A
This PR adds a new `selected_icon` method to `IconButton`.
This can be used to set a different icon that should be rendered when
the `IconButton` is selected.
Release Notes:
- N/A