fix: the note buttons say what they insert

The Footnotes group was one labelled button and two bare icons, one of them
the table-of-contents levels glyph. Both insert commands are now labelled big
buttons, and the options move to the group's ↘ launcher, where both word
processors open their footnote dialog. The glyphs draw a page: the note under
its separator at the foot, or the stack whose last page carries the list.
This commit is contained in:
Steffen Becker committed 2026-08-14 23:59:03 +02:00
1 parent 2e9c3b20ed
commit 13dcb148a2
5 files changed
+19 -26

No files matched your search

+8 -6
View File
@@ -1765,10 +1765,12 @@
title={hfActive ? t().toolbarExpanded.noteNotInHf : `${t().toolbarExpanded.insertFootnote} (${shortcutHint('footnote')})`}
aria-label={t().toolbarExpanded.insertFootnote}
>
<!-- Kept in step with the ribbon's `footnote` glyph (ribbon/icons.ts). -->
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
<path d="M2 2.5h12M2 5h12M2 7.5h7" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" />
<path d="M2 11h4.5" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" />
<path d="M2 13.5h9" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" />
<path d="M3 1.75h10v12.5H3z" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round" />
<path d="M5.2 4.7h5.6M5.2 7h5.6" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" />
<path d="M5.2 10.5h3" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" />
<path d="M5.2 12.4h5.6" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" />
</svg>
</button>
<button
@@ -1778,9 +1780,9 @@
aria-label={t().toolbarExpanded.insertEndnote}
>
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
<path d="M2 2.5h12M2 5h12M2 7.5h7" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" />
<path d="M2 10.5h12" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" />
<path d="M2 13.5h9" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" />
<path d="M10.5 4.25V1.75H2V12h3.5" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round" />
<path d="M5.5 4.25h8v10h-8z" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round" />
<path d="M7.3 7h4.4M7.3 9.2h4.4M7.3 11.4h2.6" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" />
</svg>
</button>
<button
+5 -4
View File
@@ -119,10 +119,11 @@ export const STROKED = {
link: ['M6.6 9.4 9.4 6.6', 'M7.4 4.4 9 2.8a2.7 2.7 0 0 1 3.8 3.8l-1.6 1.6', 'M8.6 11.6 7 13.2a2.7 2.7 0 0 1-3.8-3.8l1.6-1.6'],
bookmark: ['M4 2.25h8v11.5L8 10.5l-4 3.25z'],
crossRef: ['M2.5 3.5h6M2.5 6.5h4M2.5 9.5h5', 'M8.5 12.5h5M11 10l2.5 2.5L11 15'],
// Body text over a short rule with one note line under it — the footnote area as it
// is drawn; the endnote's rule runs the full width, because the page ends there.
footnote: ['M2 2.5h12M2 5h12M2 7.5h7', 'M2 11h4.5', 'M2 13.5h9'],
endnote: ['M2 2.5h12M2 5h12M2 7.5h7', 'M2 10.5h12', 'M2 13.5h9'],
// A page with its text and, under the short separator rule, the note at its foot.
footnote: ['M3 1.75h10v12.5H3z', 'M5.2 4.7h5.6M5.2 7h5.6', 'M5.2 10.5h3', 'M5.2 12.4h5.6'],
// The notes at the end instead: a stack whose last page carries the list. The page
// behind is traced only where the front one does not cover it.
endnote: ['M10.5 4.25V1.75H2V12h3.5', 'M5.5 4.25h8v10h-8z', 'M7.3 7h4.4M7.3 9.2h4.4M7.3 11.4h2.6'],
// The whole page with one zone filled in, so which end it is reads at a glance.
header: ['M3.5 1.75h9v12.5h-9z', 'M5.4 7.8h5.2M5.4 9.9h5.2M5.4 12h3.1'],
footer: ['M3.5 1.75h9v12.5h-9z', 'M5.4 4h5.2M5.4 6.1h5.2M5.4 8.2h3.1'],
@@ -122,29 +122,25 @@
<CaptionDialog bind:open={captionOpen} {editor} />
<BibliographyDialog bind:open={citationOpen} {editor} />
<RibbonGroup label={t().ribbon.groups.notes}>
<!-- The options sit on the group's ↘ launcher, where both word processors open their
footnote dialog — a fourth button beside two insert commands says nothing. -->
<RibbonGroup label={t().ribbon.groups.notes} onLauncher={onNoteOptions} launcherTitle={t().notesDialog.title}>
<RibbonButton
variant="big"
icon="footnote"
label={t().ribbon.footnote}
label={t().toolbarExpanded.insertFootnote}
title={hfActive ? t().toolbarExpanded.noteNotInHf : `${t().toolbarExpanded.insertFootnote} (${shortcutHint('footnote')})`}
disabled={!editor || !!hfActive}
onclick={() => editor?.chain().focus().insertNote('footnote').run()}
/>
<RibbonButton
variant="big"
icon="endnote"
label={t().ribbon.endnote}
label={t().toolbarExpanded.insertEndnote}
title={hfActive ? t().toolbarExpanded.noteNotInHf : `${t().toolbarExpanded.insertEndnote} (${shortcutHint('endnote')})`}
disabled={!editor || !!hfActive}
onclick={() => editor?.chain().focus().insertNote('endnote').run()}
/>
<RibbonButton
icon="tocLevels"
label={t().ribbon.noteOptions}
title={t().notesDialog.title}
disabled={!onNoteOptions}
onclick={() => onNoteOptions?.()}
/>
</RibbonGroup>
<style>
-3
View File
@@ -754,9 +754,6 @@ const de: Messages = {
thisSection: 'Dieser Abschnitt',
likeDocument: 'Wie das Dokument',
citation: 'Literaturangabe',
footnote: 'Fußnote',
endnote: 'Endnote',
noteOptions: 'Optionen',
autoCorrect: 'AutoKorrektur',
hyphenation: 'Silbentrennung',
repeatHeaderRow: 'Kopfzeile wiederholen',
-3
View File
@@ -758,9 +758,6 @@ const en = {
citation: 'Citation',
tocOptions: 'Levels',
tocMaxLevel: 'Deepest level shown',
footnote: 'Footnote',
endnote: 'Endnote',
noteOptions: 'Options',
autoCorrect: 'AutoCorrect',
hyphenation: 'Hyphenation',
repeatHeaderRow: 'Repeat header',