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 panels from a component of their own
Elian Doran94c6635e1a63
diff --git a/.claude/skills/building-client-ui/SKILL.md b/.claude/skills/building-client-ui/SKILL.mdindex 603a03a4fb..ddbb451e93 100644--- a/.claude/skills/building-client-ui/SKILL.md+++ b/.claude/skills/building-client-ui/SKILL.md@@ -1,6 +1,6 @@---name: building-client-ui-description: Use when building or changing any UI in the Trilium client (`apps/client`) — a dialog, a settings pane, a form, a toolbar, a badge, a link, a dropdown menu, a type widget, a control floating over a note's content (map, mind map, image, diagram, presentation), or any component that reads/writes a note's title, label, relation, blob or option. Catalogues the froca-reactive hooks (useNoteProperty / useNoteLabel / useNoteBlob / useChildNotes / useTriliumOption / useNoteContext) and which `loadResults` filter each already wires, the reusable Preact components under `apps/client/src/widgets/react/` (which one to reach for instead of a hand-rolled `<input>`/`<button>`/`<a>`/pill), the `Dropdown` backdrop-blur rules (`noDropdownListStyle` / `portalToBody`), the `OverlayControlGroup` / `OverlayToolbar` contract for controls over a canvas, the event-summoned Modal/LazyDialog wiring, and how to boot a login-free fixture instance to inspect real computed styles when a style, placement or stacking bug cannot be read off the stylesheets. The home for client UI guidance that outgrows CLAUDE.md.+description: Use when building or changing any UI in the Trilium client (`apps/client`) — a dialog, a settings pane, a form, a toolbar, a badge, a link, a dropdown menu, a type widget, a control floating over a note's content (map, mind map, image, diagram, presentation), or any component that reads/writes a note's title, label, relation, blob or option. Catalogues the froca-reactive hooks (useNoteProperty / useNoteLabel / useNoteBlob / useChildNotes / useTriliumOption / useNoteContext) and which `loadResults` filter each already wires, the reusable Preact components under `apps/client/src/widgets/react/` (which one to reach for instead of a hand-rolled `<input>`/`<button>`/`<a>`/pill), when a dropdown is a `Dropdown` menu and when a `DropdownPanel`, the `OverlayControlGroup` / `OverlayToolbar` contract for controls over a canvas, the event-summoned Modal/LazyDialog wiring, and how to boot a login-free fixture instance to inspect real computed styles when a style, placement or stacking bug cannot be read off the stylesheets. The home for client UI guidance that outgrows CLAUDE.md.---# Building client UI@@ -61,7 +61,7 @@ Form controls:- `FormSelect` — dropdown/combobox taking an object array as data. `FormDropdownList` for a list of items with icons; `FormAutocomplete` / `NoteAutocomplete` for typeahead (the latter searches notes).- `FormCheckbox`, `FormToggle`, `FormRadioGroup` / `FormInlineRadioGroup` — boolean and exclusive choices. `SegmentedChoice` is a row of buttons acting as one exclusive choice (use where a dropdown would hide the alternatives).- `Slider` — range slider with label.-- `ColorPicker` — preset swatches plus the browser's native `<input type="color">`; value is a CSS color string, `onChange(null)` clears. It is a controlled, flat swatch row: wrap it in a `Dropdown` for a popover or use it inline; don't hand-roll a palette. `NoteColorPicker` is the note-bound variant that reads/writes the note's `color` label.+- `ColorPicker` — preset swatches plus the browser's native `<input type="color">`; value is a CSS color string, `onChange(null)` clears. It is a controlled, flat swatch row: wrap it in a `DropdownPanel` for a popover or use it inline; don't hand-roll a palette. `NoteColorPicker` is the note-bound variant that reads/writes the note's `color` label.- `IconPicker` — boxicons picker.- `FormGroup` — label + control + hint row for settings panes; `PropertySheet` for a whole sheet of them.- `FormFileUpload`, `FileDropZone` — file input and drag-and-drop target.@@ -108,27 +108,14 @@ Two rules that apply to all of them:- **Do not use Bootstrap utility classes** (`form-control-sm`, `form-select-sm`, `input-group`, …) on these components — they manage their own styling. Adjust sizing or layout through the component's props or its CSS custom properties, not Bootstrap overrides.- Before adding a prop or a variant, read the component's own doc comment; most already have the variant (outline badge, controlled collapsible, popover-wrapped picker).-## Dropdown menus and the backdrop blur+## Dropdowns: menus and panels-`Dropdown` is the Bootstrap dropdown wrapper (toggle button + menu, with `FormListItem` / `FormDropdownDivider` as items). The Next theme frosts every `.dropdown-menu` with `backdrop-filter`, along **two different paths**, and only one is reliable:+Both kinds of dropdown share a toggle and open in a `Popup` portaled onto `<body>`, placed by Floating UI, so an ancestor's `overflow`, `transform` or `filter` never clips, displaces or flattens them. Which one to use depends on what opens:-- **`::before` layer** (default for a menu *without* `tn-dropdown-list`) — the blur lives on a background-less pseudo-element at `z-index: -1`. Works everywhere.-- **Element-level filter** (what the `tn-dropdown-list` class switches to) — the blur sits on the menu element itself, which also paints a translucent background. It exists only because a **scrollable** menu can't use the pseudo (it would scroll away with the content). Opened inside the note's scrolling content area, this filter silently does nothing and the menu degrades to its bare ~85 %-alpha background — see-through over anything dark. `body.background-effects` already forces such menus to an opaque fallback for the same reason (see the comment in `theme-next/base.css`).+- **`Dropdown`** opens a **menu** (`Menu`). Its rows are `FormListItem`, `FormDropdownSubmenu`, `FormListHeader`, `FormDropdownDivider` and `FormListCustomItem`; the menu takes focus and moves between them with the arrow keys, Home/End and typeahead, and tells assistive technology it is a menu. It caps its height to the viewport and scrolls in `.tn-menu-scroll`, while its backdrop blur stays on the frame's `::before`, so it is frosted everywhere.+- **`DropdownPanel`** opens anything else: a picker, a form, a list of links, help text. Its fields keep their keys; Up and Down only move between `.dropdown-item`s. It carries `tn-dropdown-list`, which moves the blur onto the element itself — a filter that blurs nothing over note content — so pass **`noDropdownListStyle`** on a panel that does not scroll.-`Dropdown` adds `tn-dropdown-list` **by default**, so a new menu opts into the fragile path unless told otherwise:--- Pass **`noDropdownListStyle`** on any menu that doesn't scroll — nearly every action/`[…]` menu. `NoteActions`, the global menu, the note-icon picker and `HelpDropdown` all do.-- Pass **`portalToBody`** instead when the menu is fine but an *ancestor* establishes a containment/backdrop root (`container-type`, `transform`, `filter` — e.g. the peeked right pane), which flattens the blur into a flat tint.-- If a menu looks transparent rather than frosted, check these two before reaching for CSS overrides.--### A transformed ancestor also breaks placement and stacking--`portalToBody` has a second, unrelated reason to exist. `body.mobile .dropdown-menu` forces `position: fixed`, and the settings dialog's `.modal-dialog` carries a `transform` (the mobile master-detail slide between the page list and the page). A transformed ancestor is both:--1. the **containing block** for `position: fixed`, so a menu left to place itself lands adrift — measured at 160×160 at x=209, mid-page, on a Pixel 7 viewport; and-2. a **stacking context**, so the menu's `z-index: 3000` is confined inside the modal's own `z-index: 1055`. `#context-menu-cover` (the `mobileBackdrop`) is a `<body>` child at `z-index: 2500`, so it paints above the *whole* modal — dimming the menu along with the page behind it.--Both symptoms read as CSS bugs rather than containing-block ones. A mobile menu inside a modal wants `portalToBody` **plus** `dropdownContainerClassName="mobile-bottom-menu"` — see `CollapsedChoice` in `apps/client/src/widgets/react/SegmentedChoice.tsx`. Diagnose by walking the menu's ancestors for `transform` / `filter` / `container-type` in the running app rather than reasoning about the stylesheets.+A wrong pick fails quietly: a form in a `Dropdown` loses Up, Down, Tab and Escape to the menu, and a list of rows in a `DropdownPanel` gets none of the menu's keys. On a phone, pass `mobileBottomSheet` to open either as a sheet from the bottom of the screen over a dimmed page.## Controls floating over a note's contentdiff --git a/CLAUDE.md b/CLAUDE.mdindex 3a36c1a5ad..ec9ea55ab3 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -110,7 +110,7 @@ Frontend widgets in `apps/client/src/widgets/`:**Widget lifecycle**: `doRenderBody()` for initial render, `refreshWithNote()` for note changes, `entitiesReloadedEvent({loadResults})` for entity updates. Fluent builder pattern: `.child()`, `.class()`, `.css()` chaining with position-based ordering. These legacy widgets are jQuery; new UI is Preact under `widgets/react/` — don't mix the two inside one component.#### Reusable Preact Components-Shared components live in `apps/client/src/widgets/react/` — **always** reuse them (`FormTextBox`, `FormSelect`, `Button`, `Badge`, `NoItems`, `Dropdown`, `Table`, `Calendar`, …) instead of writing raw HTML elements or a custom implementation, and never put Bootstrap utility classes (`form-control-sm`, `input-group`, …) on them. Any control floating **over** a note's content (map, mind map, image, diagram) goes on `OverlayControlGroup` / `OverlayToolbar` — never a hand-rolled `<button>`. The full catalogue, the `Dropdown` backdrop-blur rules (`noDropdownListStyle` / `portalToBody`) and the overlay-control contract are in the **`building-client-ui` skill** — load it before building client UI.+Shared components live in `apps/client/src/widgets/react/` — **always** reuse them (`FormTextBox`, `FormSelect`, `Button`, `Badge`, `NoItems`, `Dropdown`, `Table`, `Calendar`, …) instead of writing raw HTML elements or a custom implementation, and never put Bootstrap utility classes (`form-control-sm`, `input-group`, …) on them. Any control floating **over** a note's content (map, mind map, image, diagram) goes on `OverlayControlGroup` / `OverlayToolbar` — never a hand-rolled `<button>`. The full catalogue, when to use a `Dropdown` menu and when a `DropdownPanel` and the overlay-control contract are in the **`building-client-ui` skill** — load it before building client UI.#### Component Styling- **Avoid inline styles** — do not use the `style` attribute/prop on JSX elements unless absolutely necessary (e.g. a truly dynamic, computed value that cannot be expressed in CSS). Static layout, sizing, spacing, and visual properties must go in CSS.diff --git a/apps/client/src/services/frontend_script_api_preact.ts b/apps/client/src/services/frontend_script_api_preact.tsindex 03d3e6d05d..f080c93b03 100644--- a/apps/client/src/services/frontend_script_api_preact.ts+++ b/apps/client/src/services/frontend_script_api_preact.ts@@ -10,7 +10,7 @@ import Button from "../widgets/react/Button";import CKEditor from "../widgets/react/CKEditor";import Collapsible, { ExternallyControlledCollapsible } from "../widgets/react/Collapsible";import ColorPicker from "../widgets/react/ColorPicker";-import Dropdown from "../widgets/react/Dropdown";+import Dropdown, { DropdownPanel } from "../widgets/react/Dropdown";import FormCheckbox from "../widgets/react/FormCheckbox";import FormDropdownList from "../widgets/react/FormDropdownList";import { FormFileUploadActionButton, FormFileUploadButton } from "../widgets/react/FormFileUpload";@@ -81,7 +81,7 @@ export const preactAPI = Object.freeze({CKEditor,Collapsible, ExternallyControlledCollapsible,ColorPicker,- Dropdown,+ Dropdown, DropdownPanel,FormCheckbox,FormDropdownList,FormFileUploadButton, FormFileUploadActionButton,diff --git a/apps/client/src/widgets/EmbeddedNotePane.tsx b/apps/client/src/widgets/EmbeddedNotePane.tsxindex ba1d5cfd41..2c779d31a1 100644--- a/apps/client/src/widgets/EmbeddedNotePane.tsx+++ b/apps/client/src/widgets/EmbeddedNotePane.tsx@@ -12,7 +12,7 @@ import linkContextMenu from "../menus/link_context_menu";import { t } from "../services/i18n";import link from "../services/link";import ActionButton from "./react/ActionButton";-import Dropdown from "./react/Dropdown";+import Dropdown, { DropdownPanel } from "./react/Dropdown";import { FormListItem } from "./react/FormList";import { useNoteContext } from "./react/hooks";import { NoteContextContext, ParentComponent } from "./react/react_utils";@@ -228,7 +228,6 @@ export function OpenNoteActions({ note }: { note: FNote }) {title={t("embedded_note.more-ways-to-open")}iconActionhideToggleArrow- noDropdownListStyle// The panel clips what overflows it, so a menu nested in the row would be cut off at// its edge; and a panel's backdrop filter would flatten the menu's own.portalToBody@@ -335,8 +334,7 @@ export function MaximizeToQuickEditAction({ note, onClose }: { note: FNote; onCl*/export function NoteColorAction({ note, title }: { note: FNote; title: string }) {return (- <Dropdown- panel+ <DropdownPanelclassName="tn-embedded-note-color"buttonClassName="bx bx-palette"title={title}@@ -346,6 +344,6 @@ export function NoteColorAction({ note, title }: { note: FNote; title: string })portalToBody><NoteColorPicker note={note} />- </Dropdown>+ </DropdownPanel>);}diff --git a/apps/client/src/widgets/buttons/global_menu.tsx b/apps/client/src/widgets/buttons/global_menu.tsxindex ca509b97f2..df5b769990 100644--- a/apps/client/src/widgets/buttons/global_menu.tsx+++ b/apps/client/src/widgets/buttons/global_menu.tsx@@ -42,7 +42,6 @@ export default function GlobalMenu({ isHorizontalLayout }: { isHorizontalLayout:<span className="bx bxs-down-arrow-alt global-menu-button-update-available-button" title={t("update_available.update_available")} /></div>}</>}- noDropdownListStylemobileBackdrop>{isMobile() && <>diff --git a/apps/client/src/widgets/collections/board/card_template_pill.tsx b/apps/client/src/widgets/collections/board/card_template_pill.tsxindex 914a0e2587..6e20beab46 100644--- a/apps/client/src/widgets/collections/board/card_template_pill.tsx+++ b/apps/client/src/widgets/collections/board/card_template_pill.tsx@@ -54,7 +54,6 @@ export default function CardTemplatePill({ offered, current, onSelect, onMore, otext={<span className="card-template-name">{current?.title ?? ""}</span>}title={t("board_view.card-template")}noSelectButtonStyle- noDropdownListStyleportalToBodyonShown={() => {setIsShown(true);diff --git a/apps/client/src/widgets/collections/board/group_by.tsx b/apps/client/src/widgets/collections/board/group_by.tsxindex 0494192f70..993977303e 100644--- a/apps/client/src/widgets/collections/board/group_by.tsx+++ b/apps/client/src/widgets/collections/board/group_by.tsx@@ -101,7 +101,6 @@ export default function BoardGroupBy({ note, options, current, onSelect }: {<><DropdownclassName="board-group-by"- noDropdownListStyletitle={t("board_view.group-by")}text={<><Icon icon="bx bx-category-alt" /> diff --git a/apps/client/src/widgets/collections/calendar/RecurrenceEditor.tsx b/apps/client/src/widgets/collections/calendar/RecurrenceEditor.tsxindex be404a13fc..dd4429c871 100644--- a/apps/client/src/widgets/collections/calendar/RecurrenceEditor.tsx+++ b/apps/client/src/widgets/collections/calendar/RecurrenceEditor.tsx@@ -6,7 +6,7 @@ import { useCallback, useEffect, useState } from "preact/hooks";import FNote from "../../../entities/fnote";import { t } from "../../../services/i18n";import LabelValueInput from "../../attribute_widgets/label_value_input";-import Dropdown from "../../react/Dropdown";+import { DropdownPanel } from "../../react/Dropdown";import FormSelect from "../../react/FormSelect";import FormTextBox, { FormTextBoxWithUnit } from "../../react/FormTextBox";import { useUniqueName } from "../../react/hooks";@@ -59,8 +59,7 @@ export default function RecurrenceEditor({ note }: { note: FNote }) {// trips. Portaled to the body because the popover clips what overflows it (see EventPopover.css).return (<EventField name={t("calendar.recurrence.repeats")}>- <Dropdown- panel+ <DropdownPanelclassName="calendar-recurrence-dropdown"text={modelTitle(model)}noDropdownListStyle@@ -72,7 +71,7 @@ export default function RecurrenceEditor({ note }: { note: FNote }) {{model.kind === "simple" && <SimpleRuleFields rule={model.rule} commit={commit} />}{model.kind === "custom" && <CustomRuleField value={model.value} commit={commit} />}</EventFieldList>- </Dropdown>+ </DropdownPanel></EventField>);}diff --git a/apps/client/src/widgets/collections/calendar/index.tsx b/apps/client/src/widgets/collections/calendar/index.tsxindex 0c152ede39..b60f61cdd1 100644--- a/apps/client/src/widgets/collections/calendar/index.tsx+++ b/apps/client/src/widgets/collections/calendar/index.tsx@@ -479,9 +479,7 @@ function CalendarViewSwitcher({ calendarRef, containerRef }: {<CollapseOnOverflow container={containerRef} alwaysCollapsed={isMobile()}>{(collapsed) => (collapsed? (- // A handful of views, so the menu never scrolls and can be frosted the way that- // survives being opened inside the note's own content (see noDropdownListStyle).- <Dropdown text={currentViewTypeData?.name} noDropdownListStyle>+ <Dropdown text={currentViewTypeData?.name}>{CALENDAR_VIEWS.map(viewData => (<FormListItemkey={viewData.type}diff --git a/apps/client/src/widgets/launch_bar/BookmarkButtons.tsx b/apps/client/src/widgets/launch_bar/BookmarkButtons.tsxindex d4e761fd9d..4d10103e64 100644--- a/apps/client/src/widgets/launch_bar/BookmarkButtons.tsx+++ b/apps/client/src/widgets/launch_bar/BookmarkButtons.tsx@@ -97,6 +97,7 @@ function BookmarkFolder({ note }: { note: FNote }) {return (<LaunchBarDropdownButton+ panellauncherNote={note}icon={icon}title={title}diff --git a/apps/client/src/widgets/launch_bar/CalendarWidget.tsx b/apps/client/src/widgets/launch_bar/CalendarWidget.tsxindex 21e4689cff..1376c69bbf 100644--- a/apps/client/src/widgets/launch_bar/CalendarWidget.tsx+++ b/apps/client/src/widgets/launch_bar/CalendarWidget.tsx@@ -58,6 +58,7 @@ export default function CalendarWidget({ launcherNote }: LauncherNoteProps) {return (<LaunchBarDropdownButton+ panellauncherNote={launcherNote}icon={icon} title={title}onShown={async () => {diff --git a/apps/client/src/widgets/launch_bar/launch_bar_widgets.tsx b/apps/client/src/widgets/launch_bar/launch_bar_widgets.tsxindex 07913d8599..b00ac9a766 100644--- a/apps/client/src/widgets/launch_bar/launch_bar_widgets.tsx+++ b/apps/client/src/widgets/launch_bar/launch_bar_widgets.tsx@@ -6,7 +6,7 @@ import FNote from "../../entities/fnote";import { showLauncherContextMenu } from "../../menus/launcher_button_context_menu";import utils from "../../services/utils";import ActionButton, { ActionButtonProps } from "../react/ActionButton";-import Dropdown, { DropdownProps } from "../react/Dropdown";+import Dropdown, { DropdownPanel, DropdownProps } from "../react/Dropdown";import { useNoteLabel, useNoteProperty } from "../react/hooks";import Icon from "../react/Icon";@@ -47,17 +47,22 @@ export function LaunchBarActionButton({ className, launcherNote, onContextMenu,);}-export function LaunchBarDropdownButton({ children, icon, dropdownOptions, launcherNote, buttonProps, ...props }: Pick<DropdownProps, "title" | "children" | "onShown" | "dropdownOptions" | "dropdownRef" | "buttonProps"> & { icon: string, launcherNote?: FNote }) {+export function LaunchBarDropdownButton({ children, icon, dropdownOptions, launcherNote, buttonProps, panel, ...props }: Pick<DropdownProps, "title" | "children" | "onShown" | "dropdownOptions" | "dropdownRef" | "buttonProps"> & {+ icon: string,+ launcherNote?: FNote,+ /** Opens a {@link DropdownPanel} rather than a menu, for content other than `FormList` rows. */+ panel?: boolean+}) {const { isHorizontalLayout } = useContext(LaunchBarContext);const titlePosition = getTitlePosition(isHorizontalLayout);const resolvedButtonProps = launcherNote && !buttonProps?.onContextMenu? { ...buttonProps, onContextMenu: launcherContextMenuHandler(launcherNote) }: buttonProps;+ const Component = panel ? DropdownPanel : Dropdown;return (- <Dropdown- panel+ <ComponentclassName="right-dropdown-widget"buttonClassName="right-dropdown-button launcher-button"hideToggleArrow@@ -73,7 +78,7 @@ export function LaunchBarDropdownButton({ children, icon, dropdownOptions, launcmobileBackdropbuttonProps={resolvedButtonProps}{...props}- >{children}</Dropdown>+ >{children}</Component>);}diff --git a/apps/client/src/widgets/layout/StatusBar.tsx b/apps/client/src/widgets/layout/StatusBar.tsxindex c1aa977221..1c9cf727c6 100644--- a/apps/client/src/widgets/layout/StatusBar.tsx+++ b/apps/client/src/widgets/layout/StatusBar.tsx@@ -19,7 +19,7 @@ import server from "../../services/server";import { openInAppHelpFromUrl } from "../../services/utils";import { formatDateTime } from "../../utils/formatters";import { BacklinksWidget, useBacklinkCount } from "../FloatingButtonsDefinitions";-import Dropdown, { DropdownProps } from "../react/Dropdown";+import Dropdown, { DropdownPanel, type DropdownPanelProps } from "../react/Dropdown";import { FormDropdownDivider, FormListHeader, FormListItem } from "../react/FormList";import HelpDropdown from "../react/HelpDropdown";import { useActiveNoteContext, useLegacyImperativeHandlers, useNoteLabel, useNoteLabelInt, useNoteLabelOptionalBool, useNoteProperty, useStaticTooltip, useTriliumEvent, useTriliumEvents, useTriliumOptionBool, useTriliumOptionInt, useAttachments } from "../react/hooks";@@ -91,12 +91,15 @@ export default function StatusBar() {);}-function StatusBarDropdown({ children, icon, text, buttonClassName, titleOptions, dropdownOptions, ...dropdownProps }: Omit<DropdownProps, "hideToggleArrow" | "title" | "titlePosition"> & {+function StatusBarDropdown({ children, icon, text, buttonClassName, titleOptions, dropdownOptions, panel, ...dropdownProps }: Omit<DropdownPanelProps, "hideToggleArrow" | "title" | "titlePosition"> & {title: string;icon?: string;+ /** Opens a {@link DropdownPanel} rather than a menu, for content other than `FormList` rows. */+ panel?: boolean;}) {+ const Component = panel ? DropdownPanel : Dropdown;return (- <Dropdown+ <ComponentbuttonClassName={clsx("status-bar-dropdown-button", buttonClassName)}titlePosition="top"titleOptions={{@@ -121,7 +124,7 @@ function StatusBarDropdown({ children, icon, text, buttonClassName, titleOptions{...dropdownProps}>{children}- </Dropdown>+ </Component>);}diff --git a/apps/client/src/widgets/note_bars/CollectionProperties.tsx b/apps/client/src/widgets/note_bars/CollectionProperties.tsxindex fc2447be0f..199a223228 100644--- a/apps/client/src/widgets/note_bars/CollectionProperties.tsx+++ b/apps/client/src/widgets/note_bars/CollectionProperties.tsx@@ -138,7 +138,6 @@ function ViewTypeSwitcher({ viewType, setViewType }: { viewType: ViewTypeOptionsreturn (<DropdowndropdownContainerRef={dropdownContainerRef}- noDropdownListStyletext={<><Icon icon={ICON_MAPPINGS[viewType]} /> {VIEW_TYPE_MAPPINGS[viewType]}@@ -170,7 +169,6 @@ function ViewOptions({ note, viewType, optionsChildren }: {buttonClassName="bx bx-cog icon-action"hideToggleArrowdropdownContainerClassName="mobile-bottom-menu"- noDropdownListStylemobileBackdrop>{properties.map((property, index) => (diff --git a/apps/client/src/widgets/react/Badge.tsx b/apps/client/src/widgets/react/Badge.tsxindex aee39de63f..f432c10182 100644--- a/apps/client/src/widgets/react/Badge.tsx+++ b/apps/client/src/widgets/react/Badge.tsx@@ -69,7 +69,6 @@ export function BadgeWithDropdown({ text, children, tooltip, className, dropdownclassName={className}{...props}/>}- noDropdownListStylenoSelectButtonStylehideToggleArrowtitle={tooltip}diff --git a/apps/client/src/widgets/react/Dropdown.spec.tsx b/apps/client/src/widgets/react/Dropdown.spec.tsxindex 9bbef4ac04..9ae974790e 100644--- a/apps/client/src/widgets/react/Dropdown.spec.tsx+++ b/apps/client/src/widgets/react/Dropdown.spec.tsx@@ -2,7 +2,7 @@ import { type ComponentChildren, render } from "preact";import { useRef } from "preact/hooks";import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";-import Dropdown, { type DropdownHandle, type DropdownProps } from "./Dropdown";+import Dropdown, { type DropdownHandle, DropdownPanel, type DropdownProps } from "./Dropdown";import { FormDropdownSubmenu, FormListItem } from "./FormList";// A dialog's focus trap would pull focus out of a menu portaled over it.@@ -32,15 +32,17 @@ describe("Dropdown", () => {layout.onMobile = false;});- function renderDropdown(props: Partial<DropdownProps> = {}, content: ComponentChildren = <li className="dropdown-item">By title</li>) {+ /** Renders a `Dropdown`, or a `DropdownPanel` for `panel`. */+ function renderDropdown({ panel, ...props }: Partial<DropdownProps> & { panel?: boolean } = {}, content: ComponentChildren = <li className="dropdown-item">By title</li>) {let handle: { current: DropdownHandle | null } = { current: null };+ const Component = panel ? DropdownPanel : Dropdown;function Harness() {const dropdownRef = useRef<DropdownHandle | null>(null);handle = dropdownRef;return (- <Dropdown text="Sort" dropdownRef={dropdownRef} dropdownContainerClassName="sort-menu" {...props}>+ <Component text="Sort" dropdownRef={dropdownRef} dropdownContainerClassName="sort-menu" {...props}>{content}- </Dropdown>+ </Component>);}render(<Harness />, host);@@ -187,6 +189,10 @@ describe("Dropdown", () => {toggle.focus();key(toggle, "ArrowDown");await vi.waitFor(() => expect(document.activeElement?.textContent).toBe("By title"));+ // A plain popup, which assistive technology is not told is a menu.+ expect(toggle.getAttribute("aria-haspopup")).toBe("true");+ expect(popup()?.getAttribute("role")).toBeNull();+ expect(popup()?.classList.contains("tn-dropdown-list")).toBe(true);// Bootstrap reacts on a toggle only with `data-bs-toggle`, which this one does not carry.bootstrapHeard.mockClear();diff --git a/apps/client/src/widgets/react/Dropdown.tsx b/apps/client/src/widgets/react/Dropdown.tsxindex 38eed3a5cf..2598cf0614 100644--- a/apps/client/src/widgets/react/Dropdown.tsx+++ b/apps/client/src/widgets/react/Dropdown.tsx@@ -9,7 +9,7 @@ import { isMobile } from "../../services/utils";import { useTooltip, useUniqueName } from "./hooks";import { suspendModalFocusTraps } from "./modal_focustrap";import Menu from "./Menu";-import Popup from "./Popup";+import Popup, { type PopupProps } from "./Popup";type DataAttributes = {[key: `data-${string}`]: string | number | boolean | undefined;@@ -28,19 +28,6 @@ export interface DropdownProps extends Pick<HTMLProps<HTMLDivElement>, "id" | "c/** If set to true, then the dropdown button will be considered an icon action (without normal border and sized for icons only). */iconAction?: boolean;noSelectButtonStyle?: boolean;- /**- * Drop the `tn-dropdown-list` class the menu otherwise carries by default.- *- * That class exists for **scrollable** menus: it moves the theme's backdrop blur off the menu's- * `::before` layer — which a scrollable menu would scroll away with its content — and onto the- * menu element itself. The element-level filter is the fragile one, though: opened over note- * content it blurs nothing at all, leaving the menu merely translucent and reading as- * see-through over anything dark.- *- * So set this on any menu that doesn't scroll (i.e. nearly every action menu) to keep it on the- * working pseudo-element layer.- */- noDropdownListStyle?: boolean;/*** The only supported way to disable the toggle. Bootstrap cannot close a menu whose toggle is* disabled through `buttonProps` or a `disabled` class.@@ -87,12 +74,18 @@ export interface DropdownProps extends Pick<HTMLProps<HTMLDivElement>, "id" | "c* {@link portalToBody} for that, and does nothing without it.*/backdrop?: boolean;+}++export interface DropdownPanelProps extends DropdownProps {/**- * Holds something other than a menu's rows, such as a picker or a form, which stands in a- * plain popup: a menu would take the keys its fields need, and tell assistive technology it is- * a menu.+ * Drops the `tn-dropdown-list` class the panel otherwise carries.+ *+ * That class is for a panel that scrolls: it moves the theme's backdrop blur off the `::before`+ * layer, which would scroll away with the content, and onto the panel element itself. Over note+ * content the element's filter blurs nothing, leaving the panel merely translucent, so set this+ * on a panel that does not scroll. A `Dropdown` menu keeps its blur on a layer that stays put.*/- panel?: boolean;+ noDropdownListStyle?: boolean;}/** Opens and closes a dropdown from outside it, for a caller that decides when. */@@ -105,7 +98,86 @@ export interface DropdownHandle {/** The gap, in pixels, between the toggle and its popup, as Bootstrap's dropdowns kept. */const TOGGLE_GAP = 2;-export default function Dropdown({ id, className, buttonClassName, isStatic, children, title, text, dropdownContainerStyle, dropdownContainerClassName, dropdownContainerRef: externalContainerRef, hideToggleArrow, iconAction, disabled, noSelectButtonStyle, noDropdownListStyle, forceShown, onShown, onHidden, dropdownOptions, buttonProps, dropdownRef, titlePosition, titleOptions, mobileBackdrop: mobileBackdropProp, mobileBottomSheet, backdrop, panel }: DropdownProps) {+/**+ * A menu under a toggle: its rows are `FormListItem`s and the other `FormList` rows, which the+ * menu's keys move between. For anything else, such as a picker or a form, use {@link DropdownPanel}.+ */+export default function Dropdown(props: DropdownProps) {+ return (+ <DropdownToggle+ {...props}+ hasPopup="menu"+ popup={({ popupProps, className, bottomSheet, startAt, isWanted, dismiss, close }) => (+ <Menu+ {...popupProps}+ className={className}+ bottomSheet={bottomSheet}+ startAt={startAt}+ isWanted={isWanted}+ onDismiss={() => dismiss("outside")}+ onClose={close}+ >+ {props.children}+ </Menu>+ )}+ />+ );+}++/**+ * A popup under a toggle for content other than a menu's rows, such as a picker, a form or a+ * list of links. Its fields keep their keys; Up and Down move between its `.dropdown-item`s.+ */+export function DropdownPanel({ noDropdownListStyle, ...props }: DropdownPanelProps) {+ return (+ <DropdownToggle+ {...props}+ hasPopup="true"+ onToggleArrow={(popup, edge) => focusItem(popup, edge)}+ popup={({ popupProps, className, bottomSheet, startAt, dismiss }) => (+ <PanelPopup+ {...popupProps}+ // Bootstrap's dropdowns grew past the viewport, and a `FormDropdownSubmenu`+ // nested in the panel would be clipped by one that scrolls.+ capHeight={false}+ placedByStylesheet={bottomSheet}+ className={clsx("dropdown-menu show", className, bottomSheet && "mobile-bottom-menu",+ !noDropdownListStyle && "tn-dropdown-list")}+ startAt={startAt}+ onDismiss={dismiss}+ >+ {props.children}+ </PanelPopup>+ )}+ />+ );+}++/** What {@link DropdownToggle} hands the popup it draws. */+interface PopupSlot {+ /** Placement, portal, backdrop and click handling, for the `Popup` or `Menu`. */+ popupProps: Pick<PopupProps, "anchor" | "placement" | "offset" | "portalClassName" | "backdropClassName"+ | "elementRef" | "style" | "aria-labelledby" | "onClick">;+ className: string;+ bottomSheet: boolean;+ /** The item to start at, for a popup a key on the toggle opened. */+ startAt: "first" | "last" | undefined;+ isWanted(): boolean;+ /** Closes it for a press outside or Escape, as `autoClose` allows. */+ dismiss(reason: "outside" | "escape"): void;+ close(): void;+}++/**+ * The toggle both kinds of dropdown share: the button, its tooltip, the open state and its+ * callbacks, the handle, and the phone's cover. `popup` draws what opens under it.+ */+function DropdownToggle({ id, className, buttonClassName, isStatic, title, text, dropdownContainerStyle, dropdownContainerClassName, dropdownContainerRef: externalContainerRef, hideToggleArrow, iconAction, disabled, noSelectButtonStyle, forceShown, onShown, onHidden, dropdownOptions, buttonProps, dropdownRef, titlePosition, titleOptions, mobileBackdrop: mobileBackdropProp, mobileBottomSheet, backdrop, hasPopup, onToggleArrow, popup }: Omit<DropdownProps, "children"> & {+ hasPopup: "menu" | "true";+ /** Called for Up or Down on the toggle while the popup is up. */+ onToggleArrow?(popup: HTMLElement, edge: "first" | "last"): void;+ popup(slot: PopupSlot): ComponentChildren;+}) {// The sheet is placed by the app's own rule and dims what is behind it, so it is asked for as// one thing and unpacked here.const bottomSheet = !!mobileBottomSheet && isMobile();@@ -115,7 +187,6 @@ export default function Dropdown({ id, className, buttonClassName, isStatic, chiconst popupRef = useRef<HTMLDivElement | null>(null);const [ shown, setShown ] = useState(!!forceShown && !disabled);/** The item to start at once the popup shows, for a popup a key on the toggle opened. */- const pendingFocus = useRef<"first" | "last">();const [ startAt, setStartAt ] = useState<"first" | "last">();// As Bootstrap's `autoClose`: `true` closes on a click inside and a press outside, "inside" and// "outside" on that one alone, `false` on neither. Escape closes it whatever this says.@@ -196,24 +267,6 @@ export default function Dropdown({ id, className, buttonClassName, isStatic, chireturn suspendModalFocusTraps();}, [ shown ]);- // In a panel, Up and Down move between its items, as Bootstrap's did; a menu has its own keys.- // Captured at the window, so Bootstrap's handler for keys in a `.dropdown-menu`, which finds- // no toggle beside a popup, never sees them.- useEffect(() => {- if (!shown || !panel) return;- const onKeyDown = (e: KeyboardEvent) => {- const popup = popupRef.current;- const target = e.target as Element;- if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;- if (!popup?.contains(target) || /input|textarea/i.test(target.tagName)) return;- e.preventDefault();- e.stopPropagation();- focusItem(popup, e.key === "ArrowDown" ? "next" : "previous", target);- };- window.addEventListener("keydown", onKeyDown, true);- return () => window.removeEventListener("keydown", onKeyDown, true);- }, [ shown, panel ]);-const ariaId = useUniqueName("button");const toggleId = id ?? ariaId;@@ -241,7 +294,7 @@ export default function Dropdown({ id, className, buttonClassName, isStatic, chi)}ref={triggerRef}type="button"- aria-haspopup={panel ? "true" : "menu"}+ aria-haspopup={hasPopup}aria-expanded={shown}id={toggleId}disabled={disabled}@@ -256,9 +309,8 @@ export default function Dropdown({ id, className, buttonClassName, isStatic, chie.preventDefault();const edge = e.key === "ArrowDown" ? "first" : "last";if (shown) {- if (panel && popupRef.current) focusItem(popupRef.current, edge);+ if (popupRef.current) onToggleArrow?.(popupRef.current, edge);} else {- pendingFocus.current = edge;setStartAt(edge);setOpen(true);}@@ -268,69 +320,72 @@ export default function Dropdown({ id, className, buttonClassName, isStatic, chi<span className="caret" /></button>- {shown && triggerRef.current && !panel && (- <Menu- anchor={triggerRef.current}- placement={placement}- offset={TOGGLE_GAP}- bottomSheet={bottomSheet}- startAt={startAt}- elementRef={popupRef}- isWanted={() => shownRef.current}+ {shown && triggerRef.current && popup({+ popupProps: {+ anchor: triggerRef.current,+ placement,+ offset: TOGGLE_GAP,// In a wrapper with the dropdown's classes, so CSS scoped under them still- // applies to the menu in the page's body.- portalClassName={clsx("tn-dropdown-portal", className)}- backdropClassName={backdrop ? "tn-dropdown-backdrop" : undefined}- className={clsx("tn-dropdown-menu", isStatic && "static", dropdownContainerClassName)}- style={dropdownContainerStyle}- aria-labelledby={toggleId}- onClick={closeOnClickInside}- onDismiss={() => {- if (autoClose !== "inside" && autoClose !== false) setOpen(false);- }}- onClose={() => setOpen(false)}- >- {children}- </Menu>- )}- {shown && triggerRef.current && panel && (- <Popup- anchor={triggerRef.current}- placement={placement}- offset={TOGGLE_GAP}- // Bootstrap's dropdowns grew past the viewport, and a `FormDropdownSubmenu`- // nested in the menu would be clipped by a menu that scrolls.- capHeight={false}- // In a wrapper with the dropdown's classes, so CSS scoped under them still- // applies to the menu in the page's body. style.css stacks a portaled menu by- // `tn-dropdown-portal`.- portalClassName={clsx("tn-dropdown-portal", className)}- placedByStylesheet={bottomSheet}- // style.css stacks it just under a portaled menu.- backdropClassName={backdrop ? "tn-dropdown-backdrop" : undefined}- elementRef={popupRef}- className={clsx("dropdown-menu show tn-dropdown-menu", isStatic && "static", dropdownContainerClassName,- bottomSheet && "mobile-bottom-menu", !noDropdownListStyle && "tn-dropdown-list")}- style={dropdownContainerStyle}- aria-labelledby={toggleId}- onPlaced={() => {- const edge = pendingFocus.current;- pendingFocus.current = undefined;- if (edge && popupRef.current) focusItem(popupRef.current, edge);- }}- onClick={closeOnClickInside}- onDismiss={(reason) => {- if (reason === "outside" && (autoClose === "inside" || autoClose === false)) return;- setOpen(false);- }}- >- {children}- </Popup>- )}+ // applies to the popup in the page's body. style.css stacks a portaled popup by+ // `tn-dropdown-portal`, and its backdrop just under it.+ portalClassName: clsx("tn-dropdown-portal", className),+ backdropClassName: backdrop ? "tn-dropdown-backdrop" : undefined,+ elementRef: popupRef,+ style: dropdownContainerStyle,+ "aria-labelledby": toggleId,+ onClick: closeOnClickInside+ },+ className: clsx("tn-dropdown-menu", isStatic && "static", dropdownContainerClassName),+ bottomSheet,+ startAt,+ isWanted: () => shownRef.current,+ dismiss: (reason) => {+ if (reason === "outside" && (autoClose === "inside" || autoClose === false)) return;+ setOpen(false);+ },+ close: () => setOpen(false)+ })}</div>);}+/** A panel's popup, whose items Up and Down move between. */+function PanelPopup({ startAt, elementRef, ...props }: PopupProps & { startAt: "first" | "last" | undefined }) {+ const popupRef = useRef<HTMLDivElement | null>(null);++ // Captured at the window, so Bootstrap's handler for keys in a `.dropdown-menu`, which finds+ // no toggle beside a popup, never sees them.+ useEffect(() => {+ const onKeyDown = (e: KeyboardEvent) => {+ const popup = popupRef.current;+ const target = e.target as Element;+ if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;+ if (!popup?.contains(target) || /input|textarea/i.test(target.tagName)) return;+ e.preventDefault();+ e.stopPropagation();+ focusItem(popup, e.key === "ArrowDown" ? "next" : "previous", target);+ };+ window.addEventListener("keydown", onKeyDown, true);+ return () => window.removeEventListener("keydown", onKeyDown, true);+ }, []);++ const setElement = useCallback((element: HTMLDivElement | null) => {+ popupRef.current = element;+ if (typeof elementRef === "function") elementRef(element);+ else if (elementRef) elementRef.current = element;+ }, [ elementRef ]);++ return (+ <Popup+ {...props}+ elementRef={setElement}+ onPlaced={() => {+ if (startAt && popupRef.current) focusItem(popupRef.current, startAt);+ }}+ />+ );+}+/*** Focuses an enabled item of `popup`'s own, not one in a submenu nested in it: the first or the* last, or the one after or before `from`, going round at either end, as Bootstrap's did.diff --git a/apps/client/src/widgets/react/HelpDropdown.tsx b/apps/client/src/widgets/react/HelpDropdown.tsxindex 98272f244d..16be85715c 100644--- a/apps/client/src/widgets/react/HelpDropdown.tsx+++ b/apps/client/src/widgets/react/HelpDropdown.tsx@@ -3,7 +3,7 @@ import "./HelpDropdown.css";import { ComponentChildren } from "preact";import { t } from "../../services/i18n";-import Dropdown from "./Dropdown";+import { DropdownPanel } from "./Dropdown";import { openHelpPage } from "./HelpButton";import LinkButton from "./LinkButton";@@ -32,8 +32,7 @@ interface HelpDropdownProps {*/export default function HelpDropdown({ children, helpPage, openInPopup, className, onShown }: HelpDropdownProps) {return (- <Dropdown- panel+ <DropdownPanelonShown={onShown}className={`help-dropdown ${className ?? ""}`}buttonClassName="bx bx-help-circle"@@ -56,6 +55,6 @@ export default function HelpDropdown({ children, helpPage, openInPopup, classNamonClick={() => openHelpPage(helpPage, !!openInPopup)}/>)}- </Dropdown>+ </DropdownPanel>);}diff --git a/apps/client/src/widgets/react/HelpRemoveButtons.tsx b/apps/client/src/widgets/react/HelpRemoveButtons.tsxindex 16f759f632..4ae6a15c80 100644--- a/apps/client/src/widgets/react/HelpRemoveButtons.tsx+++ b/apps/client/src/widgets/react/HelpRemoveButtons.tsx@@ -1,6 +1,6 @@import type { ComponentChildren } from "preact";import ActionButton from "./ActionButton";-import Dropdown from "./Dropdown";+import { DropdownPanel } from "./Dropdown";interface HelpRemoveButtonsProps {help?: ComponentChildren;@@ -12,12 +12,11 @@ export default function HelpRemoveButtons({ help, removeText, onRemove }: HelpRereturn (<td className="button-column">{help && <>- <Dropdown- panel+ <DropdownPanelclassName="help-dropdown"buttonClassName="bx bx-help-circle icon-action"hideToggleArrow- >{help}</Dropdown>+ >{help}</DropdownPanel>{" "}</>}<ActionButtondiff --git a/apps/client/src/widgets/react/IconPicker.tsx b/apps/client/src/widgets/react/IconPicker.tsxindex f6f29b768e..4d1f655564 100644--- a/apps/client/src/widgets/react/IconPicker.tsx+++ b/apps/client/src/widgets/react/IconPicker.tsx@@ -13,7 +13,7 @@ import { t } from "../../services/i18n";import server from "../../services/server";import { isDesktop, isMobile } from "../../services/utils";import ActionButton from "./ActionButton";-import Dropdown from "./Dropdown";+import Dropdown, { DropdownPanel } from "./Dropdown";import { FormDropdownDivider, FormListItem } from "./FormList";import FormTextBox from "./FormTextBox";import { useStaticTooltip, useWindowSize } from "./hooks";@@ -169,8 +169,7 @@ function IconPickerDropdownButton({const [ pickerShown, setPickerShown ] = useState(false);return (- <Dropdown- panel+ <DropdownPanel// The legacy class dresses the menu the picker sits in, which the themes and the// picker's own stylesheet reach through it.className={clsx("note-icon-widget", className)}@@ -224,7 +223,7 @@ function IconPickerDropdownButton({})}/>)}- </Dropdown>+ </DropdownPanel>);}@@ -363,7 +362,6 @@ function FilterRow({ filterByPrefix, search, setSearch, setFilterByPrefix, filtebuttonClassName="bx bx-filter-alt"hideToggleArrownoSelectButtonStyle- noDropdownListStyleiconActiontitle={t("note_icon.filter")}>@@ -374,7 +372,6 @@ function FilterRow({ filterByPrefix, search, setSearch, setFilterByPrefix, filtebuttonClassName="bx bx-dots-vertical-rounded"hideToggleArrownoSelectButtonStyle- noDropdownListStyleiconActiondropdownContainerClassName="mobile-bottom-menu">diff --git a/apps/client/src/widgets/react/SegmentedChoice.tsx b/apps/client/src/widgets/react/SegmentedChoice.tsxindex be333fca97..24d50186f8 100644--- a/apps/client/src/widgets/react/SegmentedChoice.tsx+++ b/apps/client/src/widgets/react/SegmentedChoice.tsx@@ -117,8 +117,6 @@ function CollapsedChoice<T extends string>({ options, currentValue, onChange, clcurrentValue={currentValue}onChange={(newValue) => onChange(newValue as T)}disabled={disabled}- // A handful of options, so the menu never scrolls — see the prop's own note.- noDropdownListStyle// This only ever renders on a phone, where a menu is a sheet from the bottom of the// screen rather than a box beside the control it belongs to.mobileBottomSheetdiff --git a/apps/client/src/widgets/ribbon/NoteActions.tsx b/apps/client/src/widgets/ribbon/NoteActions.tsxindex 47b6dd1533..0c179c393c 100644--- a/apps/client/src/widgets/ribbon/NoteActions.tsx+++ b/apps/client/src/widgets/ribbon/NoteActions.tsx@@ -120,7 +120,6 @@ export function NoteContextMenu({ note, noteContext, itemsAtStart, itemsNearNotedropdownContainerClassName="mobile-bottom-menu"hideToggleArrownoSelectButtonStyle- noDropdownListStyleiconActiononHidden={() => itemToFocusRef.current = null }mobileBackdropdiff --git a/apps/client/src/widgets/type_widgets/Attachment.tsx b/apps/client/src/widgets/type_widgets/Attachment.tsxindex 0af0d526d2..6da175fdfd 100644--- a/apps/client/src/widgets/type_widgets/Attachment.tsx+++ b/apps/client/src/widgets/type_widgets/Attachment.tsx@@ -431,8 +431,6 @@ function AttachmentActions({ attachment, copyAttachmentReferenceToClipboard, onSiconActiondropdownContainerClassName="mobile-bottom-menu"mobileBackdrop- // Doesn't scroll, so it keeps the working backdrop blur — see the prop's own docs.- noDropdownListStyle// The card clips its overflow, to keep a picture inside its rounded corners, and a menu// opening from the header is taller than the header has room for — so it is rendered// into the body to stand clear of the card, as the highlights card's menu is.diff --git a/apps/client/src/widgets/type_widgets/SqlConsole.tsx b/apps/client/src/widgets/type_widgets/SqlConsole.tsxindex 8aadc595f0..3c0c7279cc 100644--- a/apps/client/src/widgets/type_widgets/SqlConsole.tsx+++ b/apps/client/src/widgets/type_widgets/SqlConsole.tsx@@ -8,7 +8,7 @@ import { t } from "../../services/i18n";import server from "../../services/server";import Tabulator from "../collections/table/tabulator";import Button from "../react/Button";-import Dropdown from "../react/Dropdown";+import { DropdownPanel } from "../react/Dropdown";import { useTriliumEvent } from "../react/hooks";import NoItems from "../react/NoItems";import SplitEditor from "./helpers/SplitEditor";@@ -157,7 +157,7 @@ export function SqlTableSchemas({ note }: TypeWidgetProps) {<span class="sql-table-schemas">{schemas.map(({ name, columns }) => (- <Dropdown key={name} text={name} noSelectButtonStyle hideToggleArrow panel>+ <DropdownPanel key={name} text={name} noSelectButtonStyle hideToggleArrow><table className="table-schema">{columns.map(column => (<tr key={column.name}>@@ -166,7 +166,7 @@ export function SqlTableSchemas({ note }: TypeWidgetProps) {</tr>))}</table>- </Dropdown>+ </DropdownPanel>))}</span></>diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ReasoningEffortDropdown.tsx b/apps/client/src/widgets/type_widgets/llm_chat/ReasoningEffortDropdown.tsxindex 5fe45d2f48..382b0ddc4b 100644--- a/apps/client/src/widgets/type_widgets/llm_chat/ReasoningEffortDropdown.tsx+++ b/apps/client/src/widgets/type_widgets/llm_chat/ReasoningEffortDropdown.tsx@@ -34,8 +34,6 @@ export default function ReasoningEffortDropdown({ model, value, onChange, disablbuttonClassName="llm-chat-model-select"className="llm-chat-reasoning-effort"disabled={disabled}- // A few items, so the menu never scrolls and keeps the working backdrop blur.- noDropdownListStyle// Same reason as the model selector: the sidebar clips an unportaled menu.portalToBody={inSidebar}dropdownOptions={inSidebar ? { popperConfig: { strategy: "fixed" } } : undefined}diff --git a/apps/client/src/widgets/type_widgets/options/active_content.tsx b/apps/client/src/widgets/type_widgets/options/active_content.tsxindex 77ff0f5f95..0d3d98be09 100644--- a/apps/client/src/widgets/type_widgets/options/active_content.tsx+++ b/apps/client/src/widgets/type_widgets/options/active_content.tsx@@ -48,7 +48,7 @@ function ContentItemMenu({ note, categories }: { note: FNote, categories: Conten<DropdownclassName="active-content-item-menu"buttonClassName="note-book-item-menu bx bx-dots-vertical-rounded"- hideToggleArrow noSelectButtonStyle noDropdownListStyle iconAction+ hideToggleArrow noSelectButtonStyle iconAction// Out of the row and into the body: nested, the open menu would still count as hovering// the row, leaving it highlighted while the cursor is over the menu.portalToBody@@ -536,7 +536,7 @@ function SortOrderMenu({ currentValue, onChange }: { currentValue: string, onChareturn (<DropdownbuttonClassName="bx bx-sort"- hideToggleArrow noSelectButtonStyle noDropdownListStyle iconAction+ hideToggleArrow noSelectButtonStyle iconActiontitle={t("content_manager.sort_order")}mobileBottomSheet>diff --git a/apps/client/src/widgets/type_widgets/options/shortcuts.tsx b/apps/client/src/widgets/type_widgets/options/shortcuts.tsxindex 064e42120e..18f6cd5de5 100644--- a/apps/client/src/widgets/type_widgets/options/shortcuts.tsx+++ b/apps/client/src/widgets/type_widgets/options/shortcuts.tsx@@ -135,7 +135,6 @@ export default function ShortcutSettings() {buttonClassName={`bx bx-filter-alt ${activeFilter ? "active" : ""}`}hideToggleArrownoSelectButtonStyle- noDropdownListStyleiconActiontitle={t("shortcuts.filter")}dropdownRef={filterDropdownRef}