VigyBag icon indicating copy to clipboard operation
VigyBag copied to clipboard

Price range issue #2582

Open Anishhhh12 opened this issue 4 months ago • 8 comments

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 avatar Aug 19 '25 16:08 Anishhhh12

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

vercel[bot] avatar Aug 19 '25 16:08 vercel[bot]

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 refactor
src/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 update
src/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 tidy
src/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.

❤️ Share
🪧 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 @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in 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 ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file 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.

coderabbitai[bot] avatar Aug 19 '25 16:08 coderabbitai[bot]

image Add title and desc like this and also mention issue number

codervivek5 avatar Aug 20 '25 11:08 codervivek5

mention your issue in description

codervivek5 avatar Aug 20 '25 18:08 codervivek5

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.

Anishhhh12 avatar Aug 21 '25 10:08 Anishhhh12

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 ???

codervivek5 avatar Aug 23 '25 04:08 codervivek5

konse button add to cart and buy now wale ka ya kisi aur ka?

Anishhhh12 avatar Aug 23 '25 10:08 Anishhhh12

image

inse ander ka text proper nhi show ho rha so If you can then kindly try to fix it

codervivek5 avatar Aug 24 '25 06:08 codervivek5