feat: [data-view] forward popup position props and Search leadingIcon - #931
rohanchkrabrty wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (10)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughSearch now accepts a custom leading icon or Suggested reviewers: Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The new icon and popup-position options are available through their documented component entrypoints, with existing defaults preserved. No current user-facing failure was identified. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The examined changes give callers control over an icon and popup placement, without changing the search and filter handlers. No material security issue was established, but incomplete coverage prevents a minimal-risk assessment. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 8 files. (2 skipped: 2 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
| @@ -84,6 +87,7 @@ export function DisplayControls<TData>({ | |||
| <Popover.Content | |||
| className={styles['display-popover-content']} | |||
| align='end' | |||
There was a problem hiding this comment.
If someone passes align={undefined}, it overwrites 'end' and the popover opens centred. Set the default where the props are read instead: align = 'end', then align={align}. That's how Menu does it.
| disabled?: boolean; | ||
|
|
||
| /** | ||
| * Icon before the input. Pass `null` to hide it. |
There was a problem hiding this comment.
false also hides the icon, not just null. Could say "Pass null or false to hide it."
|
|
||
| ### Leading icon | ||
|
|
||
| Pass a node to `leadingIcon` to replace the search icon, or `null` to hide it. |
There was a problem hiding this comment.
false also hides the icon, not just null. Could say "Pass null or false to hide it."
Summary
DataView.Filtersacceptsalign,side, andsideOffsetand passes them to the add-filterMenu.Content. The defaults are unchanged (start,bottom, 4px).DataView.DisplayControlsaccepts the same three props and passes them to itsPopover.Content.alignstill defaults toend.SearchacceptsleadingIcon. A node replaces the search icon, andnullhides it.DataView.SearchandDataTable.Searchget the prop throughSearchProps.DataView.Filtersprops table, the position props onDataView.DisplayControls, and a "Leading icon" section with a demo on the Search page.Closes #848