Price range issue #2582
Fixes Issue
Changes proposed
Screenshots
Note to reviewers
Summary by CodeRabbit
-
New Features
- Price filtering now supports clear ranges (e.g., ₹0–₹100, ₹100–₹300, Above ₹1000) for more precise results.
- Rating filter added with options: All, 3★ & above, 4★ & above, and 5★ only.
- Category, Price Range, and Rating controls are now dropdowns for quicker selection.
-
Style
- Filters panel refreshed with a cleaner layout (padding, rounded corners, shadow) and consistent background color for improved readability.
@Anishhhh12 is attempting to deploy a commit to the Vivek Prajapati's projects Team on Vercel.
A member of the Team first needs to authorize it.
Walkthrough
Refactors Filters.jsx to a simplified inline-styled div, removes the FilterSection subcomponent, updates category/price/rating UI, and changes the Filters parameter destructuring order. Customized-Gifts.jsx changes price filtering from a max-only threshold to inclusive numeric ranges parsed from "min-max". Other edits are formatting-only.
Changes
| Cohort / File(s) | Summary |
|---|---|
Filters UI refactorsrc/User/components/Popular_Categories/Filters.jsx |
Replaced aside with a styled div using inline backgroundColor; removed filterClasses/filterStyles and FilterSection subcomponent; inlined three sections (Category, Price Range, Rating); updated price options to explicit ranges; rating select passes Number(value); reordered props in function parameter destructuring without changing public props. |
Price filtering logic updatesrc/User/pages/Popular_Categories/Customized-Gifts.jsx |
Functional change: priceFilter now parsed as “min-max” and applied inclusively (min ≤ price ≤ max) instead of single max threshold. |
Formatting/structural tidysrc/User/pages/Popular_Categories/Customized-Gifts.jsx |
Reformatting arrays, URLs, and JSX; whitespace/parentheses tweaks; no behavioral change beyond the price filter logic. |
Sequence Diagram(s)
sequenceDiagram
autonumber
actor User
participant Filters as Filters.jsx
participant Page as Customized-Gifts.jsx
participant Grid as ProductGrid
User->>Filters: Select Category / Price Range / Rating
Filters-->>Page: setCategoryFilter(value)\nsetPriceFilter("min-max")\nsetRatingFilter(Number)
Note right of Page: State updated with parsed filters
Page->>Grid: Render with filters
Grid->>Grid: Filter products\n- Category match\n- Price: min ≤ price ≤ max\n- Rating ≥ selected
Grid-->>User: Display filtered products
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~25 minutes
Poem
I sift through gifts with twitching nose,
From stars to price, the range now shows.
A tidy pane where filters live,
With rounded corners, softly give.
Hop, hop—results refined and neat,
Carrots up for every treat! 🥕✨
[!TIP]
🔌 Remote MCP (Model Context Protocol) integration is now available!
Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.
✨ Finishing Touches
- [ ] 📝 Generate Docstrings
🧪 Generate unit tests
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
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.
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. - PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
CodeRabbit Commands (Invoked using PR/Issue comments)
Type @coderabbitai help to get the list of available commands.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Status, Documentation and Community
- Visit our Status Page to check the current availability of CodeRabbit.
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
mention your issue in description
i forked your repo and deploy it on vercel where i made changes on github after which the price range issue resolved like in the range 100-200,200-300 and more rather than under 200 or 300 but after generating pull request it told me that i got issues so this is the problem i am currently facing.
i forked your repo and deploy it on vercel where i made changes on github after which the price range issue resolved like in the range 100-200,200-300 and more rather than under 200 or 300 but after generating pull request it told me that i got issues so this is the problem i am currently facing.
can you fix these button width....kya ap in buttons ko fix kr sakte ho inka width sahi ho paye to taki inke andar ka content ek line me a jaye ???
konse button add to cart and buy now wale ka ya kisi aur ka?
inse ander ka text proper nhi show ho rha so If you can then kindly try to fix it