Skip to content

feat: [data-view] forward popup position props and Search leadingIcon - #931

Open
rohanchkrabrty wants to merge 1 commit into
mainfrom
feat/dataview-control-props
Open

rohanchkrabrty wants to merge 1 commit into
mainfrom
feat/dataview-control-props

Conversation

@rohanchkrabrty

Copy link
Copy Markdown
Contributor

Summary

  • DataView.Filters accepts align, side, and sideOffset and passes them to the add-filter Menu.Content. The defaults are unchanged (start, bottom, 4px).
  • DataView.DisplayControls accepts the same three props and passes them to its Popover.Content. align still defaults to end.
  • Search accepts leadingIcon. A node replaces the search icon, and null hides it. DataView.Search and DataTable.Search get the prop through SearchProps.
  • Docs: a DataView.Filters props table, the position props on DataView.DisplayControls, and a "Leading icon" section with a demo on the Search page.

Closes #848

@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
apsara Ready Ready Preview Sep 29, 2026 3:13pm UTC

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: b7c5c7c0-4266-4186-9563-227418fbd658

📥 Commits

Reviewing files that changed from the base of the PR and between d088032 and ae17be6.

📒 Files selected for processing (10)
  • apps/www/src/content/docs/components/search/demo.ts
  • apps/www/src/content/docs/components/search/index.mdx
  • apps/www/src/content/docs/components/search/props.ts
  • apps/www/src/content/docs/dataview/index.mdx
  • apps/www/src/content/docs/dataview/props.ts
  • packages/raystack/components/data-view/__tests__/data-view.test.tsx
  • packages/raystack/components/data-view/components/display-controls.tsx
  • packages/raystack/components/data-view/components/filters.tsx
  • packages/raystack/components/search/__tests__/search.test.tsx
  • packages/raystack/components/search/search.tsx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Search now accepts a custom leading icon or null to hide the icon, while retaining the default search icon. DataView.Filters and DataView.DisplayControls now accept popup positioning props and forward them to their underlying menu or popover. Tests and documentation cover these changes.

Suggested reviewers: ravisuhag

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to ae17b

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 Review

Security architecture risk: 🔵 Low · up to ae17b

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
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated new reachability is within caller-composed UI elements and popup positioners. The inspected paths do not establish a new route to a service, credential, or data-store authority.

Trust Boundaries and Controls

  • inferred — Supplying a React node is application UI composition, not an observed conversion of untrusted text into executable markup. The icon is not forwarded to the native input; aria-hidden describes its presentation, not a security boundary.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes both main changes: forwarding popup position props for DataView components and adding the Search leadingIcon prop.
Description check ✅ Passed The description directly explains the DataView positioning changes, Search leadingIcon behavior, unchanged defaults, documentation updates, and linked issue.
Linked Issues check ✅ Passed Issue #848 coding requirements are met. DataView.Filters accepts and forwards align, side, and sideOffset to Menu.Content. DataView.DisplayControls accepts and forwards the same positionin…
Out of Scope Changes check ✅ Passed The changed source files implement issue #848. The added tests verify the new prop behavior. The documentation and demos describe the same new APIs. No unrelated change is demonstrated.
Full details: Docstring Coverage

Explanation

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.)

  • Fix all pre-merge checks with AI

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Sep 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@raystack/apsara@931

commit: ae17be6

@@ -84,6 +87,7 @@ export function DisplayControls<TData>({
<Popover.Content
className={styles['display-popover-content']}
align='end'

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.

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.

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.

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.

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.

false also hides the icon, not just null. Could say "Pass null or false to hide it."

This branch was successfully deployed

1 active deployment
Preview — ae17be64 Deployed Sep 29, 2026 by vercel[bot]
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.

DataView: forward align on Filters/DisplayControls, and let Search control its leading icon

2 participants