mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 22:02:16 +00:00
feat(ui): InlineAction for small text actions, with a 44 px touch floor
Thirty-three hand-rolled underlined text links and buttons (Open schedule, Select all, View all, Retry, Learn more, the device-code copy action, ...) carried three different focus rings, none on half of them, and a 16 px target on a phone. They now render through one InlineAction primitive: tone primary / muted / foreground, size xs / sm, a focus ring, and min-h-11 on a coarse pointer so the desktop layout does not move. A structural test refuses a new hand-rolled copy.
This commit is contained in:
1 parent
ce8074ad08
commit
60be63bcd1
33 files changed
+484
-222
No files matched your search
@@ -36,6 +36,7 @@ import {
|
||||
invalidateKeys,
|
||||
queryKeys,
|
||||
} from "@/lib/query-keys";
|
||||
import { InlineAction } from "@/components/ui/inline-action";
|
||||
|
||||
interface CentralCodexStatus {
|
||||
status: string;
|
||||
@@ -228,15 +229,15 @@ export function CentralCodexSection() {
|
||||
{t("settings.ai.deviceCodeStep2")}
|
||||
<div className="bg-card border-border mt-2 inline-flex items-center gap-2 rounded border px-3 py-2 font-mono text-lg tracking-widest">
|
||||
{deviceCode.userCode}
|
||||
<button
|
||||
type="button"
|
||||
<InlineAction
|
||||
tone="muted"
|
||||
className="underline"
|
||||
onClick={() =>
|
||||
navigator.clipboard?.writeText(deviceCode.userCode)
|
||||
}
|
||||
className="text-muted-foreground hover:text-foreground text-xs underline"
|
||||
>
|
||||
{t("settings.ai.deviceCodeCopy")}
|
||||
</button>
|
||||
</InlineAction>
|
||||
</div>
|
||||
</li>
|
||||
<li>{t("settings.ai.deviceCodeStep3")}</li>
|
||||
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
import type { ModuleKey } from "@/lib/modules/registry";
|
||||
import { SettingsToggle } from "./_shared";
|
||||
import { apiGet, apiPatch } from "@/lib/api/api-fetch";
|
||||
import { InlineAction } from "@/components/ui/inline-action";
|
||||
|
||||
/**
|
||||
* v1.18.0 — operator-side panel for server-wide module availability, the
|
||||
@@ -127,12 +128,11 @@ export function ModuleAvailabilitySection() {
|
||||
onCheckedChange={() => {}}
|
||||
disabled
|
||||
/>
|
||||
<Link
|
||||
href="/admin/coach"
|
||||
className="text-primary text-xs underline-offset-4 hover:underline"
|
||||
>
|
||||
{t("admin.section.coach.title")}
|
||||
</Link>
|
||||
<InlineAction asChild>
|
||||
<Link href="/admin/coach">
|
||||
{t("admin.section.coach.title")}
|
||||
</Link>
|
||||
</InlineAction>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import { useTranslations } from "@/lib/i18n/context";
|
||||
import { queryKeys } from "@/lib/query-keys";
|
||||
import { type AdminAuditEntry, useAuthActionLabels } from "./_shared";
|
||||
import { apiGet } from "@/lib/api/api-fetch";
|
||||
import { InlineAction } from "@/components/ui/inline-action";
|
||||
|
||||
const PREVIEW_LIMIT = 10;
|
||||
|
||||
@@ -61,13 +62,12 @@ export function RecentAuditPreview() {
|
||||
titleId="admin-overview-audit-heading"
|
||||
title={t("admin.overview.auditTitle")}
|
||||
status={
|
||||
<Link
|
||||
href="/admin/login-overview"
|
||||
className="text-primary inline-flex items-center gap-1 text-sm underline-offset-2 hover:underline"
|
||||
>
|
||||
{t("admin.overview.auditViewAll")}
|
||||
<ArrowRight className="h-3.5 w-3.5" aria-hidden="true" />
|
||||
</Link>
|
||||
<InlineAction asChild size="sm">
|
||||
<Link href="/admin/login-overview">
|
||||
{t("admin.overview.auditViewAll")}
|
||||
<ArrowRight className="size-3.5" aria-hidden="true" />
|
||||
</Link>
|
||||
</InlineAction>
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
Reference in new issue
Block a user