feat: open issue and pull request details in a new tab
Rust / build (macos-latest, stable) (push) Canceled after 0s
Rust / build (ubuntu-latest, stable) (push) Canceled after 0s
Rust / build (windows-latest, stable) (push) Canceled after 0s

This commit is contained in:
2026-11-26 10:40:00 +07:00
parent ae41fac60a
commit 5363544b9d
9 changed files with 128 additions and 100 deletions
+45 -40
View File
@@ -259,7 +259,6 @@ impl Render for IssuesView {
.id(SharedString::from(format!("issue:{id_hex}")))
.w_full()
.h_16()
.gap_4()
.px_2()
.border_b_1()
.border_color(cx.theme().colors.border)
@@ -273,7 +272,7 @@ impl Render for IssuesView {
cx,
|panels, cx| {
panels.open(
PanelSlot::Split,
PanelSlot::Main,
id,
move |_, cx| {
cx.new(|cx| {
@@ -291,49 +290,55 @@ impl Render for IssuesView {
)
}));
})
.child(status_badge(status))
.child(
v_flex()
.flex_1()
.min_w_0()
.gap_1()
h_flex()
.w_full()
.items_start()
.gap_2()
.child(h_flex().w_24().child(status_badge(status)))
.child(
div()
.text_sm()
.text_ellipsis()
.whitespace_nowrap()
.child(issue.activity_subject()),
)
.child(
h_flex()
.gap_2()
.text_xs()
.child(
h_flex()
.gap_1()
.child(
Avatar::new(issue.pubkey)
.name(profile.name())
.picture(
profile.picture(),
)
.small(),
)
.child(
div().child(profile.name()),
),
)
.child("opened")
v_flex()
.flex_1()
.min_w_0()
.gap_1()
.child(
div()
.text_color(
cx.theme()
.colors
.muted_foreground,
)
.child(short_id(&id_hex)),
.text_sm()
.text_ellipsis()
.whitespace_nowrap()
.child(issue.activity_subject()),
)
.child(relative_time(issue.created_at)),
.child(
h_flex()
.gap_2()
.text_xs()
.child(
h_flex()
.gap_1()
.child(
Avatar::new(issue.pubkey)
.name(profile.name())
.picture(
profile.picture(),
)
.small(),
)
.child(
div().child(profile.name()),
),
)
.child("opened")
.child(
div()
.text_color(
cx.theme()
.colors
.muted_foreground,
)
.child(short_id(&id_hex)),
)
.child(relative_time(issue.created_at)),
),
),
)
.into_any_element()
@@ -116,6 +116,10 @@ impl Panel for NewIssueView {
fn loading(&self, _cx: &App) -> bool {
self.submitting
}
fn toolbar(&self, _cx: &App) -> bool {
true
}
}
impl Render for NewIssueView {
@@ -130,6 +134,7 @@ impl Render for NewIssueView {
.gap_3()
.child(
div()
.pr_16()
.text_base()
.text_color(cx.theme().colors.muted_foreground)
.child("Report a bug, ask a question, or propose a change."),