Add UI/UX for moving channels (#2976)

TODO:

- [x] Add drag and drop
- [x] Polish up in-flight decisions.
- [x] Fix chat panel panic
- [x] Add nice hover effect highlighting the matching ones
- [x] Fix and test keyboard

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2023-09-19 17:56:22 -07:00 committed by GitHub
commit e37373a636
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 2964 additions and 808 deletions

View file

@ -1383,7 +1383,7 @@ impl Pane {
let theme = theme::current(cx).clone();
let detail = detail.clone();
move |dragged_item: &DraggedItem, cx: &mut ViewContext<Workspace>| {
move |_, dragged_item: &DraggedItem, cx: &mut ViewContext<Workspace>| {
let tab_style = &theme.workspace.tab_bar.dragged_tab;
Self::render_dragged_tab(
&dragged_item.handle,

View file

@ -33,8 +33,8 @@ use gpui::{
},
impl_actions,
platform::{
CursorStyle, MouseButton, PathPromptOptions, Platform, PromptLevel, WindowBounds,
WindowOptions,
CursorStyle, ModifiersChangedEvent, MouseButton, PathPromptOptions, Platform, PromptLevel,
WindowBounds, WindowOptions,
},
AnyModelHandle, AnyViewHandle, AnyWeakViewHandle, AppContext, AsyncAppContext, Entity,
ModelContext, ModelHandle, SizeConstraint, Subscription, Task, View, ViewContext, ViewHandle,
@ -3815,6 +3815,10 @@ impl View for Workspace {
cx.focus(&self.active_pane);
}
}
fn modifiers_changed(&mut self, e: &ModifiersChangedEvent, cx: &mut ViewContext<Self>) -> bool {
DragAndDrop::<Workspace>::update_modifiers(e.modifiers, cx)
}
}
impl ViewId {