diff --git a/frontend/src/lib/assets/app.css b/frontend/src/lib/assets/app.css index 9e4d4ea753..037ca0ee4e 100644 --- a/frontend/src/lib/assets/app.css +++ b/frontend/src/lib/assets/app.css @@ -427,28 +427,6 @@ input[type='time']::-webkit-calendar-picker-indicator { z-index: -10; } -/* Row actions shown only for the row being used: hovered, tabbed into, keyboard-selected, or - with one of its menus open. Opacity rather than visibility, so Tab still reaches them. Focus - only when visible: a menu hands focus back to its trigger on close, and a mouse user would - otherwise keep that row's actions up after leaving it. */ -/* A list whose rows are not ruled off from each other (Home's items). Rows mark themselves - with `data-list-row`; their own `border-b` stays for every other list. */ -[data-unruled] [data-list-row] { - border-bottom-width: 0 !important; - border-radius: 0.375rem !important; -} - -[data-hover-actions] [data-list-row] [data-row-actions] { - opacity: 0; - transition: opacity 100ms; -} -[data-hover-actions] [data-list-row]:hover [data-row-actions], -[data-hover-actions] [data-list-row]:has(:focus-visible) [data-row-actions], -[data-hover-actions] [data-list-row][data-row-keyboard-selected] [data-row-actions], -[data-hover-actions] [data-row-actions]:has([aria-expanded='true']) { - opacity: 1; -} - /* The composer's glide, defined once: the Home ↔ AI Sessions view transition below and the in-page move on a session's first message (the spacer under AIChatDisplay's composer) both read it. */ diff --git a/frontend/src/lib/components/InheritedLabels.svelte b/frontend/src/lib/components/InheritedLabels.svelte index 2e17648702..f15aaf5567 100644 --- a/frontend/src/lib/components/InheritedLabels.svelte +++ b/frontend/src/lib/components/InheritedLabels.svelte @@ -1,5 +1,5 @@ -{#if labels?.length} -
- {#each labels.slice(0, max) as label (label)} - - {label} - - {/each} - {#if labels.length > max} - 'Label inherited from folder: ' + l) - .join('\n')}>+{labels.length - max} - {/if} -
-{/if} + diff --git a/frontend/src/lib/components/common/badge/LabelList.svelte b/frontend/src/lib/components/common/badge/LabelList.svelte new file mode 100644 index 0000000000..8fb15f8186 --- /dev/null +++ b/frontend/src/lib/components/common/badge/LabelList.svelte @@ -0,0 +1,33 @@ + + +{#if labels?.length} +
+ {#each labels.slice(0, max) as label (label)} + {label} + {/each} + {#if labels.length > max} + `${titlePrefix}: ${l}`) + .join('\n')}>+{labels.length - max} + {/if} +
+{/if} diff --git a/frontend/src/lib/components/common/table/AgentRow.svelte b/frontend/src/lib/components/common/table/AgentRow.svelte index be51541c94..d44d0bfe06 100644 --- a/frontend/src/lib/components/common/table/AgentRow.svelte +++ b/frontend/src/lib/components/common/table/AgentRow.svelte @@ -4,7 +4,7 @@ import DraftBadge from '$lib/components/DraftBadge.svelte' import type ShareModal from '$lib/components/ShareModal.svelte' import type DeployWorkspaceDrawer from '$lib/components/DeployWorkspaceDrawer.svelte' - import InheritedLabels from '$lib/components/InheritedLabels.svelte' + import RowLabels from './RowLabels.svelte' import type { ListableResource } from '$lib/gen' import { userStore, workspaceStore } from '$lib/stores' import { createEventDispatcher } from 'svelte' @@ -84,7 +84,7 @@ > {#snippet badges()} - + Raw {/if} - - + diff --git a/frontend/src/lib/components/common/table/FlowRow.svelte b/frontend/src/lib/components/common/table/FlowRow.svelte index 8a5f8fdaa2..2b0fec570c 100644 --- a/frontend/src/lib/components/common/table/FlowRow.svelte +++ b/frontend/src/lib/components/common/table/FlowRow.svelte @@ -36,7 +36,6 @@ } from 'lucide-svelte' import FlowHistory from '$lib/components/flows/FlowHistory.svelte' import ChatFlowBadge from '$lib/components/flows/ChatFlowBadge.svelte' - import InheritedLabels from '$lib/components/InheritedLabels.svelte' import RowLabels from './RowLabels.svelte' import AskAiRowButton from './AskAiRowButton.svelte' import { getDeployUiSettings } from '$lib/components/home/deploy_ui' @@ -161,8 +160,7 @@ archived {/if} - - + { let { path } = app diff --git a/frontend/src/lib/components/common/table/Row.svelte b/frontend/src/lib/components/common/table/Row.svelte index ba0f4c630c..2d27f89851 100644 --- a/frontend/src/lib/components/common/table/Row.svelte +++ b/frontend/src/lib/components/common/table/Row.svelte @@ -9,6 +9,9 @@ import Tooltip from '../../meltComponents/Tooltip.svelte' import Checkbox from '../checkbox/Checkbox.svelte' import type { RowSelection } from './rowSelection' + import { HOVER_ACTIONS_CLASS, inUnruledList } from './unruledList' + + const unruled = inUnruledList() interface Props { marked: string | undefined @@ -177,12 +180,14 @@ with its sibling folder at the same depth. -->
0 ? '!rounded-none' : '', + 'group/row w-full inline-flex items-center gap-4 px-4 py-3', + unruled + ? 'rounded-md' + : 'first-of-type:!border-t-0 first-of-type:rounded-t-md last-of-type:rounded-b-md [*:not(:last-child)]:border-b border-b last:border-b-0', + depth > 0 && !unruled ? '!rounded-none' : '', disabled ? 'opacity-25' : 'hover:bg-surface-hover', clickToSelect || inSelectionMode ? 'cursor-pointer select-none' : '', selected || rowSelection?.selected @@ -261,7 +266,10 @@
{/if} -
+
{@render actions?.()}
@@ -290,14 +298,15 @@ {/if} {#if canFavorite && (kind == 'app' || kind == 'raw_app' || kind == 'script' || kind == 'flow' || kind == 'agent')} + row's hover or keyboard focus only, so a list of titles doesn't read as a column of + outlines. Opacity, not visibility: a hidden button drops out of the Tab order. -->