mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Refine header emphasis, field-on-layer treatment, and narrow-pane control collapse
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user