diff --git a/ordinis-admin-ui/src/components/form/SchemaDrivenForm.tsx b/ordinis-admin-ui/src/components/form/SchemaDrivenForm.tsx index 8aafb72..e426786 100644 --- a/ordinis-admin-ui/src/components/form/SchemaDrivenForm.tsx +++ b/ordinis-admin-ui/src/components/form/SchemaDrivenForm.tsx @@ -356,26 +356,11 @@ export const SchemaDrivenForm = ({ }) } - // Wide-mode left rail: detection через ResizeObserver. Когда form container - // ≥720px (drawer wide mode = 880px) — показываем 180px nav rail слева - // с section list + counts. Иначе chip strip на top sufficient. Container- - // based вместо viewport-based чтобы narrow drawer на wide viewport не - // рендерил rail (drawer = 520px не fits). + // Wide-mode left rail УБРАН — user feedback: «в редакторе записей все + // таки левая навигация лишняя». В sections layout остался только chip + // strip сверху (sticky), он же выполняет функцию quick-jump. const formContainerRef = useRef(null) - const [showRail, setShowRail] = useState(false) - useEffect(() => { - if (!showAllSections || !formContainerRef.current) return - const node = formContainerRef.current - const ro = new ResizeObserver((entries) => { - const width = entries[0]?.contentRect.width ?? 0 - setShowRail(width >= 720) - }) - ro.observe(node) - return () => ro.disconnect() - }, [showAllSections]) - // Body content (sections + form fields) — рендерится либо напрямую, - // либо в grid 180px+1fr когда showRail (wide mode). const sectionsChipStrip = showAllSections ? (
{visibleTabs.map((tab) => ( @@ -394,36 +379,12 @@ export const SchemaDrivenForm = ({
) : null - // Left rail для wide mode — sticky nav с section list + per-section - // field counts. Click → scrollToSection (smooth scroll к anchor). - const leftRail = showRail && showAllSections ? ( - - ) : null - return (
- {leftRail}
{showAllSections ? sectionsChipStrip : ( setActiveTab(id)} /> diff --git a/ordinis-admin-ui/src/components/record/RecordDrawer.tsx b/ordinis-admin-ui/src/components/record/RecordDrawer.tsx index 9977019..ba58354 100644 --- a/ordinis-admin-ui/src/components/record/RecordDrawer.tsx +++ b/ordinis-admin-ui/src/components/record/RecordDrawer.tsx @@ -182,9 +182,12 @@ export function RecordDrawer({ aria-label={t('history.title')} title={t('history.title')} onClick={onHistory} - className="p-1.5 rounded-sm text-mute hover:text-ink hover:bg-surface-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" + // Icon-only вариант user'у было незаметно («кнопок не вижу»). + // Теперь icon + text label, более prominent в header'е. + className="inline-flex items-center gap-1.5 px-2 py-1 rounded-sm text-cap text-ink-2 hover:text-ink hover:bg-surface-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" > - + + {t('history.title')} )} {copied ? t('json.copied', { defaultValue: 'Скопировано' }) : t('json.copy', { defaultValue: 'Копировать' })} -
+      {/* Code block — dark theme (space palette из graph), убираем cream
+        * bg-surface-2 который user feedback'нул как «желтый кремовый».
+        * Highlight token colors (text-accent/green/pink/warn) работают на
+        * тёмном фоне OK благодаря accessible contrast. */}
+