Skip to content

[ENG-1271] Implement filter, search, sort designs in clipboard#900

Open
trangdoan982 wants to merge 5 commits intomainfrom
eng-1271-implement-filtersearchsort-designs-in-clipboard
Open

[ENG-1271] Implement filter, search, sort designs in clipboard#900
trangdoan982 wants to merge 5 commits intomainfrom
eng-1271-implement-filtersearchsort-designs-in-clipboard

Conversation

@trangdoan982
Copy link
Copy Markdown
Member

@trangdoan982 trangdoan982 commented Mar 18, 2026

@linear
Copy link
Copy Markdown

linear bot commented Mar 18, 2026

@supabase
Copy link
Copy Markdown

supabase bot commented Mar 18, 2026

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

graphite-app[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

trangdoan982 and others added 3 commits March 18, 2026 15:01
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
@trangdoan982 trangdoan982 requested a review from mdroidian March 26, 2026 19:46
Copy link
Copy Markdown
Member

@mdroidian mdroidian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's match the UI designs more closely:

  • Nodes should have their node colors (you can take this code from elsewhere in the project, eg Canvas Drawer)
Image
  • Search on left, filters/sort on right
  • Show "Clear Filters" but keep it disabled. This is to be consistent with other components and help remove jank and it won't come as a surprise to users
  • Filter button should have the button design as seen in the image
Image

@trangdoan982
Copy link
Copy Markdown
Member Author

https://youtu.be/9B_Xv7wvz48

@mdroidian Loom is down so this is the recorded test for the new filter according to Johnny's new design and your feedback

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 8 additional findings in Devin Review.

Open in Devin Review

Comment on lines +1247 to +1269
<Menu>
{availableNodeTypes.map((type) => (
<MenuItem
key={type}
active={selectedNodeType === type}
onClick={() => setSelectedNodeType(type)}
text={
<span className="flex items-center gap-2">
{type !== "All" && (
<span
className="inline-block h-3 w-3 shrink-0 rounded-full"
style={{
backgroundColor:
nodeTypeColorMap[type] || "#000000",
}}
/>
)}
{type}
</span>
}
/>
))}
</Menu>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Filter Popover content missing onPointerDown stopPropagation, inconsistent with sibling Popover

The new node-type filter Popover at line 1244 renders its <Menu> content directly without wrapping it in a <div> with onPointerDown={(e) => e.stopPropagation()} and style={{ pointerEvents: "all" }}. The adjacent settings Popover at apps/roam/src/components/canvas/Clipboard.tsx:1290-1310 explicitly wraps its content with these event protections, with a comment at apps/roam/src/components/canvas/Clipboard.tsx:342-344 explaining this prevents TLDraw from hijacking click and pointer events. Since Blueprint Popovers render via Portal (at the document body), TLDraw's document-level event listeners can still intercept pointer events from the menu, potentially causing the dropdown menu items to not register clicks or triggering unintended TLDraw canvas interactions when the user tries to select a node type filter.

Suggested change
<Menu>
{availableNodeTypes.map((type) => (
<MenuItem
key={type}
active={selectedNodeType === type}
onClick={() => setSelectedNodeType(type)}
text={
<span className="flex items-center gap-2">
{type !== "All" && (
<span
className="inline-block h-3 w-3 shrink-0 rounded-full"
style={{
backgroundColor:
nodeTypeColorMap[type] || "#000000",
}}
/>
)}
{type}
</span>
}
/>
))}
</Menu>
<Menu
onPointerDown={(e: React.MouseEvent) => e.stopPropagation()}
style={{ pointerEvents: "all" }}
>
{availableNodeTypes.map((type) => (
<MenuItem
key={type}
active={selectedNodeType === type}
onClick={() => setSelectedNodeType(type)}
text={
<span className="flex items-center gap-2">
{type !== "All" && (
<span
className="inline-block h-3 w-3 shrink-0 rounded-full"
style={{
backgroundColor:
nodeTypeColorMap[type] || "#000000",
}}
/>
)}
{type}
</span>
}
/>
))}
</Menu>
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants