diff --git a/docs/screenshots/settings-appearance.png b/docs/screenshots/settings-appearance.png new file mode 100644 index 00000000..b769fe50 Binary files /dev/null and b/docs/screenshots/settings-appearance.png differ diff --git a/docs/screenshots/settings-editor.png b/docs/screenshots/settings-editor.png new file mode 100644 index 00000000..5cbea371 Binary files /dev/null and b/docs/screenshots/settings-editor.png differ diff --git a/docs/screenshots/settings-toolbars.png b/docs/screenshots/settings-toolbars.png new file mode 100644 index 00000000..4705486e Binary files /dev/null and b/docs/screenshots/settings-toolbars.png differ diff --git a/scripts/toolbarCustomizationWiring.test.ts b/scripts/toolbarCustomizationWiring.test.ts index 1af4c54a..f6740bd8 100644 --- a/scripts/toolbarCustomizationWiring.test.ts +++ b/scripts/toolbarCustomizationWiring.test.ts @@ -3,12 +3,15 @@ import { readFileSync } from 'node:fs'; import { test } from 'node:test'; import { getSupportedLanguages, translations, type LanguageCode } from '../src/lib/utils/i18n.js'; +import { EDITOR_TOOLBAR_TOOLS } from '../src/lib/utils/editorToolbar.js'; +import { settingsRedesignTranslationKeys } from '../src/lib/utils/settingsRedesignTranslations.js'; const markdownViewer = readFileSync('src/lib/MarkdownViewer.svelte', 'utf8'); const settingsComponent = readFileSync('src/lib/components/Settings.svelte', 'utf8'); const settingsStore = readFileSync('src/lib/stores/settings.svelte.ts', 'utf8'); const titleBar = readFileSync('src/lib/components/TitleBar.svelte', 'utf8'); const toastComponent = readFileSync('src/lib/components/Toast.svelte', 'utf8'); +const globalStyles = readFileSync('src/styles.css', 'utf8'); function getDirectTranslation(lang: LanguageCode, key: string): string | undefined { let current: unknown = translations[lang]; @@ -93,6 +96,45 @@ test('toolbar settings use collapsed accordions for application and editor toolb } assert.match(settingsComponent, /\.toolbar-settings\[open\]\s+\.toolbar-settings-chevron/); assert.match(settingsComponent, /\.toolbar-settings-summary::-webkit-details-marker/); + assert.doesNotMatch(settingsComponent, /class="toolbar-settings-header"/); + assert.match(settingsComponent, /\.toolbar-settings-reset\s*\{[\s\S]*?position:\s*absolute/); +}); + +test('appearance uses the shared settings group and native controls', () => { + const appearanceBlock = settingsComponent.match( + /{:else if activeCategory === 'appearance'}([\s\S]*?){:else if activeCategory === 'toolbars'}/, + ); + assert.ok(appearanceBlock); + assert.match(appearanceBlock[1], /
/); + assert.match(appearanceBlock[1], /
/); + assert.match(appearanceBlock[1], / + {#if settingsSearch.trim()} +
+ {#if settingsSearchResults.length > 0} + {#each settingsSearchResults as result} + + {/each} + {:else} + {t('settings.noSearchResults', settings.language)} + {/if} +
+ {/if} +
- - - - -