-
-
Notifications
You must be signed in to change notification settings - Fork 14
feat: add active filters and sort indicator UI #197
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
base: main
Are you sure you want to change the base?
feat: add active filters and sort indicator UI #197
Conversation
- Add visible indicator showing active filters and sort state - Display filter tags with color-coded styling - Include 'Clear All' button to reset filters - Update indicator automatically on filter changes - Responsive design for mobile and desktop - Only shows when filters are active (hidden by default)
Summary of ChangesHello @NssGourav, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the user experience by providing a clear and responsive visual indicator for active filters and sorting. Users can now easily see which filters are applied through color-coded tags and quickly reset them with a "Clear All" button. This feature improves the clarity and usability of the filtering system, making it more intuitive to track and manage search criteria across various devices. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Here's the code health analysis summary for commits Analysis Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a great new feature for displaying active filters and sorting, which significantly improves the user experience by providing clear visual feedback. The implementation is solid, adding the necessary HTML, CSS, and JavaScript logic.
My review includes a few suggestions to enhance maintainability and follow best practices. These include refactoring some repetitive JavaScript logic into helper functions, removing magic numbers, and improving the separation of concerns between HTML and JavaScript. Addressing these points will make the new code even more robust and easier to manage in the future.
Overall, great work on this enhancement!
- Replace magic numbers with named constants (MAX_FOLLOWERS, MAX_REPOS, MAX_FORKS) - Extract duplicate select filter logic into reusable helper function - Replace emoji icon with accessible SVG icon - Remove inline onclick handler, use event listener instead - Improve code maintainability and follow best practices
NssGourav
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the string concatenation issues
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new UI component to display active filters and the current sort order, which is a great enhancement for user experience. The implementation is solid, with new JavaScript logic to build the filter tags, corresponding CSS for styling, and the necessary HTML structure. My review includes a few suggestions to improve maintainability, performance, and consistency. Specifically, I've pointed out some code duplication that could be refactored, an opportunity to improve DOM update performance, a minor inconsistency in number formatting, and a suggestion to avoid inline styles in favor of CSS classes.
- Replace string concatenation with template literals - Extract duplicate range filter logic into helper function - Apply consistent number formatting to all range filters - Optimize DOM manipulation using DocumentFragment - Remove inline styles, use CSS classes instead
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new UI feature to display active filters and the current sort order, which significantly improves the user experience by providing clear visual feedback. The implementation is well-structured, introducing constants to replace magic numbers and adding new functions to handle the UI updates. I've identified a few areas for improvement, mainly related to code duplication and potential performance enhancements. Specifically, there's an opportunity to refactor the addSelectFilterTag calls to reduce redundancy and to optimize DOM manipulation in updateActiveFiltersIndicator for better performance.
- Remove trailing whitespace - Refactor repeated addSelectFilterTag calls into loop - Replace innerHTML with replaceChildren for better performance - Improve code maintainability and follow best practices
|
@jbampton please review this |
|
@BaseMax please review this. |
This PR Fixes #145
This PR enhances the filter and sorting UX by adding a clear and responsive visual indicator for active states.
Changes Included
Clear Allbutton to reset all filters instantly.Impact