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
refactor(dropdown): open the hand-made bottom sheets with `mobileBottomSheet`
Elian Doran6f31d21635cb
diff --git a/apps/client/src/widgets/dialogs/revisions.tsx b/apps/client/src/widgets/dialogs/revisions.tsxindex 7b5486ed18..894e9a3eb9 100644--- a/apps/client/src/widgets/dialogs/revisions.tsx+++ b/apps/client/src/widgets/dialogs/revisions.tsx@@ -244,7 +244,7 @@ function RevisionsMenu({ note, onRevisionSaved, onAllDeleted, hasRevisions }: {buttonClassName="custom-title-bar-button"noSelectButtonStylebuttonProps={{ title: t("revisions.menu_tooltip") }}- dropdownContainerClassName="mobile-bottom-menu"+ mobileBottomSheet><FormListItemicon="bx bx-save"diff --git a/apps/client/src/widgets/layout/ActiveContentBadges.tsx b/apps/client/src/widgets/layout/ActiveContentBadges.tsxindex 7ce70e9514..925b6c58a1 100644--- a/apps/client/src/widgets/layout/ActiveContentBadges.tsx+++ b/apps/client/src/widgets/layout/ActiveContentBadges.tsx@@ -172,10 +172,7 @@ function ActiveContentBadge({ info, note }: { note: FNote, info: ActiveContentInclassName={clsx("active-content-badge", info.canToggleEnabled && !info.isEnabled && "disabled")}icon={icon}text={title}- dropdownProps={{- dropdownContainerClassName: "mobile-bottom-menu",- mobileBackdrop: true- }}+ dropdownProps={{ mobileBottomSheet: true }}>{additionalOptions?.length && (<>diff --git a/apps/client/src/widgets/note_bars/CollectionProperties.tsx b/apps/client/src/widgets/note_bars/CollectionProperties.tsxindex 199a223228..441a026c0b 100644--- a/apps/client/src/widgets/note_bars/CollectionProperties.tsx+++ b/apps/client/src/widgets/note_bars/CollectionProperties.tsx@@ -168,8 +168,7 @@ function ViewOptions({ note, viewType, optionsChildren }: {<DropdownbuttonClassName="bx bx-cog icon-action"hideToggleArrow- dropdownContainerClassName="mobile-bottom-menu"- mobileBackdrop+ mobileBottomSheet>{properties.map((property, index) => (<ViewProperty key={index} note={note} property={property} />diff --git a/apps/client/src/widgets/react/IconPicker.tsx b/apps/client/src/widgets/react/IconPicker.tsxindex dc08cf6db1..26003cd60f 100644--- a/apps/client/src/widgets/react/IconPicker.tsx+++ b/apps/client/src/widgets/react/IconPicker.tsx@@ -356,7 +356,7 @@ function FilterRow({ filterByPrefix, search, setSearch, setFilterByPrefix, filtehideToggleArrownoSelectButtonStyleiconAction- dropdownContainerClassName="mobile-bottom-menu"+ mobileBottomSheet>{onReset && <><FormListItemdiff --git a/apps/client/src/widgets/ribbon/NoteActions.tsx b/apps/client/src/widgets/ribbon/NoteActions.tsxindex 92ed156ff7..67f9eff54b 100644--- a/apps/client/src/widgets/ribbon/NoteActions.tsx+++ b/apps/client/src/widgets/ribbon/NoteActions.tsx@@ -117,12 +117,11 @@ export function NoteContextMenu({ note, noteContext, itemsAtStart, itemsNearNotedropdownRef={dropdownRef}buttonClassName={ isNewLayout ? "bx bx-dots-horizontal-rounded" : "bx bx-dots-vertical-rounded" }className="note-actions"- dropdownContainerClassName="mobile-bottom-menu"+ mobileBottomSheethideToggleArrownoSelectButtonStyleiconActiononHidden={() => itemToFocusRef.current = null }- mobileBackdrop>{itemsAtStart}diff --git a/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx b/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsxindex 2d58fc1913..e4796b64e4 100644--- a/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx+++ b/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx@@ -98,7 +98,7 @@ export default function SearchDefinitionTab({ note, ntxId, hidden }: Pick<TabCon<DropdownbuttonClassName="action-add-toggle btn btn-sm"text={<><Icon icon="bx bx-plus" />{" "}{t("search_definition.option")}</>}- dropdownContainerClassName="mobile-bottom-menu" mobileBackdrop+ mobileBottomSheetnoSelectButtonStyle>{searchOptions?.availableOptions.map(({ icon, label, tooltip, attributeName, attributeType, defaultValue }) => (@@ -222,7 +222,7 @@ function AddBulkActionButton({ note }: { note: FNote }) {buttonClassName="action-add-toggle btn btn-sm"text={<><Icon icon="bx bxs-zap" />{" "}{t("search_definition.action")}</>}noSelectButtonStyle- dropdownContainerClassName="mobile-bottom-menu" mobileBackdrop+ mobileBottomSheet>{ACTION_GROUPS.map(({ actions, title }, index) => (<Fragment key={index}>diff --git a/apps/client/src/widgets/type_widgets/Attachment.tsx b/apps/client/src/widgets/type_widgets/Attachment.tsxindex 065524d753..a21907f1b3 100644--- a/apps/client/src/widgets/type_widgets/Attachment.tsx+++ b/apps/client/src/widgets/type_widgets/Attachment.tsx@@ -429,8 +429,7 @@ function AttachmentActions({ attachment, copyAttachmentReferenceToClipboard, onStext={<Icon icon="bx bx-dots-vertical-rounded" />}buttonClassName="icon-action-always-border"iconAction- dropdownContainerClassName="mobile-bottom-menu"- mobileBackdrop+ mobileBottomSheet><FormListItemicon="bx bx-file-find"