Merge quick_action_bar into zed (#21026)

This PR merges the `quick_action_bar` crate into the `zed` crate.

We weren't really gaining anything by having it be a separate crate, and
it was introducing an additional step in the dependency graph that was
getting in the way.

It's only ~850 LOC, so the impact on the compilation speed of the `zed`
crate itself is negligible.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-11-21 18:33:11 -05:00 committed by GitHub
parent 9211e699ee
commit e0245b3f30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 9 additions and 63 deletions

20
Cargo.lock generated
View file

@ -9426,24 +9426,6 @@ dependencies = [
"memchr",
]
[[package]]
name = "quick_action_bar"
version = "0.1.0"
dependencies = [
"assistant",
"editor",
"gpui",
"markdown_preview",
"picker",
"repl",
"search",
"settings",
"ui",
"util",
"workspace",
"zed_actions",
]
[[package]]
name = "quinn"
version = "0.11.6"
@ -15541,12 +15523,12 @@ dependencies = [
"outline_panel",
"parking_lot",
"paths",
"picker",
"profiling",
"project",
"project_panel",
"project_symbols",
"proto",
"quick_action_bar",
"recent_projects",
"release_channel",
"remote",

View file

@ -81,7 +81,6 @@ members = [
"crates/project_panel",
"crates/project_symbols",
"crates/proto",
"crates/quick_action_bar",
"crates/recent_projects",
"crates/refineable",
"crates/refineable/derive_refineable",
@ -259,7 +258,6 @@ project = { path = "crates/project" }
project_panel = { path = "crates/project_panel" }
project_symbols = { path = "crates/project_symbols" }
proto = { path = "crates/proto" }
quick_action_bar = { path = "crates/quick_action_bar" }
recent_projects = { path = "crates/recent_projects" }
refineable = { path = "crates/refineable" }
release_channel = { path = "crates/release_channel" }

View file

@ -1,32 +0,0 @@
[package]
name = "quick_action_bar"
version = "0.1.0"
edition = "2021"
publish = false
license = "GPL-3.0-or-later"
[lints]
workspace = true
[lib]
path = "src/quick_action_bar.rs"
doctest = false
[dependencies]
assistant.workspace = true
editor.workspace = true
gpui.workspace = true
markdown_preview.workspace = true
repl.workspace = true
search.workspace = true
settings.workspace = true
ui.workspace = true
util.workspace = true
workspace.workspace = true
zed_actions.workspace = true
picker.workspace = true
[dev-dependencies]
editor = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] }

View file

@ -1 +0,0 @@
../../LICENSE-GPL

View file

@ -78,12 +78,12 @@ outline.workspace = true
outline_panel.workspace = true
parking_lot.workspace = true
paths.workspace = true
picker.workspace = true
profiling.workspace = true
project.workspace = true
project_panel.workspace = true
project_symbols.workspace = true
proto.workspace = true
quick_action_bar.workspace = true
recent_projects.workspace = true
release_channel.workspace = true
remote.workspace = true

View file

@ -6,6 +6,7 @@ pub(crate) mod linux_prompts;
#[cfg(target_os = "macos")]
pub(crate) mod mac_only_instance;
mod open_listener;
mod quick_action_bar;
#[cfg(target_os = "windows")]
pub(crate) mod windows_only_instance;

View file

@ -1,3 +1,6 @@
mod markdown_preview;
mod repl_menu;
use assistant::assistant_settings::AssistantSettings;
use assistant::AssistantPanel;
use editor::actions::{
@ -6,7 +9,6 @@ use editor::actions::{
SelectNext, SelectSmallerSyntaxNode, ToggleGoToLine, ToggleOutline,
};
use editor::{Editor, EditorSettings};
use gpui::{
Action, AnchorCorner, ClickEvent, ElementId, EventEmitter, FocusHandle, FocusableView,
InteractiveElement, ParentElement, Render, Styled, Subscription, View, ViewContext, WeakView,
@ -22,9 +24,6 @@ use workspace::{
};
use zed_actions::InlineAssist;
mod repl_menu;
mod toggle_markdown_preview;
pub struct QuickActionBar {
_inlay_hints_enabled_subscription: Option<Subscription>,
active_item: Option<Box<dyn ItemHandle>>,

View file

@ -5,7 +5,7 @@ use markdown_preview::{
use ui::{prelude::*, text_for_keystroke, IconButtonShape, Tooltip};
use workspace::Workspace;
use crate::QuickActionBar;
use super::QuickActionBar;
impl QuickActionBar {
pub fn render_toggle_markdown_preview(

View file

@ -1,5 +1,6 @@
use std::time::Duration;
use gpui::ElementId;
use gpui::{percentage, Animation, AnimationExt, AnyElement, Transformation, View};
use picker::Picker;
use repl::{
@ -11,11 +12,9 @@ use ui::{
prelude::*, ButtonLike, ContextMenu, IconWithIndicator, Indicator, IntoElement, PopoverMenu,
PopoverMenuHandle, Tooltip,
};
use gpui::ElementId;
use util::ResultExt;
use crate::QuickActionBar;
use super::QuickActionBar;
const ZED_REPL_DOCUMENTATION: &str = "https://zed.dev/docs/repl";