Add staged status information to diff hunks (#24475)

Release Notes:

- Render unstaged hunks in the project diff editor with a slashed
background

---------

Co-authored-by: maxbrunsfeld <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Cole Miller 2025-02-10 21:43:25 -05:00 committed by GitHub
parent a9de9e3cb4
commit 8f75fe25e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 1132 additions and 753 deletions

View file

@ -25,10 +25,30 @@ impl Render for PatternExample {
.flex_col()
.border_1()
.border_color(gpui::blue())
.child(div().w(px(54.0)).h(px(18.0)).bg(pattern_slash(gpui::red())))
.child(div().w(px(54.0)).h(px(18.0)).bg(pattern_slash(gpui::red())))
.child(div().w(px(54.0)).h(px(18.0)).bg(pattern_slash(gpui::red())))
.child(div().w(px(54.0)).h(px(18.0)).bg(pattern_slash(gpui::red()))),
.child(
div()
.w(px(54.0))
.h(px(18.0))
.bg(pattern_slash(gpui::red(), 18.0 / 2.0)),
)
.child(
div()
.w(px(54.0))
.h(px(18.0))
.bg(pattern_slash(gpui::red(), 18.0 / 2.0)),
)
.child(
div()
.w(px(54.0))
.h(px(18.0))
.bg(pattern_slash(gpui::red(), 18.0 / 2.0)),
)
.child(
div()
.w(px(54.0))
.h(px(18.0))
.bg(pattern_slash(gpui::red(), 18.0 / 2.0)),
),
)
.child(
div()
@ -42,25 +62,25 @@ impl Render for PatternExample {
div()
.w(px(256.0))
.h(px(56.0))
.bg(pattern_slash(gpui::red())),
.bg(pattern_slash(gpui::red(), 56.0 / 3.0)),
)
.child(
div()
.w(px(256.0))
.h(px(56.0))
.bg(pattern_slash(gpui::green())),
.bg(pattern_slash(gpui::green(), 56.0 / 3.0)),
)
.child(
div()
.w(px(256.0))
.h(px(56.0))
.bg(pattern_slash(gpui::blue())),
.bg(pattern_slash(gpui::blue(), 56.0 / 3.0)),
)
.child(
div()
.w(px(256.0))
.h(px(26.0))
.bg(pattern_slash(gpui::yellow())),
.bg(pattern_slash(gpui::yellow(), 56.0 / 3.0)),
),
)
.child(