Remove GitUiFeatureFlag and enable panel unconditionally (#26386)
Release Notes: - git: Enable for everyone
This commit is contained in:
parent
02e970192f
commit
659fae70f8
5 changed files with 12 additions and 25 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -5451,7 +5451,6 @@ dependencies = [
|
||||||
"db",
|
"db",
|
||||||
"editor",
|
"editor",
|
||||||
"env_logger 0.11.6",
|
"env_logger 0.11.6",
|
||||||
"feature_flags",
|
|
||||||
"futures 0.3.31",
|
"futures 0.3.31",
|
||||||
"fuzzy",
|
"fuzzy",
|
||||||
"git",
|
"git",
|
||||||
|
|
|
@ -80,11 +80,6 @@ impl FeatureFlag for PredictEditsNonEagerModeFeatureFlag {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct GitUiFeatureFlag;
|
|
||||||
impl FeatureFlag for GitUiFeatureFlag {
|
|
||||||
const NAME: &'static str = "git-ui";
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Remoting {}
|
pub struct Remoting {}
|
||||||
impl FeatureFlag for Remoting {
|
impl FeatureFlag for Remoting {
|
||||||
const NAME: &'static str = "remoting";
|
const NAME: &'static str = "remoting";
|
||||||
|
|
|
@ -24,7 +24,6 @@ collections.workspace = true
|
||||||
component.workspace = true
|
component.workspace = true
|
||||||
db.workspace = true
|
db.workspace = true
|
||||||
editor.workspace = true
|
editor.workspace = true
|
||||||
feature_flags.workspace = true
|
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
fuzzy.workspace = true
|
fuzzy.workspace = true
|
||||||
git.workspace = true
|
git.workspace = true
|
||||||
|
|
|
@ -7,7 +7,6 @@ use editor::{
|
||||||
scroll::Autoscroll,
|
scroll::Autoscroll,
|
||||||
Editor, EditorEvent,
|
Editor, EditorEvent,
|
||||||
};
|
};
|
||||||
use feature_flags::FeatureFlagViewExt;
|
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use git::{
|
use git::{
|
||||||
repository::Branch, status::FileStatus, Commit, StageAll, StageAndNext, ToggleStaged,
|
repository::Branch, status::FileStatus, Commit, StageAll, StageAndNext, ToggleStaged,
|
||||||
|
@ -64,17 +63,14 @@ const NEW_NAMESPACE: &'static str = "2";
|
||||||
|
|
||||||
impl ProjectDiff {
|
impl ProjectDiff {
|
||||||
pub(crate) fn register(
|
pub(crate) fn register(
|
||||||
_: &mut Workspace,
|
workspace: &mut Workspace,
|
||||||
window: Option<&mut Window>,
|
_window: Option<&mut Window>,
|
||||||
cx: &mut Context<Workspace>,
|
cx: &mut Context<Workspace>,
|
||||||
) {
|
) {
|
||||||
let Some(window) = window else { return };
|
|
||||||
cx.when_flag_enabled::<feature_flags::GitUiFeatureFlag>(window, |workspace, _, _cx| {
|
|
||||||
workspace.register_action(Self::deploy);
|
workspace.register_action(Self::deploy);
|
||||||
workspace.register_action(|workspace, _: &Add, window, cx| {
|
workspace.register_action(|workspace, _: &Add, window, cx| {
|
||||||
Self::deploy(workspace, &Diff, window, cx);
|
Self::deploy(workspace, &Diff, window, cx);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
workspace::register_serializable_item::<ProjectDiff>(cx);
|
workspace::register_serializable_item::<ProjectDiff>(cx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ use collections::VecDeque;
|
||||||
use command_palette_hooks::CommandPaletteFilter;
|
use command_palette_hooks::CommandPaletteFilter;
|
||||||
use editor::ProposedChangesEditorToolbar;
|
use editor::ProposedChangesEditorToolbar;
|
||||||
use editor::{scroll::Autoscroll, Editor, MultiBuffer};
|
use editor::{scroll::Autoscroll, Editor, MultiBuffer};
|
||||||
use feature_flags::{FeatureFlagAppExt, FeatureFlagViewExt, GitUiFeatureFlag};
|
use feature_flags::FeatureFlagAppExt;
|
||||||
use futures::{channel::mpsc, select_biased, StreamExt};
|
use futures::{channel::mpsc, select_biased, StreamExt};
|
||||||
use git_ui::git_panel::GitPanel;
|
use git_ui::git_panel::GitPanel;
|
||||||
use git_ui::project_diff::ProjectDiffToolbar;
|
use git_ui::project_diff::ProjectDiffToolbar;
|
||||||
|
@ -429,13 +429,11 @@ fn initialize_panels(
|
||||||
workspace.add_panel(channels_panel, window, cx);
|
workspace.add_panel(channels_panel, window, cx);
|
||||||
workspace.add_panel(chat_panel, window, cx);
|
workspace.add_panel(chat_panel, window, cx);
|
||||||
workspace.add_panel(notification_panel, window, cx);
|
workspace.add_panel(notification_panel, window, cx);
|
||||||
cx.when_flag_enabled::<GitUiFeatureFlag>(window, |workspace, window, cx| {
|
|
||||||
let entity = cx.entity();
|
let entity = cx.entity();
|
||||||
let project = workspace.project().clone();
|
let project = workspace.project().clone();
|
||||||
let app_state = workspace.app_state().clone();
|
let app_state = workspace.app_state().clone();
|
||||||
let git_panel = cx.new(|cx| GitPanel::new(entity, project, app_state, window, cx));
|
let git_panel = cx.new(|cx| GitPanel::new(entity, project, app_state, window, cx));
|
||||||
workspace.add_panel(git_panel, window, cx);
|
workspace.add_panel(git_panel, window, cx);
|
||||||
});
|
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let is_assistant2_enabled = if cfg!(test) {
|
let is_assistant2_enabled = if cfg!(test) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue