Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(task): fix dropdown going up on ct (#5094)
teo56f3ceb81653
diff --git a/apps/web/src/features/property/core/Root.tsx b/apps/web/src/features/property/core/Root.tsxindex ef8a7ae9d6..589d3c1b97 100644--- a/apps/web/src/features/property/core/Root.tsx+++ b/apps/web/src/features/property/core/Root.tsx@@ -1,6 +1,6 @@import { virtualKeyboardVisible } from '@core/mobile/virtualKeyboard';import { cn, Dropdown } from '@ui';-import { createSignal, type JSX, onMount, splitProps } from 'solid-js';+import { createSignal, type JSX, splitProps } from 'solid-js';import type { Property } from '../types';import {type PropertyEditFn,@@ -33,13 +33,6 @@ export function Root(props: PropertyRootProps) {const [editorAnchor, setEditorAnchor] = createSignal<HTMLElement | undefined>(undefined);- const [portalMount, setPortalMount] = createSignal<HTMLElement | undefined>();-- let rootEl!: HTMLDivElement;- onMount(() => {- const scoped = rootEl.closest<HTMLElement>('.portal-scope');- if (scoped) setPortalMount(scoped);- });// Focus restoration helper - used by both closeEditor and onOpenChange// When a value is saved, the component may remount (due to reactive updates),@@ -85,7 +78,6 @@ export function Root(props: PropertyRootProps) {setEditorOpen(false);restoreFocusToAnchor();},- portalMount,};const handleOpenChange = (open: boolean) => {@@ -102,9 +94,9 @@ export function Root(props: PropertyRootProps) {onOpenChange={handleOpenChange}getAnchorRect={() => editorAnchor()?.getBoundingClientRect()}placement={virtualKeyboardVisible() ? 'top-start' : 'bottom-start'}+ fitViewport><div- ref={rootEl}class={cn('property-root', local.class)}data-propertydata-property-id={local.property.propertyId}diff --git a/apps/web/src/features/property/core/context.ts b/apps/web/src/features/property/core/context.tsindex 9c56441315..c87fedf818 100644--- a/apps/web/src/features/property/core/context.ts+++ b/apps/web/src/features/property/core/context.ts@@ -22,13 +22,6 @@ export interface PropertyRootContextValue {editorOpen: Accessor<boolean>;openEditor: (anchor?: HTMLElement) => void;closeEditor: () => void;-- // Closest `.portal-scope` ancestor at the time Property.Root mounted.- // Used by PopoverEditor to mount the dropdown into the same stacking- // context as the surrounding panel/dialog instead of document.body —- // otherwise the editor renders behind a host modal. Undefined until the- // root div mounts, after which Kobalte's Portal falls back to body.- portalMount: Accessor<HTMLElement | undefined>;}export const PropertyRootContext = createContext<PropertyRootContextValue>();diff --git a/apps/web/src/features/property/editors/popover/EditorPopover.tsx b/apps/web/src/features/property/editors/popover/EditorPopover.tsxindex b1cd82116e..5212938977 100644--- a/apps/web/src/features/property/editors/popover/EditorPopover.tsx+++ b/apps/web/src/features/property/editors/popover/EditorPopover.tsx@@ -86,6 +86,9 @@ export function EditorPopover(props: EditorPopoverProps) {};return (+ // Keep the default body portal. The editor uses a virtual anchor rectangle,+ // so mounting inside a local portal-scope gives Floating UI the wrong+ // clipping and offset context.<Dropdown.Contentclass={cn('max-h-96 overflow-hidden flex flex-col w-full max-w-70 p-0 text-sm',@@ -93,7 +96,6 @@ export function EditorPopover(props: EditorPopoverProps) {)}onInteractOutside={handleInteractOutside}onEscapeKeyDown={handleEscapeKeyDown}- mount={ctx.portalMount()}depth={3}><Dropdown.Groupdiff --git a/apps/web/src/features/property/editors/selectors/PropertyDateSelector.tsx b/apps/web/src/features/property/editors/selectors/PropertyDateSelector.tsxindex 5ecbf181d1..17a0914dbb 100644--- a/apps/web/src/features/property/editors/selectors/PropertyDateSelector.tsx+++ b/apps/web/src/features/property/editors/selectors/PropertyDateSelector.tsx@@ -145,8 +145,8 @@ export const PropertyDateSelector = (props: DateSelectorProps) => {};return (- <div class="relative">- <div class="flex w-full items-center py-2 gap-2 px-2 border-b border-edge-muted">+ <div class="relative flex min-h-0 flex-col">+ <div class="flex w-full shrink-0 items-center py-2 gap-2 px-2 border-b border-edge-muted"><SearchIcon class="size-4 text-ink-muted" /><inputclass="w-full caret-accent"@@ -169,8 +169,8 @@ export const PropertyDateSelector = (props: DateSelectorProps) => {</div><Switch><Match when={mode() === 'search'}>- <div class="p-1.5">- <div class="max-h-50 overflow-y-auto overflow-x-hidden scrollbar-hidden">+ <div class="flex min-h-0 flex-1 p-1.5">+ <div class="max-h-50 min-h-0 flex-1 overflow-y-auto overflow-x-hidden scrollbar-hidden"><Showwhen={visibleDateOptions().length > 0}fallback={@@ -266,7 +266,7 @@ export const PropertyDateSelector = (props: DateSelectorProps) => {</div>{/* Help text */}- <div class="px-2 py-1.5 border-t border-edge-muted">+ <div class="shrink-0 px-2 py-1.5 border-t border-edge-muted"><div class="text-xs text-ink-muted"><span>Use queries like </span><code class="bg-active px-1">3d</code>,{' '}@@ -278,7 +278,7 @@ export const PropertyDateSelector = (props: DateSelectorProps) => {</Match><Match when={mode() === 'calendar'}>- <div class="border-b border-edge-muted text-sm flex justify-center">+ <div class="min-h-0 overflow-y-auto border-b border-edge-muted text-sm flex justify-center"><DatePickerUIvalue={props.selectedDate || new Date()}onChange={handleCalendarChange}