{children}
+ {children} ); } diff --git a/apps/desktop/src/renderer/desktop/task-card.tsx b/apps/desktop/src/renderer/desktop/task-card.tsx index 998ea74544..ed4343022c 100644 --- a/apps/desktop/src/renderer/desktop/task-card.tsx +++ b/apps/desktop/src/renderer/desktop/task-card.tsx @@ -3,7 +3,15 @@ import type { CatalogModel } from "@luke/features/models-wire"; import { moreText, TASK_ROW_MARK, taskRowMark } from "@luke/features/task-agents-model"; import type { TaskAgentLine, TaskPullRequestLine, TaskSummary } from "@luke/features/task-wire"; import type { Workspace } from "@luke/features/workspace-wire"; -import { HoverCard, HoverCardHead, HoverCardRule, ProviderMark } from "@luke/ui"; +import { + HOVER_CARD_ROW_LOOK, + HoverCard, + HoverCardHead, + HoverCardList, + HoverCardRow, + HoverCardRule, + ProviderMark, +} from "@luke/ui"; import { ACTOR_KIND, actorName, SOMEONE_REASON } from "@luke/ui/actor-model"; import { TASK_ORDER, taskTime } from "@luke/ui/task-list-model"; import { repositoryPageUrl } from "@luke/ui/tasks-model"; @@ -42,9 +50,10 @@ import { WorkspaceRef } from "./workspace-ref"; * repository and a pull request open their pages on GitHub, and an agent * opens the task on its tab. Each is also offered where the card is not: * the task's menu opens the repository, and the agent's tab its pull - * request. The rest are facts, left as text. Its rows are set as a menu's - * rows are, and a pinned tab's card (`sidebar-pinned-tab.tsx`) is drawn - * from the same rows (`CardDetail`, `RepositoryDetail`, `PullRequestLine`). + * request. The rest are facts, left as text. Its rows are `@luke/ui`'s + * `HoverCardRow`, set as a menu's rows are, and a pinned tab's card + * (`sidebar-pinned-tab.tsx`) is drawn from the same rows + * (`RepositoryDetail`, `PullRequestLine`). */ /** The most rows each of the card's lists draws before it counts the rest. */ @@ -86,56 +95,6 @@ export function TaskStatusMark({ } } -/** - * One row of a card's lists, set as a menu's row is: its glyph, its words, - * and what stands at its end. It is a button where a press does something, - * and text where nothing does, in the same place either way. - */ -function CardLine({ - glyph, - label, - end, - onPress, -}: { - glyph: React.ReactNode; - label: React.ReactNode; - end?: React.ReactNode; - onPress?: (() => void) | undefined; -}): React.JSX.Element { - const line = ( - <> - {glyph} - {label} - {end} - > - ); - return onPress === undefined ? ( - {line} - ) : ( - - ); -} - -/** One of the quieter lines under a card's name, which a press opens: a task, or a repository on GitHub. */ -export function CardDetail({ - glyph, - label, - onPress, -}: { - glyph: React.ReactNode; - label: string; - onPress: () => void; -}): React.JSX.Element { - return ( - - ); -} - /** A repository's line under a card's name, its owner's picture before it, which opens it on GitHub. */ export function RepositoryDetail({ repository, @@ -148,7 +107,8 @@ export function RepositoryDetail({ onOpenGitHub: (url: string) => void; }): React.JSX.Element { return ( -