feat(desktop): polish tooltips and session search (#34632)
This commit is contained in:
parent
20445ca031
commit
fced9c5a2f
8 changed files with 19 additions and 13 deletions
|
|
@ -59,7 +59,6 @@ const ModelList: Component<{
|
||||||
class="w-full"
|
class="w-full"
|
||||||
placement="right-start"
|
placement="right-start"
|
||||||
gutter={12}
|
gutter={12}
|
||||||
openDelay={0}
|
|
||||||
value={<ModelTooltip model={item} latest={item.latest} free={isFree(item.provider.id, item.cost)} />}
|
value={<ModelTooltip model={item} latest={item.latest} free={isFree(item.provider.id, item.cost)} />}
|
||||||
>
|
>
|
||||||
{node}
|
{node}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ export const PromptContextItems: Component<ContextItemsProps> = (props) => {
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
placement="top"
|
placement="top"
|
||||||
openDelay={2000}
|
openDelay={800}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
classList={{
|
classList={{
|
||||||
|
|
|
||||||
|
|
@ -541,6 +541,7 @@ function SessionHeaderV2Actions(props: { state: SessionHeaderV2ActionsState }) {
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={props.state.reviewVisible}>
|
<Show when={props.state.reviewVisible}>
|
||||||
<TooltipV2
|
<TooltipV2
|
||||||
|
class="shrink-0"
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
value={
|
value={
|
||||||
<>
|
<>
|
||||||
|
|
|
||||||
|
|
@ -572,7 +572,7 @@ export function Titlebar(props: { update?: TitlebarUpdate }) {
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
title={language.t("command.session.new")}
|
title={language.t("command.session.new")}
|
||||||
keybind={command.keybind("session.new")}
|
keybind={command.keybind("session.new")}
|
||||||
openDelay={2000}
|
openDelay={800}
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
|
|
@ -602,7 +602,7 @@ export function Titlebar(props: { update?: TitlebarUpdate }) {
|
||||||
>
|
>
|
||||||
<Show when={hasProjects() && nav()}>
|
<Show when={hasProjects() && nav()}>
|
||||||
<div class="flex items-center gap-0 transition-transform">
|
<div class="flex items-center gap-0 transition-transform">
|
||||||
<Tooltip placement="bottom" value={language.t("common.goBack")} openDelay={2000}>
|
<Tooltip placement="bottom" value={language.t("common.goBack")} openDelay={800}>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
icon="chevron-left"
|
icon="chevron-left"
|
||||||
|
|
@ -612,7 +612,7 @@ export function Titlebar(props: { update?: TitlebarUpdate }) {
|
||||||
aria-label={language.t("common.goBack")}
|
aria-label={language.t("common.goBack")}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip placement="bottom" value={language.t("common.goForward")} openDelay={2000}>
|
<Tooltip placement="bottom" value={language.t("common.goForward")} openDelay={800}>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
icon="chevron-right"
|
icon="chevron-right"
|
||||||
|
|
|
||||||
|
|
@ -1006,8 +1006,8 @@ function HomeSessionLeading(props: {
|
||||||
<Show when={hasOpenTab()}>
|
<Show when={hasOpenTab()}>
|
||||||
<span
|
<span
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
class="pointer-events-none absolute top-1/2 h-[7px] w-[3px] -translate-y-1/2 rounded-[2px] bg-v2-background-bg-layer-04"
|
class="pointer-events-none absolute top-1/2 h-3 w-0.5 -translate-y-1/2 rounded-[2px] bg-v2-background-bg-layer-04"
|
||||||
style={{ right: "calc(100% + 5px)" }}
|
style={{ right: "calc(100% + 4px)" }}
|
||||||
/>
|
/>
|
||||||
</Show>
|
</Show>
|
||||||
<SessionTabAvatar
|
<SessionTabAvatar
|
||||||
|
|
@ -1164,11 +1164,7 @@ function HomeSessionSearch(props: {
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
<label
|
<label
|
||||||
class="relative z-20 flex h-9 w-full items-center gap-2 rounded-[6px] bg-v2-background-bg-layer-02 py-1 pl-3 pr-2 text-v2-icon-icon-muted transition-[background-color,box-shadow] duration-[120ms] ease-in-out"
|
class="relative z-20 flex h-9 w-full items-center gap-2 rounded-[6px] bg-v2-background-bg-layer-02/60 py-1 pl-3 pr-2 text-v2-icon-icon-muted transition-[background-color,box-shadow] duration-[120ms] ease-in-out hover:bg-v2-background-bg-layer-02"
|
||||||
classList={{
|
|
||||||
"focus-within:shadow-[0_0_0_0.5px_var(--v2-border-border-focus),var(--v2-elevation-raised)]": !props.open,
|
|
||||||
"shadow-[0_0_0_0.5px_var(--v2-border-border-focus)]": props.open,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<IconV2 name="magnifying-glass" />
|
<IconV2 name="magnifying-glass" />
|
||||||
<input
|
<input
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,8 @@ export function Tooltip(props: TooltipProps) {
|
||||||
<Match when={true}>
|
<Match when={true}>
|
||||||
<KobalteTooltip
|
<KobalteTooltip
|
||||||
gutter={4}
|
gutter={4}
|
||||||
|
openDelay={400}
|
||||||
|
skipDelayDuration={300}
|
||||||
{...others}
|
{...others}
|
||||||
closeDelay={0}
|
closeDelay={0}
|
||||||
ignoreSafeArea={local.ignoreSafeArea ?? true}
|
ignoreSafeArea={local.ignoreSafeArea ?? true}
|
||||||
|
|
|
||||||
|
|
@ -55,3 +55,10 @@
|
||||||
transform: scale(0.96);
|
transform: scale(0.96);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
[data-component="tooltip-v2"],
|
||||||
|
[data-component="tooltip-v2"][data-closed] {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,8 +88,9 @@ export function TooltipV2(props: TooltipV2Props) {
|
||||||
<Match when={true}>
|
<Match when={true}>
|
||||||
<KobalteTooltip
|
<KobalteTooltip
|
||||||
gutter={4}
|
gutter={4}
|
||||||
|
openDelay={400}
|
||||||
|
skipDelayDuration={300}
|
||||||
{...others}
|
{...others}
|
||||||
openDelay={0}
|
|
||||||
closeDelay={0}
|
closeDelay={0}
|
||||||
ignoreSafeArea={local.ignoreSafeArea ?? true}
|
ignoreSafeArea={local.ignoreSafeArea ?? true}
|
||||||
open={local.forceOpen || state.open}
|
open={local.forceOpen || state.open}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue