Skip to content

Build your personal knowledge base with Trilium Notes

Revert "feat(breadcrumb): display workspace text"

Elian Doraneb99352fff50
diff --git a/apps/client/src/widgets/layout/Breadcrumb.css b/apps/client/src/widgets/layout/Breadcrumb.css
index 55d393f348..d98b1ed913 100644
--- a/apps/client/src/widgets/layout/Breadcrumb.css
+++ b/apps/client/src/widgets/layout/Breadcrumb.css
@@ -40,14 +40,6 @@
padding: 0;
}
- .btn.root-note {
- box-shadow: unset;
- background: unset;
- padding-inline: 0.5em;
- color: inherit;
- min-width: unset;
- }
-
.dropdown-item span,
.dropdown-item strong,
.breadcrumb-last-item {
diff --git a/apps/client/src/widgets/layout/Breadcrumb.tsx b/apps/client/src/widgets/layout/Breadcrumb.tsx
index e3d6cf4193..7278b403bc 100644
--- a/apps/client/src/widgets/layout/Breadcrumb.tsx
+++ b/apps/client/src/widgets/layout/Breadcrumb.tsx
@@ -9,7 +9,6 @@ import FNote from "../../entities/fnote";
import link_context_menu from "../../menus/link_context_menu";
import froca from "../../services/froca";
import ActionButton from "../react/ActionButton";
-import Button from "../react/Button";
import Dropdown from "../react/Dropdown";
import { FormListItem } from "../react/FormList";
import { useChildNotes, useNote, useNoteLabel, useNoteProperty } from "../react/hooks";
@@ -63,10 +62,10 @@ function BreadcrumbRoot({ noteContext }: { noteContext: NoteContext | undefined
const title = useNoteProperty(note, "title");
return (note &&
- <Button
+ <ActionButton
className="root-note"
icon={note.getIcon()}
- text={note.noteId !== "root" ? (title ?? "") : ""}
+ text={title ?? ""}
onClick={() => noteContext?.setNote(note.noteId)}
onContextMenu={(e) => {
e.preventDefault();
diff --git a/apps/client/src/widgets/react/Button.tsx b/apps/client/src/widgets/react/Button.tsx
index 8ba5bd4652..6089f17095 100644
--- a/apps/client/src/widgets/react/Button.tsx
+++ b/apps/client/src/widgets/react/Button.tsx
@@ -1,11 +1,11 @@
-import type { ComponentChildren, HTMLAttributes, RefObject } from "preact";
-import { memo } from "preact/compat";
+import type { ComponentChildren, RefObject } from "preact";
+import type { CSSProperties } from "preact/compat";
import { useMemo } from "preact/hooks";
-
+import { memo } from "preact/compat";
import { CommandNames } from "../../components/app_context";
import Icon from "./Icon";
-export interface ButtonProps extends Pick<HTMLAttributes<HTMLButtonElement>, "className" | "style" | "onContextMenu"> {
+export interface ButtonProps {
name?: string;
/** Reference to the button element. Mostly useful for requesting focus. */
buttonRef?: RefObject<HTMLButtonElement>;
@@ -18,6 +18,7 @@ export interface ButtonProps extends Pick<HTMLAttributes<HTMLButtonElement>, "cl
primary?: boolean;
disabled?: boolean;
size?: "normal" | "small" | "micro";
+ style?: CSSProperties;
triggerCommand?: CommandNames;
title?: string;
}
@@ -77,7 +78,7 @@ export function ButtonGroup({ children }: { children: ComponentChildren }) {
<div className="btn-group" role="group">
{children}
</div>
- );
+ )
}
export function SplitButton({ text, icon, children, ...restProps }: {
@@ -102,7 +103,7 @@ export function SplitButton({ text, icon, children, ...restProps }: {
{children}
</ul>
</ButtonGroup>
- );
+ )
}
export default Button;