forge
Explore
Log in

Don't you dare go Hollow

The path bar reads as one search field when signed in: a framed bar with a search icon before the path, a "Search or jump to…" hint in the space after it and Ctrl K always shown, instead of a lone icon at the far end of an invisible box

Browse files at this commit

1c2204bdf837d422c77dde0f70667abeecb81144Ahmet Kaan GümüşParent: f8f6e8d
Some checks failed
Show checks
  • style
    • the path bar reads as one search field when signed in: a framed bar with a search icon before the path, a "Search or jump to…" hint in the space after it and Ctrl K always shown, instead of a lone icon at the far end of an invisible box
    • the bar takes the focus ring and the global button hover stays off it, and phones keep only the icon and the path
Show full message
💄 style: the path bar reads as one search field when signed in: a framed bar with a search icon before the path, a "Search or jump to…" hint in the space after it and Ctrl K always shown, instead of a lone icon at the far end of an invisible box; the bar takes the focus ring and the global button hover stays off it, and phones keep only the icon and the path
crates/forge-web/src/i18n/browse.rsmodified+1 -0
@@ -55,6 +55,7 @@ strings! {
55 55
56 PaletteOpen => "Open command palette", "Komut paletini aç";56 PaletteOpen => "Open command palette", "Komut paletini aç";
57 PalettePlaceholder => "Jump to…", "Şuraya git…";57 PalettePlaceholder => "Jump to…", "Şuraya git…";
58+ PathbarHint => "Search or jump to…", "Ara ya da git…";
58 PaletteRepos => "Repositories", "Depolar";59 PaletteRepos => "Repositories", "Depolar";
59 PalettePages => "Pages", "Sayfalar";60 PalettePages => "Pages", "Sayfalar";
60 PaletteNoMatches => "No matches", "Eşleşme yok";61 PaletteNoMatches => "No matches", "Eşleşme yok";
crates/forge-web/src/views/mod.rsmodified+4 -1
@@ -688,6 +688,9 @@ pub async fn shell(
688 "forge"688 "forge"
689 </a>689 </a>
690 <nav class="pathbar" aria-label=(mi::t(lang, MK::BreadcrumbNav))>690 <nav class="pathbar" aria-label=(mi::t(lang, MK::BreadcrumbNav))>
691+ if signed_in {
692+ <svg class="ico pathbar-ico" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
693+ }
691 <ol class="pathbar-segs">694 <ol class="pathbar-segs">
692 for crumb in crumbs.iter() {695 for crumb in crumbs.iter() {
693 if let Some(href) = &crumb.href {696 if let Some(href) = &crumb.href {
@@ -705,7 +708,7 @@ pub async fn shell(
705 data-empty=(br::t(lang, br::K::PaletteNoMatches)) data-loading=(br::t(lang, br::K::PaletteLoading))708 data-empty=(br::t(lang, br::K::PaletteNoMatches)) data-loading=(br::t(lang, br::K::PaletteLoading))
706 data-failed=(br::t(lang, br::K::PaletteFailed)) data-hint=(br::t(lang, br::K::FinderHint))709 data-failed=(br::t(lang, br::K::PaletteFailed)) data-hint=(br::t(lang, br::K::FinderHint))
707 data-search-label=(search_for_label) data-files=(br::t(lang, br::K::PaletteFiles))>710 data-search-label=(search_for_label) data-files=(br::t(lang, br::K::PaletteFiles))>
708- <svg class="ico" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>711+ <span class="pathbar-hint">(br::t(lang, br::K::PathbarHint))</span>
709 <kbd>"Ctrl K"</kbd>712 <kbd>"Ctrl K"</kbd>
710 </button>713 </button>
711 }714 }
style/_shell.scssmodified+53 -9
@@ -151,7 +151,8 @@
151 }151 }
152 152
153 // Path bar: the breadcrumb of the page, and the click target that opens the Ctrl K palette.153 // Path bar: the breadcrumb of the page, and the click target that opens the Ctrl K palette.
154-// The bar fills the top bar's free space; its edit button covers the rest of it.154+// The bar fills the top bar's free space; its edit button covers the rest of it. Signed in, it reads
155+// as one field: a search icon, the path, then a "search or jump to" hint and Ctrl K.
155 156
156 .pathbar {157 .pathbar {
157 display: flex;158 display: flex;
@@ -172,6 +173,25 @@
172 &:hover {173 &:hover {
173 border-color: var(--border);174 border-color: var(--border);
174 }175 }
176+
177+ &:has(.pathbar-edit) {
178+ padding-left: 10px;
179+ border-color: var(--border);
180+ border-radius: var(--radius-md);
181+ background: var(--surface);
182+
183+ &:hover {
184+ border-color: var(--border-strong);
185+ }
186+ }
187+}
188+
189+.pathbar-ico {
190+ flex: none;
191+ width: 15px;
192+ height: 15px;
193+ margin-right: 6px;
194+ color: var(--muted);
175 }195 }
176 196
177 .pathbar-segs {197 .pathbar-segs {
@@ -232,12 +252,13 @@
232 .pathbar-edit {252 .pathbar-edit {
233 display: flex;253 display: flex;
234 align-items: center;254 align-items: center;
235- justify-content: flex-end;255+ justify-content: space-between;
256+ gap: 8px;
236 flex: 1 1 0;257 flex: 1 1 0;
237 height: 100%;258 height: 100%;
238 min-width: 0;259 min-width: 0;
239 margin: 0;260 margin: 0;
240- padding: 0 6px;261+ padding: 0 6px 0 12px;
241 border: 0;262 border: 0;
242 background: transparent;263 background: transparent;
243 color: var(--muted);264 color: var(--muted);
@@ -254,15 +275,36 @@
254 background: var(--surface-2);275 background: var(--surface-2);
255 border: 1px solid var(--border-strong);276 border: 1px solid var(--border-strong);
256 border-radius: var(--radius-sm);277 border-radius: var(--radius-sm);
257- opacity: 0;
258 }278 }
259 279
260- &:hover kbd,280+ // The bar is the field, so the global button hover and focus ring stay off this part of it.
261- &:focus-visible kbd {281+ &:hover,
262- opacity: 1;282+ &:focus-visible {
283+ border: 0;
284+ background: transparent;
285+ box-shadow: none;
286+ }
287+
288+ &:hover .pathbar-hint {
289+ color: var(--text-2);
263 }290 }
264 }291 }
265 292
293+.pathbar:has(.pathbar-edit:focus-visible) {
294+ border-color: var(--focus);
295+ box-shadow: 0 0 0 3px var(--accent-soft);
296+}
297+
298+.pathbar-hint {
299+ min-width: 0;
300+ overflow: hidden;
301+ font-family: var(--font);
302+ font-size: 13px;
303+ color: var(--muted);
304+ text-overflow: ellipsis;
305+ white-space: nowrap;
306+}
307+
266 // Live strip: what is running or just finished, at the end of the top bar.308 // Live strip: what is running or just finished, at the end of the top bar.
267 309
268 .live-strip {310 .live-strip {
@@ -907,8 +949,10 @@ button.corner-link.link-button {
907 display: none;949 display: none;
908 }950 }
909 951
910- // Phones have no keyboard, so the shortcut hint goes.952+ // Phones have no keyboard, so the shortcut hint goes, and the path keeps the room the search hint
911- .pathbar-edit kbd {953+ // would take (the icon still marks the bar as search).
954+ .pathbar-edit kbd,
955+ .pathbar-hint {
912 display: none;956 display: none;
913 }957 }
914 958