fix(app): refine session search controls

This commit is contained in:
David Hill
2026-09-30 12:47:41 -06:00
parent 6585bb7105
commit 4f4b3d6a1a
3 changed files with 22 additions and 9 deletions
@@ -12,3 +12,13 @@
box-shadow: inset 0 0 0 1px var(--v2-border-border-focus); box-shadow: inset 0 0 0 1px var(--v2-border-border-focus);
outline: none; outline: none;
} }
[data-component="timeline-search-bar"] [data-slot="text-input-v2-leading-icon"] {
transition: color 85ms ease-out;
}
[data-component="timeline-search-bar"]
[data-component="text-input-v2"]:hover
[data-slot="text-input-v2-leading-icon"] {
color: var(--v2-icon-icon-base);
}
@@ -56,15 +56,17 @@ export function TimelineSearchBar(props: { controller: TimelineSearchController
{c.result.count() > 0 ? c.result.activeIndex() + 1 : 0}/{c.result.count()} {c.result.count() > 0 ? c.result.activeIndex() + 1 : 0}/{c.result.count()}
</span> </span>
</Show> </Show>
<button <Show when={c.query.value()}>
type="button" <button
class="-me-1 flex size-5 shrink-0 self-center items-center justify-center rounded-[2px] border-0 bg-transparent p-0 text-v2-icon-icon-muted outline outline-1 outline-transparent hover:bg-v2-overlay-simple-overlay-hover active:bg-v2-overlay-simple-overlay-pressed focus-visible:outline-v2-border-border-focus" type="button"
aria-label={c.query.placeholder()} class="-me-1 flex size-5 shrink-0 self-center items-center justify-center border-0 bg-transparent p-0 text-v2-icon-icon-muted transition-colors duration-150 ease-in-out hover:text-v2-icon-icon-base focus-visible:outline focus-visible:outline-1 focus-visible:outline-v2-border-border-focus"
onMouseDown={(event) => event.preventDefault()} aria-label={c.query.clearLabel()}
onClick={() => c.query.close()} onMouseDown={(event) => event.preventDefault()}
> onClick={() => c.query.setValue("")}
<Icon name="xmark-small" /> >
</button> <Icon name="circle-xmark" />
</button>
</Show>
</div> </div>
</div> </div>
</Show> </Show>
@@ -256,6 +256,7 @@ export function createTimelineSearchController(input: {
query: { query: {
value: () => state.value, value: () => state.value,
placeholder: () => language.t("session.search.placeholder"), placeholder: () => language.t("session.search.placeholder"),
clearLabel: () => language.t("common.clear"),
noResults: () => language.t("session.search.noResults"), noResults: () => language.t("session.search.noResults"),
open, open,
close, close,