Skip to content

Add Challenge of the Day feature on homepage#352

Open
shreyaB7134 wants to merge 1 commit intoopensource-society:mainfrom
shreyaB7134:challenge-of-the-day-feature
Open

Add Challenge of the Day feature on homepage#352
shreyaB7134 wants to merge 1 commit intoopensource-society:mainfrom
shreyaB7134:challenge-of-the-day-feature

Conversation

@shreyaB7134
Copy link

This PR adds a "Challenge of the Day" section to the homepage (index.html).
✅ It shows one LeetCode challenge per day using a client-side algorithm based on the current date.
✅ It includes challenge titles, difficulty, and links to LeetCode.
✅ Enhances user engagement by encouraging daily problem-solving.

Fixes #214

CodeClip.-.Personal.-.Microsoft.Edge.2025-07-31.22-27-07.mp4

🔗 Part of GSSoC 2025 ✨

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 a "Challenge of the Day" feature to the CodeClip homepage, introducing three new files: a CSS stylesheet (styles/challengeOfTheDay.css), a JSON data file (challenges.json), and modifications to the main homepage (index.html). The feature is designed to enhance user engagement by providing daily coding challenges from LeetCode.

The implementation includes a modern, responsive UI component with difficulty-based color coding (Easy/Medium/Hard), loading states, and hover effects that integrate with the existing design system using the established primary color (#4f46e5). The challenges.json file contains 51 curated LeetCode problems ranging from Easy to Hard difficulty levels, providing the data source for the feature.

However, there's a significant discrepancy between the PR description and actual implementation. While the description promises "one LeetCode challenge per day using a client-side algorithm based on the current date," the actual implementation generates random challenges when users click a button, rather than displaying a consistent daily challenge that all users would see on the same date.

The feature integrates into the homepage by adding a new section with a Bootstrap-based layout, maintaining consistency with the existing CodeClip design patterns. The CSS provides comprehensive styling for various states and responsive breakpoints, though it primarily focuses on mobile responsiveness.

Confidence score: 2/5

  • This PR has critical structural issues that will likely cause problems in production
  • The HTML contains duplicate navigation elements creating invalid markup, and the feature doesn't match the specified requirements
  • Files needing attention: index.html (duplicate navigation), challenges.json (unused data source), and the overall feature implementation logic

3 files reviewed, 3 comments

Edit Code Review Bot Settings | Greptile

Comment on lines +213 to +216
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
Copy link
Contributor

Choose a reason for hiding this comment

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

style: This fadeIn animation is defined but never used in the CSS. Consider removing it or applying it to relevant elements.

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.

[Feature] Challenge of the Day on Homepage

1 participant