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
+3 -2
View File
@@ -14,7 +14,7 @@ use gpui::prelude::FluentBuilder as _;
use gpui::{
AnyView, App, ElementId, Hsla, InteractiveElement as _, IntoElement, ParentElement as _,
RenderOnce, SharedString, StatefulInteractiveElement as _, StyleRefinement, Styled as _,
Window, transparent_black,
Window, relative, transparent_black,
};
use crate::components::common::{ControlSizing, Sizable, StyledExt, h_flex};
@@ -163,9 +163,10 @@ impl RenderOnce for Badge {
.border_color(border)
.bg(background)
.text_color(foreground)
.line_height(relative(1.0))
.control_caption_text(size)
.map(|badge| match size {
Size::XSmall | Size::Small => badge.h_5().min_w_5().px_1(),
Size::XSmall | Size::Small => badge.h_5().min_w_5().px_1p5(),
Size::Medium => badge.h_6().min_w_6().px_1p5(),
Size::Large => badge.h_7().min_w_7().px_2(),
})
+3 -2
View File
@@ -337,14 +337,15 @@ impl PanelStack {
}
/// Shows the panel under `id`, building it only when it is not open yet.
pub fn open<P, F>(
pub fn open<I, P, F>(
&mut self,
slot: PanelSlot,
id: impl Into<SharedString>,
id: I,
build: F,
window: &mut Window,
cx: &mut Context<Self>,
) where
I: Into<SharedString>,
P: Panel + 'static,
F: Fn(&mut Window, &mut App) -> Entity<P> + 'static,
{