feat: add search & filter bar on public profile (#666) - #670
Conversation
|
@Dev1822 is attempting to deploy a commit to the vishnukothakapu's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthrough
ChangesProfile Link Search
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant Visitor
participant ProfileCard
participant ProfileLinks
Visitor->>ProfileCard: Enter search query
ProfileCard->>ProfileCard: Filter links by label or platform
ProfileCard->>ProfileLinks: Pass filtered regular links
ProfileCard-->>Visitor: Show matching links or "No links found"
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/`[username]/ProfileCard.tsx:
- Around line 87-93: Add an accessible name to the search input in ProfileCard
by associating it with a visible label or adding aria-label="Search links".
Preserve the existing searchQuery value and onChange behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3a588a15-a889-4459-8592-fcd18eeaaf21
📒 Files selected for processing (1)
app/[username]/ProfileCard.tsx
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Fixes: #666
✨ Description
This PR introduces a client-side Search & Filter Bar at the top of the public profile, allowing visitors to instantly filter a user's visible links by typing keywords.
As requested in the issue, this solves the problem of visitors having to scroll through dozens of links on prolific creators' profiles to find a specific platform or link.
🛠️ Changes Made
app/[username]/ProfileCard.tsxto a client component ("use client") to manage React state.useStatehook forsearchQuery.<input type="search">directly below the bio section, styled to match the existing UI with a magnifying glass icon.socialLinksandregularLinks(including matching against links inside grouped folders). The filtering checks against both the link'slabelandplatform."No links found"state if the search yields zero matching links.🎯 Acceptance Criteria Met
Summary by CodeRabbit