mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
git_graph: Remove feature flag (#52972)
After #52953 gets merged the git graph will be ready for it's preview release, so we can finally remove the feature flag! AKA this PR releases the git graph Self-Review Checklist: - [ ] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [ ] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - [ ] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - Add Git Graph. Can be accessed through the button on the bottom of the git panel or the `git graph: Open` action
This commit is contained in:
parent
06f939d355
commit
7892b93279
8 changed files with 32 additions and 51 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -7132,7 +7132,6 @@ dependencies = [
|
|||
"collections",
|
||||
"db",
|
||||
"editor",
|
||||
"feature_flags",
|
||||
"fs",
|
||||
"git",
|
||||
"git_ui",
|
||||
|
|
@ -7190,7 +7189,6 @@ dependencies = [
|
|||
"ctor",
|
||||
"db",
|
||||
"editor",
|
||||
"feature_flags",
|
||||
"file_icons",
|
||||
"futures 0.3.31",
|
||||
"fuzzy",
|
||||
|
|
|
|||
|
|
@ -47,12 +47,6 @@ impl FeatureFlag for DiffReviewFeatureFlag {
|
|||
}
|
||||
}
|
||||
|
||||
pub struct GitGraphFeatureFlag;
|
||||
|
||||
impl FeatureFlag for GitGraphFeatureFlag {
|
||||
const NAME: &'static str = "git-graph";
|
||||
}
|
||||
|
||||
pub struct StreamingEditFileToolFeatureFlag;
|
||||
|
||||
impl FeatureFlag for StreamingEditFileToolFeatureFlag {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ anyhow.workspace = true
|
|||
collections.workspace = true
|
||||
db.workspace = true
|
||||
editor.workspace = true
|
||||
feature_flags.workspace = true
|
||||
git.workspace = true
|
||||
git_ui.workspace = true
|
||||
gpui.workspace = true
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
use collections::{BTreeMap, HashMap, IndexSet};
|
||||
use editor::Editor;
|
||||
use feature_flags::{FeatureFlagAppExt as _, GitGraphFeatureFlag};
|
||||
use git::{
|
||||
BuildCommitPermalinkParams, GitHostingProviderRegistry, GitRemote, Oid, ParsedGitRemote,
|
||||
parse_git_remote_url,
|
||||
|
|
@ -732,8 +731,7 @@ pub fn init(cx: &mut App) {
|
|||
cx.observe_new(|workspace: &mut workspace::Workspace, _, _| {
|
||||
workspace.register_action_renderer(|div, workspace, _, cx| {
|
||||
div.when(
|
||||
workspace.project().read(cx).active_repository(cx).is_some()
|
||||
&& cx.has_flag::<GitGraphFeatureFlag>(),
|
||||
workspace.project().read(cx).active_repository(cx).is_some(),
|
||||
|div| {
|
||||
let workspace = workspace.weak_handle();
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ db.workspace = true
|
|||
editor.workspace = true
|
||||
file_icons.workspace = true
|
||||
futures.workspace = true
|
||||
feature_flags.workspace = true
|
||||
fuzzy.workspace = true
|
||||
git.workspace = true
|
||||
gpui.workspace = true
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ use buffer_diff::BufferDiff;
|
|||
use collections::HashMap;
|
||||
use editor::display_map::{BlockPlacement, BlockProperties, BlockStyle};
|
||||
use editor::{Addon, Editor, EditorEvent, ExcerptRange, MultiBuffer, multibuffer_context_lines};
|
||||
use feature_flags::{FeatureFlagAppExt as _, GitGraphFeatureFlag};
|
||||
use git::repository::{CommitDetails, CommitDiff, RepoPath, is_binary_content};
|
||||
use git::status::{FileStatus, StatusCode, TrackedStatus};
|
||||
use git::{
|
||||
|
|
@ -1045,7 +1044,6 @@ impl Render for CommitViewToolbar {
|
|||
}),
|
||||
)
|
||||
.when(!is_stash, |this| {
|
||||
this.when(cx.has_flag::<GitGraphFeatureFlag>(), |this| {
|
||||
this.child(
|
||||
IconButton::new("show-in-git-graph", IconName::GitGraph)
|
||||
.icon_size(IconSize::Small)
|
||||
|
|
@ -1059,7 +1057,6 @@ impl Render for CommitViewToolbar {
|
|||
);
|
||||
}),
|
||||
)
|
||||
})
|
||||
.children(remote_info.map(|(provider_name, url)| {
|
||||
let icon = match provider_name.as_str() {
|
||||
"GitHub" => IconName::Github,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ use editor::{
|
|||
actions::ExpandAllDiffHunks,
|
||||
};
|
||||
use editor::{EditorStyle, RewrapOptions};
|
||||
use feature_flags::{FeatureFlagAppExt as _, GitGraphFeatureFlag};
|
||||
use file_icons::FileIcons;
|
||||
use futures::StreamExt as _;
|
||||
use git::commit::ParsedCommitMessage;
|
||||
|
|
@ -4529,7 +4528,6 @@ impl GitPanel {
|
|||
let commit = branch.most_recent_commit.as_ref()?.clone();
|
||||
let workspace = self.workspace.clone();
|
||||
let this = cx.entity();
|
||||
let can_open_git_graph = cx.has_flag::<GitGraphFeatureFlag>();
|
||||
|
||||
Some(
|
||||
h_flex()
|
||||
|
|
@ -4607,8 +4605,7 @@ impl GitPanel {
|
|||
),
|
||||
)
|
||||
})
|
||||
.when(can_open_git_graph, |this| {
|
||||
this.child(
|
||||
.child(
|
||||
panel_icon_button("git-graph-button", IconName::GitGraph)
|
||||
.icon_size(IconSize::Small)
|
||||
.tooltip(|_window, cx| {
|
||||
|
|
@ -4617,8 +4614,7 @@ impl GitPanel {
|
|||
.on_click(|_, window, cx| {
|
||||
window.dispatch_action(Open.boxed_clone(), cx)
|
||||
}),
|
||||
)
|
||||
}),
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ fi
|
|||
FLAGGED_PRS=()
|
||||
FLAGS_FILE="$REPO_ROOT/crates/feature_flags/src/flags.rs"
|
||||
if [[ -f "$FLAGS_FILE" ]]; then
|
||||
# Extract feature flag struct names (e.g. SubagentsFeatureFlag, GitGraphFeatureFlag)
|
||||
# Extract feature flag struct names (e.g. SubagentsFeatureFlag)
|
||||
FLAG_NAMES=$(grep -oE 'pub struct \w+FeatureFlag' "$FLAGS_FILE" | awk '{print $3}')
|
||||
if [[ -n "$FLAG_NAMES" ]]; then
|
||||
FLAG_PATTERN=$(echo "$FLAG_NAMES" | tr '\n' '|' | sed 's/|$//')
|
||||
|
|
|
|||
Loading…
Reference in a new issue