diff --git a/docs/design.md b/docs/design.md index 1787d2588..3b5b27d21 100644 --- a/docs/design.md +++ b/docs/design.md @@ -117,6 +117,7 @@ - Connectionsの基本、踏み台・転送・その他、表示とターミナル、最終的な値の各タブは、tablistと選択中tabpanelを同じ外枠へ入れます。tabpanelを内側へpaddingし、タブから離れた別ブロックに見せません。各tabの`aria-controls`とtabpanelの`aria-labelledby`を対にします。踏み台・転送・その他のタブは、踏み台・ポート転送・その他の設定を節に分けて1画面に並べ、タブの中にさらにタブを置きません。Hostブロックの文をそのまま編集する欄は、見出しの「…」の[テキストで編集]で開き、URLでは`advanced=raw`で表します。 - 主要操作は対象と動作を明確にし、説明や未設定状態よりも目立たせます。Homeは検索・必要なグループ・接続先を主役にし、未所属や未接続の繰り返しを省きます。PCではカードのクリックで選択、ダブルクリックで接続します。タッチは1タップ、キーボードはEnter/Spaceで接続します。Homeには常設Connectボタンと操作方法の案内文を置かず、開始中の表示とカードの操作メニューを残します。Connectionsの設定画面にはConnectボタンを置きます。 - フォーカスリングとチェック済みの印にも同じaccentを使います。ターミナルとコードエディタは各自のフォーカス/選択描画を維持します。フォーカスの枠は、`web/src/index.css`の決まりが付ける2pxのアウトライン(要素から2px離す)の1つの形だけです。ボタン・リンク・入力欄には決まりが自動で付けるので、部品の側でリングや枠線の色を重ねません。親がはみ出しを切っていて外側の枠が欠ける要素には`sshc-focus-inset`を付け、枠を内側に描きます。PCの大きさの画面で枠が欠ける部品は、全ページを巡回する`web/e2e/layout-audit.spec.ts`が`cut-focus-outline`として報告します。押せないボタンの不透明度も同じファイルの決まりが50%にそろえるので、部品の側に`disabled:opacity-*`を書きません(書いても効きません)。明暗それぞれで小さな文字・選択中の文字・主要ボタンの文字のコントラストを確認します。 +- ページ・ペイン・ダイアログの中の節見出しは、14pxの太字(`text-sm font-semibold`)にそろえます。`PageSection`とSettingsの節がこの形で、ほかの場所は`web/src/ui/form.tsx`の`sectionHeading`を使います。ファイル名を見出しにする場所(プレビュー、比較、変更の確認)は中太のままです。 - 文字の大きさは、Tailwindの`text-xs`(12px)・`text-sm`(14px)・`text-base`(16px)・`text-lg`・`text-xl`・`text-2xl`と、`web/src/index.css`の`@theme`が足す`text-3xs`(10px、札やキーの印)・`text-2xs`(11px、小さなラベルとセッションの行の2行目)・`text-ui`(13px、入力欄・ボタン・エディタ)だけを使います。名前は14px、補助の文は12pxです。`text-[12.5px]`のような直書きと0.5px刻みは使いません(`web/src/ui/fontSize.test.ts`が検査します。丸い印の中の記号の8px以下は対象外です)。足した3つは行の高さを持たないので、行の高さは置く場所の`leading-*`で決めます。共有の入力欄(`control`)に`text-xs`などを重ねても、CSSの並び順で`text-ui`が勝つので効きません。 - 重なりの順番は、ページの中(上に貼り付く見出し、スマホの下のナビゲーション、引き出し、メニュー、ダイアログ)を`z-50`までの数で書きます。それより手前に出す層は`web/src/index.css`が名前を付けます。コマンドパレットは`z-palette`(70)、ダイアログを開いていても見せる知らせ・リンクの行き先・コマンドのカードは`z-above-dialog`(80)、エンジンに届かないときの画面は`z-fallback`(100)です。`z-[70]`のような直書きは`web/src/ui/layers.test.ts`が検査します。 - パレットの規則は `web/src/ui/palette.test.ts` で検査します。Tailwind のパレット名(`text-red-400` など)、任意値(`text-[#ff0000]`)、inline style の hex 値を走査し、違反箇所をファイル名と行番号付きで報告します。例外は `palette-exempt` を記載した行だけで、現在は native の色入力が独自の既定値を必要とする 2 行に使用しています。 diff --git a/web/src/connections/OrphanPanel.tsx b/web/src/connections/OrphanPanel.tsx index df9c50071..234f6dd27 100644 --- a/web/src/connections/OrphanPanel.tsx +++ b/web/src/connections/OrphanPanel.tsx @@ -71,7 +71,7 @@ export function OrphanPanel({ metadata, hosts, onSave }: OrphanPanelProps) { return (
-

+

{t("orphan.heading")}

{t("orphan.explain")}

diff --git a/web/src/connections/SavePreview.tsx b/web/src/connections/SavePreview.tsx index c4f577b22..eeb76f932 100644 --- a/web/src/connections/SavePreview.tsx +++ b/web/src/connections/SavePreview.tsx @@ -56,7 +56,7 @@ export function SavePreviewPanel({ return (
-

{t("preview.heading")}

+

{t("preview.heading")}

{preview === null ? null : ( {preview.diffs.length} diff --git a/web/src/snippets/SnippetRunSection.tsx b/web/src/snippets/SnippetRunSection.tsx index 5792744fe..2f0eb5d13 100644 --- a/web/src/snippets/SnippetRunSection.tsx +++ b/web/src/snippets/SnippetRunSection.tsx @@ -58,7 +58,7 @@ export function SnippetRunSection({ {preview === null ? null : (
-

{t("snippets.confirm")}

+

{t("snippets.confirm")}

{preview.targets.map((target) => (

@@ -81,7 +81,7 @@ export function SnippetRunSection({ {job === null ? null : (

-

+

{t("snippets.results")} · {t(snippetStatusLabelKey(job.status))}

{job.status === "running" ? ( diff --git a/web/src/terminal/RunTargetConnectingPanel.tsx b/web/src/terminal/RunTargetConnectingPanel.tsx index 566d9e077..22e57f77f 100644 --- a/web/src/terminal/RunTargetConnectingPanel.tsx +++ b/web/src/terminal/RunTargetConnectingPanel.tsx @@ -31,7 +31,7 @@ export function RunTargetConnectingPanel({ alias, awaitingEngine, onUseThisMachi
-

{text.heading}

+

{text.heading}

{text.detail === "" ? null :

{text.detail}

}
{/* Outside the status: a screen reader would otherwise read it out every second. */} diff --git a/web/src/terminal/RunTargetRefusalPanel.tsx b/web/src/terminal/RunTargetRefusalPanel.tsx index 379370611..3135f30d5 100644 --- a/web/src/terminal/RunTargetRefusalPanel.tsx +++ b/web/src/terminal/RunTargetRefusalPanel.tsx @@ -90,7 +90,7 @@ export function RunTargetRefusalPanel({
-

{heading}

+

{heading}

{reason === "" ? null :

{reason}

}
diff --git a/web/src/terminal/TerminalPortForwards.tsx b/web/src/terminal/TerminalPortForwards.tsx index 1db1af072..94017ace9 100644 --- a/web/src/terminal/TerminalPortForwards.tsx +++ b/web/src/terminal/TerminalPortForwards.tsx @@ -129,7 +129,7 @@ export function TerminalPortForwards({ {session.state === "reconnecting" ? {t("terminal.forwardPausedReconnect")} : null}
-

{t("terminal.forwardActive")}

+

{t("terminal.forwardActive")}

{forwards.length === 0 ?

{t("terminal.forwardNone")}

: ( {forwards.map((forward) => ( @@ -160,7 +160,7 @@ export function TerminalPortForwards({
-

{t("terminal.forwardNew")}

+

{t("terminal.forwardNew")}

{t("conn.forwardLoopbackOnly")}
diff --git a/web/src/terminal/commands/WorkspaceCommandCenter.tsx b/web/src/terminal/commands/WorkspaceCommandCenter.tsx index e4cb359a9..453346a6c 100644 --- a/web/src/terminal/commands/WorkspaceCommandCenter.tsx +++ b/web/src/terminal/commands/WorkspaceCommandCenter.tsx @@ -320,7 +320,7 @@ export function WorkspaceCommandCenter({
{prepared === null ? null : (
-

+

{t("workspace.previewHeading")}

@@ -349,7 +349,7 @@ export function WorkspaceCommandCenter({ )} {dispatch === null ? null : (
-

+

{t("workspace.deliveryResults")}

diff --git a/web/src/terminal/splitView/SplitSessionPicker.tsx b/web/src/terminal/splitView/SplitSessionPicker.tsx index fe22f5d0a..1057d9843 100644 --- a/web/src/terminal/splitView/SplitSessionPicker.tsx +++ b/web/src/terminal/splitView/SplitSessionPicker.tsx @@ -14,7 +14,7 @@ export function SplitSessionPicker({ sessions, onSelect, onOpenNew, onClose }: { const t = useTranslate(); return ( -

{t("splitView.chooseSession")}

+

{t("splitView.chooseSession")}

    {sessions.map((session) => (
  • diff --git a/web/src/ui/form.tsx b/web/src/ui/form.tsx index ea31902a4..a6f30ff45 100644 --- a/web/src/ui/form.tsx +++ b/web/src/ui/form.tsx @@ -61,7 +61,9 @@ export const dialogHeading = "text-base font-semibold text-ink"; export const fieldLabel = "text-xs text-ink-muted"; export const hintText = "text-xs text-ink-muted"; -export const sectionHeading = "text-sm font-medium text-ink"; +// sectionHeading is the heading of a section inside a page, a pane or a dialog: as heavy as the headings of +// PageSection and the settings, so that every section of the application is headed alike. +export const sectionHeading = "text-sm font-semibold text-ink"; export const tableHeadRow = "border-b border-line text-xs text-ink-faint";