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
feat(status_bar): add a help button for the attribute pane
Elian Doran1927e1feaac8
diff --git a/apps/client/src/widgets/layout/StatusBar.css b/apps/client/src/widgets/layout/StatusBar.cssindex f0a10ab8b8..a35890fc3c 100644--- a/apps/client/src/widgets/layout/StatusBar.css+++ b/apps/client/src/widgets/layout/StatusBar.css@@ -179,15 +179,22 @@ body.experimental-feature-new-layout.mobile div.similar-notes-widget div.similardisplay: flex;padding: 6px 12px;background: var(--bottom-panel-title-bar-background-color);- justify-content: space-between;align-items: center;+ gap: 4px;.bottom-panel-title-bar-caption {+ flex-grow: 1;text-transform: uppercase;letter-spacing: .3pt;font-weight: 600;font-size: .85em;}++ .icon-action {+ --icon-button-size: 24px;+ --icon-button-icon-ratio: 0.8;+ border-radius: 50%;+ }}.bottom-panel-content {diff --git a/apps/client/src/widgets/layout/StatusBar.tsx b/apps/client/src/widgets/layout/StatusBar.tsxindex 50657867cd..69c9f327f6 100644--- a/apps/client/src/widgets/layout/StatusBar.tsx+++ b/apps/client/src/widgets/layout/StatusBar.tsx@@ -24,9 +24,9 @@ import { useActiveNoteContext, useLegacyImperativeHandlers, useNoteLabel, useNotimport Icon from "../react/Icon";import LinkButton from "../react/LinkButton";import { ParentComponent } from "../react/react_utils";+import AutoLinkAttributesTab from "../ribbon/AutoLinkAttributesTab";import { ContentLanguagesModal, NoteTypeCodeNoteList, NoteTypeOptionsModal, useLanguageSwitcher, useMimeTypes } from "../ribbon/BasicPropertiesTab";import AttributeEditor, { AttributeEditorImperativeHandlers } from "../ribbon/components/AttributeEditor";-import AutoLinkAttributesTab from "../ribbon/AutoLinkAttributesTab";import InheritedAttributesTab from "../ribbon/InheritedAttributesTab";import { NoteSizeWidget, useNoteMetadata } from "../ribbon/NoteInfoTab";import { NotePathsWidget, useSortedNotePaths } from "../ribbon/NotePathsTab";@@ -397,7 +397,8 @@ function AttributesPane({ note, noteContext, attributesShown, setAttributesShown<BottomPanel title={t("attributes_panel.title")}className="attribute-list"visible={attributesShown}- setVisible={setAttributesShown}>+ setVisible={setAttributesShown}+ helpPage="zEY4DaJG4YT5"><span class="attributes-panel-label">{t("inherited_attribute_list.title")}</span><InheritedAttributesTab {...context} emptyListString="inherited_attribute_list.none" />@@ -583,12 +584,14 @@ interface BottomPanelParams {visible: boolean;setVisible?: (visible: boolean) => void;className?: string;+ helpPage?: string;}-function BottomPanel({ children, title, visible, setVisible, className }: BottomPanelParams) {+function BottomPanel({ children, title, visible, setVisible, className, helpPage }: BottomPanelParams) {return <div className={clsx("bottom-panel", className, {"hidden-ext": !visible})}><div className="bottom-panel-title-bar"><span className="bottom-panel-title-bar-caption">{title}</span>+ {helpPage && <button class="icon-action bx bx-question-mark" onClick={() => openInAppHelpFromUrl(helpPage)} title={t("open-help-page")} />}<button class="icon-action bx bx-x" onClick={() => setVisible?.(false)} /></div><div class={clsx("bottom-panel-content")}>