From b94912789f7d7be93def334aeb3377dd0dad409d Mon Sep 17 00:00:00 2001 From: "Zimin A.N." Date: Mon, 11 May 2026 14:31:35 +0300 Subject: [PATCH] fix(fonts): semantic typography utilities per handoff (7 roles) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Заменяет blanket override из MR !45 на типизированную type scale per design_handoff_ordinis_mdm/README.md "Scale" section. Семь semantic @utility в styles.css: text-title-xl 22/600 — modal title, section header text-title-lg 17/600 — page title в editor text-title-md 15/600 — dictionary card title text-body 13/400 — workhorse: body, buttons, tabs, inputs text-cell 12.5/500 — table cell text text-mono 11/500 — Mono: IDs, dates, FK refs (font-mono baked in) text-cap 10.5/600 — Tektur UPPERCASE caption (font/uppercase baked in) Audit phases: P1: добавил 7 утилит, font/uppercase/tracking baked где надо P2: 43 deterministic codemods (font-mono+text-2xs/[11px] → text-mono, [15/17/22]px+font-semibold → text-title-*, [12.5]px → text-cell, [10.5]px+uppercase+tracking → text-cap) P3: 64 text-sm → text-body (handoff workhorse), 84 text-2xs context-aware (TableCell → text-cell, bare → text-cell, плюс cleanup caps в backticks template literals который Phase 2 пропустил), 25 text-xs (6 → text-mono когда с font-mono, 19 → text-cell), 8 titles text-base/lg → text-title-* P4: убрал --text-2xs override (no users), оставил --text-sm: 13px scoped к @nstart/ui passthrough (см. comment в styles.css — убирается в Stage 3.9) Stats: text-body: 69 | text-cell: 99 | text-mono: 50 | text-cap: 42 text-title-xl: 5 | text-title-lg: 5 | text-title-md: 7 text-sm/text-2xs/text-xs в src/: 0 (только в styles.css комментариях) Поведение всех 277 typography usages теперь явно соответствует handoff — каждое место осознанно выбрано под роль, не плажирующий override. --- ordinis-admin-ui/src/auth/AuthBadge.tsx | 2 +- ordinis-admin-ui/src/auth/RequireAuth.tsx | 8 +- .../src/components/form/SchemaDrivenForm.tsx | 10 +-- .../src/components/geo/AoiPickerDialog.tsx | 8 +- .../src/components/graph/DictionaryGraph.tsx | 8 +- .../src/components/layout/Sidebar.tsx | 13 ++- .../src/components/layout/TopBar.tsx | 6 +- .../lineage/CascadeConfirmDialog.tsx | 14 ++-- .../lineage/DictionaryDependentsPanel.tsx | 6 +- .../components/lineage/DictionaryHubView.tsx | 12 +-- .../lineage/RecordDependentsPanel.tsx | 12 +-- .../components/record/RecordHistoryDrawer.tsx | 10 +-- .../schema/DictionaryEditorDialog.tsx | 18 ++-- .../components/schema/EventsPreviewTab.tsx | 12 +-- .../src/components/schema/PropertyEditor.tsx | 6 +- .../timetravel/TimeTravelPicker.tsx | 22 ++--- .../src/components/version/UpdateBanner.tsx | 2 +- .../src/components/version/VersionBadge.tsx | 2 +- ordinis-admin-ui/src/routes/audit.tsx | 18 ++-- .../src/routes/dictionaries.$name.tsx | 66 +++++++-------- .../src/routes/dictionaries.index.tsx | 20 ++--- ordinis-admin-ui/src/routes/my-drafts.tsx | 14 ++-- ordinis-admin-ui/src/routes/outbox.tsx | 12 +-- ordinis-admin-ui/src/routes/reviews.tsx | 26 +++--- ordinis-admin-ui/src/routes/search.tsx | 10 +-- ordinis-admin-ui/src/routes/webhooks.$id.tsx | 42 +++++----- .../src/routes/webhooks.index.tsx | 10 +-- ordinis-admin-ui/src/styles.css | 84 +++++++++++++++---- ordinis-admin-ui/src/ui/components/alert.tsx | 2 +- ordinis-admin-ui/src/ui/components/badge.tsx | 2 +- ordinis-admin-ui/src/ui/components/button.tsx | 4 +- ordinis-admin-ui/src/ui/components/card.tsx | 4 +- ordinis-admin-ui/src/ui/components/dialog.tsx | 4 +- .../src/ui/components/dropdown-menu.tsx | 10 +-- .../src/ui/components/empty-state.tsx | 4 +- ordinis-admin-ui/src/ui/components/input.tsx | 8 +- ordinis-admin-ui/src/ui/components/label.tsx | 2 +- .../src/ui/components/loading-block.tsx | 2 +- .../src/ui/components/page-header.tsx | 4 +- .../src/ui/components/popover.tsx | 2 +- ordinis-admin-ui/src/ui/components/scope.tsx | 2 +- ordinis-admin-ui/src/ui/components/sheet.tsx | 4 +- ordinis-admin-ui/src/ui/components/tabs.tsx | 2 +- .../src/ui/components/textarea.tsx | 6 +- .../src/ui/components/toaster.tsx | 2 +- .../src/ui/components/tooltip.tsx | 2 +- 46 files changed, 296 insertions(+), 243 deletions(-) diff --git a/ordinis-admin-ui/src/auth/AuthBadge.tsx b/ordinis-admin-ui/src/auth/AuthBadge.tsx index a6b5776..a8a0736 100644 --- a/ordinis-admin-ui/src/auth/AuthBadge.tsx +++ b/ordinis-admin-ui/src/auth/AuthBadge.tsx @@ -58,7 +58,7 @@ export function AuthBadge() { return (
- + {display} diff --git a/ordinis-admin-ui/src/auth/RequireAuth.tsx b/ordinis-admin-ui/src/auth/RequireAuth.tsx index eb19619..3b7b41f 100644 --- a/ordinis-admin-ui/src/auth/RequireAuth.tsx +++ b/ordinis-admin-ui/src/auth/RequireAuth.tsx @@ -34,14 +34,14 @@ export function RequireAuth({ children }: { children: ReactNode }) { return (
-

Ошибка входа

-

+

Ошибка входа

+

Keycloak вернул ошибку:{' '} {oidcError}

{drawMode === 'polygon' && ( - + {t('aoi.dialog.polygonHint')} )} diff --git a/ordinis-admin-ui/src/components/graph/DictionaryGraph.tsx b/ordinis-admin-ui/src/components/graph/DictionaryGraph.tsx index c1ad7fc..c7b7730 100644 --- a/ordinis-admin-ui/src/components/graph/DictionaryGraph.tsx +++ b/ordinis-admin-ui/src/components/graph/DictionaryGraph.tsx @@ -89,11 +89,11 @@ export function DictionaryGraph() { } if (dictsQuery.error) { - return
Ошибка загрузки: {String(dictsQuery.error)}
+ return
Ошибка загрузки: {String(dictsQuery.error)}
} if (dicts.length === 0) { - return
Справочники не найдены.
+ return
Справочники не найдены.
} return ( @@ -222,7 +222,7 @@ function GraphCanvas({ return (
{depsLoading && ( -
+
Загрузка связей…
)} @@ -318,7 +318,7 @@ function GraphCanvas({ })} {/* Legend */} -
+
Bundle
{Object.entries(BUNDLE_COLORS) .filter(([k]) => k !== 'default') diff --git a/ordinis-admin-ui/src/components/layout/Sidebar.tsx b/ordinis-admin-ui/src/components/layout/Sidebar.tsx index 0d4cf9c..ea15e84 100644 --- a/ordinis-admin-ui/src/components/layout/Sidebar.tsx +++ b/ordinis-admin-ui/src/components/layout/Sidebar.tsx @@ -140,7 +140,7 @@ export function Sidebar() { {/* User block — sticky bottom */} {auth.isAuthenticated && auth.user?.profile && (
-
+
{String( auth.user.profile.preferred_username || auth.user.profile.name || @@ -150,7 +150,7 @@ export function Sidebar() { .toUpperCase()}
-
+
{String( auth.user.profile.preferred_username || auth.user.profile.name || @@ -159,7 +159,7 @@ export function Sidebar() { )}
{auth.user.profile.email && ( -
{String(auth.user.profile.email)}
+
{String(auth.user.profile.email)}
)}
@@ -179,9 +179,8 @@ function SidebarLink({ to, label, icon: Icon, badge }: NavItem) { {/* Breadcrumb — left */} -