Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(ribbon): tooltip for expand button
Elian Dorandc572c381583
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex c1ad3fc288..bacd7dc953 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -764,7 +764,7 @@"grid": "Grid","list": "List","collapse_all_notes": "Collapse all notes",- "expand_all_children": "Expand all children",+ "expand_tooltip": "Expands the direct children of this collection (one level deep). For more options, press the arrow on the right.","collapse": "Collapse","expand": "Expand","expand_first_level": "Expand direct children",diff --git a/apps/client/src/widgets/react/Button.tsx b/apps/client/src/widgets/react/Button.tsxindex 0732fbb0ce..6089f17095 100644--- a/apps/client/src/widgets/react/Button.tsx+++ b/apps/client/src/widgets/react/Button.tsx@@ -81,9 +81,10 @@ export function ButtonGroup({ children }: { children: ComponentChildren }) {)}-export function SplitButton({ text, icon, children, onClick }: {+export function SplitButton({ text, icon, children, ...restProps }: {text: string;icon?: string;+ title?: string;/** Click handler for the main button component (not the split). */onClick?: () => void;/** The children inside the dropdown of the split. */@@ -91,7 +92,7 @@ export function SplitButton({ text, icon, children, onClick }: {}) {return (<ButtonGroup>- <button type="button" class="btn btn-secondary" onClick={onClick}>+ <button type="button" class="btn btn-secondary" {...restProps}>{icon && <Icon icon={`bx ${icon}`} />}{text}</button>diff --git a/apps/client/src/widgets/ribbon/CollectionPropertiesTab.tsx b/apps/client/src/widgets/ribbon/CollectionPropertiesTab.tsxindex 80627151f1..374633c49a 100644--- a/apps/client/src/widgets/ribbon/CollectionPropertiesTab.tsx+++ b/apps/client/src/widgets/ribbon/CollectionPropertiesTab.tsx@@ -120,6 +120,7 @@ function SplitButtonPropertyView({ note, property }: { note: FNote, property: Spreturn <SplitButtontext={property.label}icon={property.icon}+ title={property.title}onClick={() => clickContext && property.onClick(clickContext)}>{parentComponent && <ItemsComponent note={note} parentComponent={parentComponent} />}diff --git a/apps/client/src/widgets/ribbon/collection-properties-config.tsx b/apps/client/src/widgets/ribbon/collection-properties-config.tsxindex 41cf352348..f5fa6d5f3d 100644--- a/apps/client/src/widgets/ribbon/collection-properties-config.tsx+++ b/apps/client/src/widgets/ribbon/collection-properties-config.tsx@@ -95,7 +95,7 @@ export const bookPropertiesConfig: Record<ViewTypeOptions, BookConfig> = {},{label: t("book_properties.expand"),- title: t("book_properties.expand_all_children"),+ title: t("book_properties.expand_tooltip"),type: "split-button",icon: "bx bx-move-vertical",onClick: buildExpandListHandler(1),