Skip to content

Conversation

@Ishuuu1213
Copy link
Contributor

@Ishuuu1213 Ishuuu1213 commented Jul 27, 2025

This PR implements interactive search and filtering capabilities on the Challenges page to improve user experience and usability.

πŸ” Features Implemented:
βœ… Real-time Search: Users can now search for challenges by title or tag.

βœ… Multi-Filter Support:

Filter by difficulty

Filter by language

Filter by completion status

βœ… Combination of Filters is supported β€” all filters work together seamlessly.

βœ… Clear Filters button added beside the search bar to reset all filters with a single click.

πŸ’… UI Updates:
Adjusted layout using flexbox to place the Clear Filters button neatly to the right of the search input field.

Maintained responsive styling for consistent behavior across screen size

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR adds comprehensive search and filtering functionality to the Challenges page to enhance user experience. The implementation includes real-time search capabilities that allow users to find challenges by title, along with multi-filter support for difficulty, language/category, and completion status. All filters work together seamlessly, meaning users can combine search terms with multiple filter criteria.

The core functionality is implemented in pages/challenges.html using vanilla JavaScript with DOM manipulation. When users interact with the search input or filter dropdowns, the code iterates through all challenge cards and shows/hides them based on matching criteria. A "Clear Filters" button is positioned next to the search bar using flexbox layout, allowing users to reset all filters with a single click. The implementation also includes a visible counter that displays a "no results" message when no challenges match the current filters.

This change integrates well with the existing codebase architecture, which uses vanilla HTML/CSS/JavaScript without external dependencies. The filtering logic follows the project's pattern of direct DOM manipulation and maintains the responsive design principles already established in the application.

PR Description Notes:

  • The description claims search works for both "title or tag" but the implementation only searches challenge titles
  • Minor discrepancy between claimed functionality and actual implementation

Confidence score: 3/5

  • Safety assessment: This PR has some implementation gaps that could affect user experience but won't break core functionality
  • Reasoning: Missing CSS styles for new UI elements (Clear Filters button lacks .btn-secondary styling), search functionality doesn't match the claimed title+tag search, and an unnecessary empty div was added
  • Files needing attention: styles/challenges.css needs proper CSS for new UI elements, and pages/challenges.html has minor code quality issues that should be addressed

3 files reviewed, 2 comments

Edit Code Review Bot Settings | Greptile

@Ishuuu1213
Copy link
Contributor Author

@adityai0 @faisal07777 sir please review it

@faisal07777 faisal07777 merged commit 6addd7e into opensource-society:main Jul 27, 2025
1 check failed
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.

4 participants