From 888f97d5223493cac29249a159b243dac8f5ed71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sun, 6 Sep 2026 09:13:32 +0300 Subject: [PATCH] fix(ui): typing in the drive search no longer reshuffles the bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two stacked causes. The search caption rendered inside the filterbar only in search mode, so each type-as-filter keystroke inserted a leading bar child and pushed the search box sideways mid-typing. And the soft-nav morpher paired children purely by position: a leading child coming or going shifted every later sibling one slot, morphing the sort form into the search form — its enhanced dropdown trigger ended up inside the search box and the focused input was replaced under the typist. The caption now rides inside the results panel, keeping the bar's children the same set in every mode; the morpher gained one node of lookahead, so a child that appears or vanishes is inserted or removed where it stands instead of cascading replacements down the row — the same cascade the crumbs nav triggered on folder navigation. --- crates/in-web/src/drive.rs | 32 ++++++++++++++++++++------------ crates/in-web/src/layout.rs | 23 +++++++++++++++++------ style/main.scss | 10 ++++++++++ 3 files changed, 47 insertions(+), 18 deletions(-) diff --git a/crates/in-web/src/drive.rs b/crates/in-web/src/drive.rs index 7805c31..bbc410e 100644 --- a/crates/in-web/src/drive.rs +++ b/crates/in-web/src/drive.rs @@ -454,6 +454,12 @@ async fn drive(cx: &Cx) -> Result { None => None, }; let box_text = asked.clone().unwrap_or_default(); + // The search mode tell: rendered inside the results panel, never in the + // filterbar — the bar keeps one shape whether the list below is a folder + // or hits, so typing in the box never reshuffles the controls around it. + let caption = asked + .as_deref() + .map(|query| format!("{} “{query}”", t(language, Key::SearchResults))); let current = current_folder(store.as_ref(), &user.id, wanted.as_deref()).await?; let crumbs = breadcrumbs(store.as_ref(), current.as_ref()).await; let mut listing = match store @@ -567,18 +573,18 @@ async fn drive(cx: &Cx) -> Result { (topbar(cx, NavPage::Drive, &user, language).await?)
- if let Some(query) = asked.as_deref() { -

(t(language, Key::SearchResults)) (format!(" “{query}”"))

- } else { - if current.is_some() { - - } + // The bar's children stay the same set in every mode — a + // leading element that comes and goes would shift the morph's + // positional pairing and shuffle the forms into each other. + // The search caption lives in the results panel instead. + if asked.is_none() && current.is_some() { + }