T19 round 1 fixes
- merges keep each line's ending and the last newline; resolve keeps every other byte - the split view numbers each side from its own file - hunk headers come from similar's UnifiedHunkHeader: an empty side starts before its range - the commit subject counter sits in the input's suffix - clipped code rows in diffs, merges, blame and review set their line height - gallery: scripted split view and a long subject
This commit is contained in:
1 parent
950f17636c
commit
75656358cf
11 files changed
+173
-73
No files matched your search
@@ -6,7 +6,10 @@ use ely_gpui_component::{
|
||||
};
|
||||
use gpui::{App, IntoElement, ParentElement, SharedString, Styled, Window, div, px};
|
||||
|
||||
use crate::ui::{keep, section, set};
|
||||
use crate::{
|
||||
probe::probe,
|
||||
ui::{keep, section, set},
|
||||
};
|
||||
|
||||
const OLD: &str = r#"use std::collections::HashMap;
|
||||
|
||||
@@ -84,7 +87,8 @@ pub fn viewer(window: &mut Window, cx: &mut App) -> impl IntoElement + use<> {
|
||||
"One file's changes, unified or side by side: each change in its context with old and new numbers, the words that changed washed, the stretches between folded until pressed. InlineDiff inside an editor is CodeEditor::set_diff.",
|
||||
cx,
|
||||
)
|
||||
.child(
|
||||
.child(probe(
|
||||
"git-diff",
|
||||
div()
|
||||
.w(px(840.))
|
||||
.h(px(360.))
|
||||
@@ -103,7 +107,7 @@ pub fn viewer(window: &mut Window, cx: &mut App) -> impl IntoElement + use<> {
|
||||
set(&unfold, next, cx)
|
||||
}),
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
const BASE: &str =
|
||||
|
||||
@@ -16,7 +16,20 @@ pub const PAGE: Page = Page {
|
||||
script: SCRIPT,
|
||||
};
|
||||
|
||||
const SCRIPT: &[Step] = &[Step::Rest];
|
||||
const SCRIPT: &[Step] = &[
|
||||
Step::Rest,
|
||||
Step::DownAt("git-diff", 800.0, 21.0),
|
||||
Step::UpAt("git-diff", 800.0, 21.0),
|
||||
Step::Wait(300),
|
||||
Step::Shot("split"),
|
||||
Step::DownAt("git-commit", 40.0, 20.0),
|
||||
Step::UpAt("git-commit", 40.0, 20.0),
|
||||
Step::Wait(200),
|
||||
Step::Key("cmd-a"),
|
||||
Step::Type("Blend every accent toward white by lift, clamped in gamma"),
|
||||
Step::Wait(300),
|
||||
Step::Shot("subject"),
|
||||
];
|
||||
|
||||
fn render(window: &mut Window, cx: &mut App) -> AnyElement {
|
||||
div()
|
||||
|
||||
@@ -10,7 +10,10 @@ use ely_gpui_component::{
|
||||
};
|
||||
use gpui::{App, Entity, IntoElement, ParentElement, SharedString, Styled, Window, div, px};
|
||||
|
||||
use crate::ui::{keep, row, section, set};
|
||||
use crate::{
|
||||
probe::probe,
|
||||
ui::{keep, row, section, set},
|
||||
};
|
||||
|
||||
fn changed(path: &str, status: GitStatus, added: usize, removed: usize) -> Changed {
|
||||
Changed {
|
||||
@@ -113,7 +116,8 @@ pub fn changes(window: &mut Window, cx: &mut App) -> impl IntoElement + use<> {
|
||||
}),
|
||||
),
|
||||
)
|
||||
.child(
|
||||
.child(probe(
|
||||
"git-commit",
|
||||
div().w(px(380.)).child(
|
||||
CommitInput::new("git-commit", &subject, &body, "main", count)
|
||||
.amend(now_amend)
|
||||
@@ -124,7 +128,7 @@ pub fn changes(window: &mut Window, cx: &mut App) -> impl IntoElement + use<> {
|
||||
set(&done, Some(format!("Committed {files} file{}.", if files == 1 { "" } else { "s" }).into()), cx);
|
||||
}),
|
||||
),
|
||||
),
|
||||
)),
|
||||
)
|
||||
.children(told.map(Caption::new))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user