From 5b521343020d6d25525c65759731730ca2f25159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Tue, 1 Dec 2026 03:32:21 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20repo=20tabs=20stay=20in?= =?UTF-8?q?=20place=20between=20pages:=20the=20repo=20head=20always=20keep?= =?UTF-8?q?s=20its=20sub=20line,=20so=20a=20page=20with=20no=20counts=20un?= =?UTF-8?q?der=20its=20title=20no=20longer=20pulls=20the=20tabs=20up=20a?= =?UTF-8?q?=20line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/forge-web/src/pages/repo.rs | 2 +- crates/forge-web/src/views/parts.rs | 3 ++- style/_one.scss | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/forge-web/src/pages/repo.rs b/crates/forge-web/src/pages/repo.rs index 1fefdda..e27328f 100644 --- a/crates/forge-web/src/pages/repo.rs +++ b/crates/forge-web/src/pages/repo.rs @@ -214,7 +214,7 @@ pub async fn repo_head( } (child) - head_sub(parts: parts, pips: pips) + head_sub(parts: parts, pips: pips, keep: true) repo_tabs(owner: owner.clone(), repo: name.clone(), default_branch: default_branch.clone(), active: active.clone(), can_admin: can_admin, lang: lang, open_issues: Some(open_issues), open_pulls: Some(open_pulls), discussions: discussions, wiki: wiki, security: security) if archived { diff --git a/crates/forge-web/src/views/parts.rs b/crates/forge-web/src/views/parts.rs index 801db49..2fc95ca 100644 --- a/crates/forge-web/src/views/parts.rs +++ b/crates/forge-web/src/views/parts.rs @@ -296,9 +296,10 @@ pub async fn head_sub( cx: &Cx, parts: Vec, #[default] pips: Vec<(String, String, &'static str)>, + #[default] keep: bool, ) -> Result { let last = pips.len().saturating_sub(1); - let show = !parts.is_empty() || !pips.is_empty(); + let show = keep || !parts.is_empty() || !pips.is_empty(); let has_pips = !pips.is_empty(); Ok(view! { if show { diff --git a/style/_one.scss b/style/_one.scss index 04ab291..d8dd85a 100644 --- a/style/_one.scss +++ b/style/_one.scss @@ -3139,6 +3139,10 @@ details:not([open])::details-content { min-height: 38px; } +.repo-head .head-sub { + min-height: 1lh; +} + main:has(> nav.tabs) > .head:has(.head-sub), main:has(> nav.tabs[data-section="admin"]) > .head { min-height: 64px;