Skip to content

Build your personal knowledge base with Trilium Notes

refactor(client): clear out what the status bar no longer shows

Elian Dorand0ebb2f02986
diff --git a/apps/client/src/widgets/layout/StatusBar.css b/apps/client/src/widgets/layout/StatusBar.css
index 0336b18247..c2b6776a2e 100644
--- a/apps/client/src/widgets/layout/StatusBar.css
+++ b/apps/client/src/widgets/layout/StatusBar.css
@@ -146,15 +146,6 @@ body.experimental-feature-new-layout .note-info-content {
}
}
-body.experimental-feature-new-layout div.similar-notes-widget div.similar-notes-wrapper {
- max-height: unset;
-}
-
-body.experimental-feature-new-layout.mobile div.similar-notes-widget div.similar-notes-wrapper {
- max-height: unset;
- padding: 0;
-}
-
.bottom-panel {
margin: 0 !important;
padding: 0;
diff --git a/apps/client/src/widgets/layout/StatusBar.tsx b/apps/client/src/widgets/layout/StatusBar.tsx
index 1eb639bf14..55debf2679 100644
--- a/apps/client/src/widgets/layout/StatusBar.tsx
+++ b/apps/client/src/widgets/layout/StatusBar.tsx
@@ -38,18 +38,17 @@ import { convertIndentation } from "./reindentation";
interface StatusBarContext {
note: FNote;
- notePath: string | null | undefined;
noteContext: NoteContext;
viewScope?: ViewScope;
hoistedNoteId?: string;
}
export default function StatusBar() {
- const { note, notePath, noteContext, viewScope, hoistedNoteId } = useActiveNoteContext();
+ const { note, noteContext, viewScope, hoistedNoteId } = useActiveNoteContext();
// The attributes are the one thing the status bar still shows in a panel of its own; the rest of
// what it stands for is shown in the sidebar (see useConnectionsToggle).
const [ attributesShown, setAttributesShown ] = useState(false);
- const context: StatusBarContext | undefined | null = note && noteContext && { note, notePath, noteContext, viewScope, hoistedNoteId };
+ const context: StatusBarContext | undefined | null = note && noteContext && { note, noteContext, viewScope, hoistedNoteId };
const attributesContext: AttributesProps | undefined | null = context && { ...context, attributesShown, setAttributesShown };
const isHiddenNote = note?.isHiddenCompletely();
diff --git a/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.css b/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.css
index f3e1503471..80dcda4b54 100644
--- a/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.css
+++ b/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.css
@@ -1,3 +1,11 @@
.code-note-switcher-modal .dropdown-menu {
background: none !important;
}
+
+/* The modal is the frame here, so the list keeps neither the cap nor the padding it is given for the
+ ribbon's tab (see SimilarNotesTab.css). Kept to the new layout, as it was when it lived in
+ StatusBar.css — the old mobile look is not this change's to alter. */
+body.experimental-feature-new-layout .similar-notes-modal .similar-notes-wrapper {
+ max-height: unset;
+ padding: 0;
+}
diff --git a/apps/client/src/widgets/sidebar/SimilarNotes.css b/apps/client/src/widgets/sidebar/SimilarNotes.css
new file mode 100644
index 0000000000..3314876a0f
--- /dev/null
+++ b/apps/client/src/widgets/sidebar/SimilarNotes.css
@@ -0,0 +1,5 @@
+/* The card scrolls its own body (see RightPanelContainer.css), so the list is not capped a second time
+ within it — the cap in SimilarNotesTab.css is for the ribbon's tab, which has no such frame around it. */
+#right-pane .similar-notes-widget .similar-notes-wrapper {
+ max-height: unset;
+}
diff --git a/apps/client/src/widgets/sidebar/SimilarNotes.tsx b/apps/client/src/widgets/sidebar/SimilarNotes.tsx
index eb842e71ce..7c3740a20b 100644
--- a/apps/client/src/widgets/sidebar/SimilarNotes.tsx
+++ b/apps/client/src/widgets/sidebar/SimilarNotes.tsx
@@ -1,3 +1,5 @@
+import "./SimilarNotes.css";
+
import { t } from "../../services/i18n";
import { useActiveNoteContext } from "../react/hooks";
// The list itself is shared with the ribbon's similar notes tab and the mobile note menu; only the