Refine header emphasis, field-on-layer treatment, and narrow-pane control collapse

This commit is contained in:
2026-06-10 14:14:02 +03:00
parent 2410c6e965
commit 68a044752f
18 changed files with 478 additions and 88 deletions
+15 -4
View File
@@ -33,6 +33,7 @@ import { notify } from '../stores/NotificationStore';
import { usePreviewStore } from '../stores/PreviewStore';
import { selectActiveSnippet, selectShownText, useSnippetStore } from '../stores/SnippetStore';
import { useUserSettingsStore } from '../stores/UserSettingsStore';
import { Icon } from './Icon';
import { SegmentedControl, type SegmentedOption } from './SegmentedControl';
import {
NumberControl,
@@ -189,23 +190,33 @@ function EditorToolbar() {
<span className={styles.spacer} />
{/* Secondary actions collapse to icon-only when the editor pane is narrow
(a @container query in the CSS), so "Extract to Dataset" no longer wraps
to two lines and Revert/Publish stay on one row. The label rides in
`title` (and the accessible name) when only the icon shows. Publish — the
one primary action — keeps its label at every width. */}
{canExtract && (
<button
type="button"
className={styles.action}
className={`${styles.action} ${styles.collapsible}`}
onClick={() => openModal('extract')}
title="Extract inline data into a reusable dataset"
aria-label="Extract to Dataset"
>
Extract to Dataset
<Icon name="dataset" className={styles.actionIcon} />
<span className={styles.actionLabel}>Extract to Dataset</span>
</button>
)}
<button
type="button"
className={styles.action}
className={`${styles.action} ${styles.collapsible}`}
onClick={() => void handleRevert()}
disabled={activeId === null || !dirty}
title="Revert draft to the last published version"
aria-label="Revert"
>
Revert
<Icon name="revert" className={styles.actionIcon} />
<span className={styles.actionLabel}>Revert</span>
</button>
<button
type="button"