Skip to content

Build your personal knowledge base with Trilium Notes

client/options: fix an issue

Adorian Doran069af2f228ec
diff --git a/apps/client/src/widgets/type_widgets/options/appearance.css b/apps/client/src/widgets/type_widgets/options/appearance.css
index 48e4dc3322..fae40d6dbc 100644
--- a/apps/client/src/widgets/type_widgets/options/appearance.css
+++ b/apps/client/src/widgets/type_widgets/options/appearance.css
@@ -1,3 +1,7 @@
+.theme-family-icon {
+ margin-inline-end: 8px;
+}
+
.appearance-layout-choices {
display: flex;
flex-wrap: wrap;
diff --git a/apps/client/src/widgets/type_widgets/options/appearance.tsx b/apps/client/src/widgets/type_widgets/options/appearance.tsx
index 93929b6c61..9648d8f402 100644
--- a/apps/client/src/widgets/type_widgets/options/appearance.tsx
+++ b/apps/client/src/widgets/type_widgets/options/appearance.tsx
@@ -182,7 +182,7 @@ function UserInterface() {
<OptionCardSection name="theme" label={t("theme.theme_label")}>
<Dropdown
text={<>
- <span className={currentFamilyIcon} style={{ marginRight: "8px" }} />
+ <span className={`theme-family-icon ${currentFamilyIcon}`} />
{currentFamilyLabel}
</>}
mobileBottomSheet
diff --git a/apps/client/src/widgets/type_widgets/options/code_notes.css b/apps/client/src/widgets/type_widgets/options/code_notes.css
index 532384d9fe..ecc80f9092 100644
--- a/apps/client/src/widgets/type_widgets/options/code_notes.css
+++ b/apps/client/src/widgets/type_widgets/options/code_notes.css
@@ -1,6 +1,8 @@
/* The frame a code block has inside a note (theme-next/notes/text.css). */
.code-note-preview .note-detail-readonly-code-content {
+ margin: 0;
border-radius: 6px;
box-shadow: var(--code-block-box-shadow);
+ height: 200px;
overflow: hidden;
}
diff --git a/apps/client/src/widgets/type_widgets/options/code_notes.tsx b/apps/client/src/widgets/type_widgets/options/code_notes.tsx
index 4de1ea819f..e729ae7c28 100644
--- a/apps/client/src/widgets/type_widgets/options/code_notes.tsx
+++ b/apps/client/src/widgets/type_widgets/options/code_notes.tsx
@@ -199,11 +199,7 @@ function CodeNotePreview({ themeName, wordWrapping, indentSize }: { themeName: s
}, [ themeName ]);
return (
- <div
- ref={containerRef}
- class="note-detail-readonly-code-content"
- style={{ margin: 0, height: "200px" }}
- />
+ <div ref={containerRef} class="note-detail-readonly-code-content" />
);
}
diff --git a/apps/client/src/widgets/type_widgets/options/i18n.spec.tsx b/apps/client/src/widgets/type_widgets/options/i18n.spec.tsx
index 43ff276737..3d98d5b51f 100644
--- a/apps/client/src/widgets/type_widgets/options/i18n.spec.tsx
+++ b/apps/client/src/widgets/type_widgets/options/i18n.spec.tsx
@@ -112,3 +112,4 @@ describe("the Language & Region page", () => {
expect(mocks.saved).toContainEqual([ "firstDayOfWeek", "7" ]);
});
});
+
diff --git a/packages/trilium-e2e/src/i18n.spec.ts b/packages/trilium-e2e/src/i18n.spec.ts
index c7b59d825d..f717bf2bae 100644
--- a/packages/trilium-e2e/src/i18n.spec.ts
+++ b/packages/trilium-e2e/src/i18n.spec.ts
@@ -40,7 +40,8 @@ test("User can change language from settings", async ({ page, context }) => {
await app.goToSettings();
await app.goToSettingsPage("_optionsLocalization");
- const languageCombobox = app.dropdown(app.optionsDialogContent.locator(".options-section .dropdown").first());
+ // Named rather than counted: the option's `name` prefixes the id of the control it labels.
+ const languageCombobox = app.dropdown(app.optionsDialogContent.locator(".dropdown:has(> button[id^='language-'])"));
const restartButton = app.optionsDialogContent.locator("button[name=restart-app-button]");
// Check that the default value (English) is set.