Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve ui in filters #1884

Closed
wants to merge 4 commits into from
Closed

improve ui in filters #1884

wants to merge 4 commits into from

Conversation

Priyal208
Copy link
Contributor

@Priyal208 Priyal208 commented Jul 17, 2024

#1851 fixed
Close #1851

Changes proposed

I improved UI of filters section, changed colors also changed them specifically for hover and focus, as you can see in the below image , on hover there is different color and when one section is focused i.e open color changes, I also give some curvature to the rectangular div to make it look more appealing

Thus i made the UI better beautiful and more attractive

Screenshots

Screenshot 2024-07-17 225656
Screenshot 2024-07-17 225705

Summary by CodeRabbit

Summary by CodeRabbit

  • Style
    • Improved the visual design and interactivity of the filter section in the Popular Categories component, including updates to the select element and option elements for a more engaging user experience.

Copy link

vercel bot commented Jul 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vigybag ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2024 5:34pm

Copy link
Contributor

coderabbitai bot commented Jul 17, 2024

Walkthrough

The FilterSection component in Filters.jsx has been significantly enhanced to improve its visual styling and user interaction. This update introduces new CSS classes and inline styles to the <select> and <option> elements, resulting in a more appealing and interactive filter dropdown that aligns with the overall website theme.

Changes

File Change Summary
src/.../Popular_Categories/Filters.jsx Enhanced styling and interactivity of the <select> and <option> elements with new CSS classes and inline styles.

Assessment against linked issues

Objective Addressed Explanation
Improve UI of filters (#1851)

Poem

In the land of code, where filters reside,
A <select> element got a stylish ride.
With classes and styles, it shines so bright,
Enhancing the page, a visual delight.
The user experience, now smooth and clear,
Thanks to the updates, we all cheer! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • Generate unit testing code for this file.
    • 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. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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

Documentation and Community

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (1)
src/User/components/Popular_Categories/Filters.jsx (1)

Line range hint 13-13: Correct the style attribute in the aside element.

The filterStyles object is being used incorrectly. It should be directly applied, not wrapped in curly braces within the style attribute.

- style={{ filterStyles }}
+ style={filterStyles}
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 403cf8a and 8948428.

Files selected for processing (1)
  • src/User/components/Popular_Categories/Filters.jsx (1 hunks)

Comment on lines +50 to +69
<h3 className="font-semibold mb-2">{title}</h3>
<select
onChange={onChange}
className="w-full p-2 border rounded-lg bg-[#166635ff] text-white hover:bg-[#3d9907ff] focus:bg-[#bad9a8] focus:outline-none"
style={{ borderRadius: '1rem' }}
>
<option value="" className="bg-[#166635ff] text-white hover:bg-[#3d9907ff] focus:bg-[#bad9a8]">
All
</option>
{options.map((option) => (
<option
key={option}
value={option}
className="bg-[#166635ff] text-white hover:bg-[#3d9907ff] focus:bg-[#bad9a8]"
style={{ borderRadius: '1rem' }}
>
{title === "Price" ? `Under $${option}` : option}
</option>
))}
</select>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor repeated styles and classes for maintainability.

The styles and classes related to the background color, text color, hover, and focus states are repeated across multiple elements. Consider using a CSS class to manage these styles centrally.

- className="bg-[#166635ff] text-white hover:bg-[#3d9907ff] focus:bg-[#bad9a8]"
+ className="filter-option-style"

And define .filter-option-style in an external CSS file with the appropriate properties.

Approve the inline style for rounded corners.

The inline style for borderRadius is well-placed since it allows easy customization for specific elements.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<h3 className="font-semibold mb-2">{title}</h3>
<select
onChange={onChange}
className="w-full p-2 border rounded-lg bg-[#166635ff] text-white hover:bg-[#3d9907ff] focus:bg-[#bad9a8] focus:outline-none"
style={{ borderRadius: '1rem' }}
>
<option value="" className="bg-[#166635ff] text-white hover:bg-[#3d9907ff] focus:bg-[#bad9a8]">
All
</option>
{options.map((option) => (
<option
key={option}
value={option}
className="bg-[#166635ff] text-white hover:bg-[#3d9907ff] focus:bg-[#bad9a8]"
style={{ borderRadius: '1rem' }}
>
{title === "Price" ? `Under $${option}` : option}
</option>
))}
</select>
<h3 className="font-semibold mb-2">{title}</h3>
<select
onChange={onChange}
className="w-full p-2 border rounded-lg bg-[#166635ff] text-white hover:bg-[#3d9907ff] focus:bg-[#bad9a8] focus:outline-none"
style={{ borderRadius: '1rem' }}
>
<option value="" className="filter-option-style">
All
</option>
{options.map((option) => (
<option
key={option}
value={option}
className="filter-option-style"
style={{ borderRadius: '1rem' }}
>
{title === "Price" ? `Under $${option}` : option}
</option>
))}
</select>
```
Additionally, you would need to define the `.filter-option-style` class in an external CSS file:
```css
.filter-option-style {
background-color: #166635ff;
color: white;
border-radius: 1rem;
}
.filter-option-style:hover {
background-color: #3d9907ff;
}
.filter-option-style:focus {
background-color: #bad9a8;
}

@Priyal208
Copy link
Contributor Author

@codervivek5 pls review this

@Priyal208
Copy link
Contributor Author

@codervivek5 pls review

@codervivek5
Copy link
Owner

make is same color not like multi color

@Priyal208
Copy link
Contributor Author

@codervivek5 i dont understand what youre saying, pls specify further

Copy link

vercel bot commented Jul 22, 2024

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

@Priyal208
Copy link
Contributor Author

@codervivek5 pls merge this

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8948428 and 7db03ce.

Files selected for processing (1)
  • src/User/components/Popular_Categories/Filters.jsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/User/components/Popular_Categories/Filters.jsx

@codervivek5
Copy link
Owner

there is no need to make any changes to this dashboard page...if needed then I'll raise a new issue

@codervivek5
Copy link
Owner

actually filter is not in the right place or not seem like working correct..... there is some bugs in filter so at this time we can't add your PR for these changes.

you can find another issue then let me know if that will needful then definetly assgin to you

I can understand of your effort but sorry for now.

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.

Improve UI of filters
2 participants