fix(tours): format the dropdown changes and lower the hook ref baseline

The editor dropdown change drops the options ref useAnchoredPosition kept
for its measure callback, so the react-hooks/refs count falls by one and
the baseline follows it. The new and touched files are formatted, and the
new rail test gets its id like the rest of the file.
This commit is contained in:
Maurice
2026-11-27 20:03:41 +01:00
parent 20c8457f18
commit 3dd63331bc
6 changed files with 219 additions and 163 deletions
+10 -4
View File
@@ -13,10 +13,16 @@ const EDGE = 8;
* it and goes on from the button; a click beside it closes it. The caller draws
* the button and the list and hands `currentIndex`, the choice held now.
*/
export function usePopoverList(currentIndex: number, { estimatedHeight = 320, disabled }: {
estimatedHeight?: number;
disabled?: boolean;
} = {}) {
export function usePopoverList(
currentIndex: number,
{
estimatedHeight = 320,
disabled,
}: {
estimatedHeight?: number;
disabled?: boolean;
} = {}
) {
const triggerRef = useRef<HTMLButtonElement>(null);
const menuRef = useRef<HTMLDivElement>(null);
const startAt = useRef(0);