feat: add several existing properties or new properties in property c… - #1684
webmagic123 wants to merge 2 commits into
Conversation
…ontainer and power tools table
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR updates the entity property/relation picking UX to support faster “back-to-back” selections by keeping popovers open and preserving the search query across picks in both the entity page panel and editable table cells.
Changes:
- Add query mirroring + controlled open state to relation/property pickers so the picker can stay open and retain the user’s search text.
- Extend
SelectEntity/SelectEntityAsPopoverwithclearQueryAfterPick,onSearchQueryChange, and controlledopensupport (plus outside-interaction handling to avoid closing parent popovers). - Sync
useSearchinternal query state wheninitialQuerychanges.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/web/partials/entity-page/editable-entity-table-cell.tsx | Keeps relation picker open and mirrors search query between inline picker and popover in table cells. |
| apps/web/partials/entity-page/editable-entity-page.tsx | Adds multi-pick behavior for adding properties and generic relation fields (open state + query mirroring). |
| apps/web/design-system/select-entity.tsx | Adds clearQueryAfterPick and onSearchQueryChange; tags dropdown for nested-popover interaction handling. |
| apps/web/design-system/select-entity-dialog.tsx | Adds controlled/uncontrolled open support and prevents parent popover from closing when interacting with nested dropdown. |
| apps/web/design-system/reorderable-relation-chips-dnd.tsx | Adjusts layout classes to better fit the new inline-flex relation+button layout. |
| apps/web/core/hooks/use-search.ts | Syncs internal search query when initialQuery changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| clearQueryAfterPick?: boolean; | ||
| open?: boolean; | ||
| onOpenChange?: (open: boolean) => void; | ||
| onSearchQueryChange?: (query: string) => void; |
There was a problem hiding this comment.
open is treated as a controlled prop when provided, but onOpenChange is optional. In the controlled case, omitting onOpenChange will make the popover effectively read-only (can’t open/close). Consider a discriminated union for props (controlled vs uncontrolled) so onOpenChange is required when open is set.
| onDone: ( | ||
| result: { id: string; name: string | null; space?: string; verified?: boolean }, | ||
| fromCreateFn?: boolean | ||
| ) => void; | ||
| onCreateEntity?: (result: { | ||
| id: string; | ||
| name: string | null; | ||
| space?: string; | ||
| verified?: boolean; | ||
| renderableType?: SwitchableRenderableType; | ||
| }) => void; | ||
| relationValueTypes?: Property['relationValueTypes']; | ||
| placeholder?: string; | ||
| advanced?: boolean; | ||
| showIDs?: boolean; | ||
| initialQuery?: string; | ||
| selectedEntityId?: string; | ||
| clearQueryAfterPick?: boolean; | ||
| open?: boolean; | ||
| onOpenChange?: (open: boolean) => void; | ||
| onSearchQueryChange?: (query: string) => void; |
There was a problem hiding this comment.
SelectEntityAsPopoverProps is now acting as a thin wrapper around SelectEntity, but the callback typings still don’t match SelectEntity’s API (e.g., onCreateEntity can return a string id override, and onDone may include primarySpace). Consider reusing/deriving the prop types from SelectEntity (or updating these signatures) to prevent capability loss and future drift.
|
Closing as part of a sweep of the open-PR queue. Not a judgement on the work — reopen if you still want it and I will help get it current. Opened 2026-04-17 and now conflicting with master. At this distance a rebase is usually more work than redoing the change against current code, and the surrounding code has moved a long way underneath "feat: add several existing properties or new properties in property c…". @webmagic123 — if the idea still stands but the branch does not, a fresh PR or a ticket is probably a better route than reviving this one. Nothing is discarded: the branch and its history remain, and reopening costs a click. Context: 74 PRs were open, 25 older than two months, the oldest from February. The point is to make the queue mean something so genuinely ready work is visible rather than buried — #2449 sat ready for three days this week partly because of the noise. Only non-draft, conflicting PRs are in scope; drafts and anything still mergeable are being left alone. |
…ontainer and power tools table