| ... | ... | @@ -545,7 +545,8 @@ function SortableSidebarMarker(props: { |
| 545 | 545 | className={cn("list-none", props.className)} |
| 546 | 546 | style={{ |
| 547 | 547 | transform: CSS.Translate.toString(transform), |
| 548 | | transition, |
| 548 | // A newly revealed target must not slide from its hidden position. |
| 549 | transition: props.marker.endsWith("-placeholder") ? "none" : transition, |
| 549 | 550 | visibility: transform?.scaleY === 0 ? "hidden" : undefined, |
| 550 | 551 | }} |
| 551 | 552 | > |
| ... | ... | @@ -599,13 +600,11 @@ function SidebarDragBoundary(props: { |
| 599 | 600 | className="pointer-events-none relative mx-0.5 h-0" |
| 600 | 601 | > |
| 601 | 602 | {props.visible ? ( |
| 602 | | <div className="sidebar-drag-boundary-label absolute inset-x-2 top-1 flex h-4 items-center gap-1.5"> |
| 603 | <div className="sidebar-drag-boundary-label absolute inset-x-2 top-1 flex h-4 items-center gap-2"> |
| 603 | 604 | <span |
| 604 | 605 | className={cn( |
| 605 | | "inline-flex h-4 shrink-0 items-center rounded-sm border bg-sidebar px-1.5 text-[10px] leading-none font-medium", |
| 606 | | props.isDropTarget |
| 607 | | ? "border-primary/40 text-primary" |
| 608 | | : "border-sidebar-foreground/25 text-sidebar-foreground/80", |
| 606 | "shrink-0 text-xs font-medium", |
| 607 | props.isDropTarget ? "text-primary" : "text-sidebar-foreground/80", |
| 609 | 608 | )} |
| 610 | 609 | > |
| 611 | 610 | {props.label} |
| ... | ... | @@ -635,10 +634,10 @@ function SidebarSectionHeader(props: { |
| 635 | 634 | }) { |
| 636 | 635 | const snoozed = props.marker === "snoozed-header"; |
| 637 | 636 | const className = cn( |
| 638 | | "flex h-full w-full items-center gap-2 rounded-md border border-dashed border-transparent px-2 text-left text-xs font-medium", |
| 637 | "flex h-full w-full items-center gap-2 px-2 text-left text-xs font-medium", |
| 639 | 638 | snoozed ? "text-blue-600 dark:text-blue-400" : "text-sidebar-muted-foreground/60", |
| 640 | 639 | props.dragging && "text-sidebar-foreground/80", |
| 641 | | props.isDropTarget && "border-primary/40 bg-primary/5 text-primary", |
| 640 | props.isDropTarget && "text-primary", |
| 642 | 641 | ); |
| 643 | 642 | const content = ( |
| 644 | 643 | <> |
| ... | ... | @@ -3261,9 +3260,7 @@ export default function Sidebar() { |
| 3261 | 3260 | items.push(...pinnedRows); |
| 3262 | 3261 | items.push({ kind: "marker", marker: "pinned-divider" }); |
| 3263 | 3262 | const activeRows = rowsOf(activeThreads, "active"); |
| 3264 | | if (activeRows.length === 0) { |
| 3265 | | items.push({ kind: "marker", marker: "active-placeholder" }); |
| 3266 | | } |
| 3263 | items.push({ kind: "marker", marker: "active-placeholder" }); |
| 3267 | 3264 | items.push(...activeRows); |
| 3268 | 3265 | if (snoozedThreads.length > 0) { |
| 3269 | 3266 | items.push({ kind: "marker", marker: "snoozed-header" }); |
| ... | ... | @@ -3271,9 +3268,7 @@ export default function Sidebar() { |
| 3271 | 3268 | } |
| 3272 | 3269 | items.push({ kind: "marker", marker: "settled-header" }); |
| 3273 | 3270 | const settledRows = rowsOf(renderedSettledThreads, "settled"); |
| 3274 | | if (settledRows.length === 0) { |
| 3275 | | items.push({ kind: "marker", marker: "settled-placeholder" }); |
| 3276 | | } |
| 3271 | items.push({ kind: "marker", marker: "settled-placeholder" }); |
| 3277 | 3272 | items.push(...settledRows); |
| 3278 | 3273 | return items; |
| 3279 | 3274 | }, [ |
| ... | ... | @@ -4805,7 +4800,14 @@ export default function Sidebar() { |
| 4805 | 4800 | key="active-placeholder" |
| 4806 | 4801 | marker="active-placeholder" |
| 4807 | 4802 | label="Active" |
| 4808 | | showHint={from !== null} |
| 4803 | showHint={ |
| 4804 | from !== null && |
| 4805 | (activeThreads.length === 0 || |
| 4806 | (from === "active" && |
| 4807 | activeThreads.length === 1 && |
| 4808 | dragTargetSection !== null && |
| 4809 | dragTargetSection !== "active")) |
| 4810 | } |
| 4809 | 4811 | isDropTarget={dragTargetSection === "active"} |
| 4810 | 4812 | />, |
| 4811 | 4813 | ); |
| ... | ... | @@ -4852,7 +4854,14 @@ export default function Sidebar() { |
| 4852 | 4854 | key="settled-placeholder" |
| 4853 | 4855 | marker="settled-placeholder" |
| 4854 | 4856 | label="Settled" |
| 4855 | | showHint={from !== null && from !== "settled"} |
| 4857 | showHint={ |
| 4858 | from !== null && |
| 4859 | (renderedSettledThreads.length === 0 || |
| 4860 | (from === "settled" && |
| 4861 | renderedSettledThreads.length === 1 && |
| 4862 | dragTargetSection !== null && |
| 4863 | dragTargetSection !== "settled")) |
| 4864 | } |
| 4856 | 4865 | isDropTarget={dragTargetSection === "settled"} |
| 4857 | 4866 | />, |
| 4858 | 4867 | ); |