Skip to content

Conversation

@VidhanThakur09
Copy link
Contributor

@VidhanThakur09 VidhanThakur09 commented Jul 23, 2025

This PR introduces a new "Challenges" page to the application, allowing users to view and track their progress on coding problems.

Key Changes:

  • New Page: Implemented challenges.html (or integrated into index.html as a section, as done in the provided example) for displaying coding problems.
  • Problem Listing: Dynamically renders a list of coding problems categorized by difficulty (Easy, Medium, Hard).
  • Progress Tracking: Users can mark problems as "Done" or "Pending" using checkboxes.
  • Local Storage Persistence: The completion status of problems is saved to and loaded from localStorage to maintain progress across sessions.
  • Visual Indicators: Completed problems are visually differentiated with a left border and updated text.
  • Responsive Design: The layout adapts to different screen sizes for an optimal user experience.

Files Added/Modified:

  • Challenges.html: Updated navigation and added the challenges section.

  • Challenge.css: Added styles for the challenges page, problem cards, and status indicators.

  • script.js: Implemented problem data, dynamic rendering, and local storage management.

Preview

Screen.Recording.2025-07-23.154806.mp4

Issue fixed #52

@VidhanThakur09
Copy link
Contributor Author

@adityai0 all the merge conflict are fixed

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 new challenges page to the CodeClip application, implementing a progress tracking system for coding problems. The core functionality is delivered through a new pages/challenge.html file that displays coding challenges organized by difficulty levels (Easy, Medium, Hard) with interactive checkboxes for marking completion status.

The implementation leverages localStorage to persist user progress across browser sessions, allowing users to track which problems they've completed. The page features a card-based layout with visual indicators - completed problems display a green left border and updated status text. The JavaScript handles dynamic rendering of problem cards and manages state synchronization with localStorage.

The changes also update navigation links across multiple pages (index.html, profile.html, about.html, editor.html) to point to the new challenges page. The styling is handled through modifications to styles/challenges.css, which implements a dark theme design with custom CSS properties for colors and typography.

The feature integrates with the existing CodeClip architecture by following the established pattern of separate HTML pages for different sections, maintaining consistency with the application's card-based UI design, and using the existing navigation structure.

PR Description Notes:

  • The PR body mentions files like "Challenges.html" and "Challenge.css" which don't match the actual filenames in the implementation
  • References to script.js modification aren't reflected in the changed files

Confidence score: 1/5

  • This PR has critical navigation inconsistencies and file naming conflicts that will break user experience
  • Multiple files have inconsistent navigation links pointing to different challenge pages, the about.html file contains challenge-related content instead of about information, and the CSS implementation breaks the existing theme system
  • All modified files need attention, particularly pages/about.html which appears to be incorrectly implemented, and styles/challenges.css which breaks theme compatibility

6 files reviewed, 6 comments

Edit Code Review Bot Settings | Greptile

<ul class="nav__list">
<li><a href="/" data-route="/" class="nav__link">Home</a></li>
<li><a href="challenges.html" data-route="/challenges" class="nav__link">Challenges</a></li>
<li><a href="challenge.html" data-route="/challenges" class="nav__link">Challenges</a></li>
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Navigation inconsistency: header links to 'challenge.html' but footer (line 217) still links to 'challenges.html'

<ul class="nav__list">
<li><a href="/" data-route="/" class="nav__link">Home</a></li>
<li><a href="challenges.html" data-route="/challenges" class="nav__link active">Challenges</a></li>
<li><a href="challenge.html" data-route="/challenges" class="nav__link active">Challenges</a></li>
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Navigation link changed to 'challenge.html' but footer on line 82 still references 'challenges.html', creating inconsistency

<nav class="header__nav" id="navMenu">
<ul class="nav__list">
<li><a href="/" data-route="/" class="nav__link">Home</a></li>
<li><a href="/pages/challenge.html" data-route="/challenges" class="nav__link active">Challenges</a></li>
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Navigation inconsistency: this links to /pages/challenge.html but other pages link to challenge.html without the path prefix, and the index.html links to challenges.html (plural). This will break navigation.

Comment on lines 3 to +12
:root {
--bg-color: #f4f7f9;
--text-color: #1a202c;
--card-bg: #ffffff;
--border-color: #e2e8f0;
--input-bg: #ffffff;
--accent-color: #3182ce;
--accent-color-hover: #2b6cb0;

/* Badge Colors */
--easy-bg: #d4edda;
--easy-text: #155724;
--medium-bg: #fff3cd;
--medium-text: #856404;
--hard-bg: #f8d7da;
--hard-text: #721c24;
}

[data-theme="dark"] {
--bg-color: #1a202c;
--text-color: #e2e8f0;
--card-bg: #2d3748;
--border-color: #4a5568;
--input-bg: #2d3748;
--accent-color: #63b3ed;
--accent-color-hover: #90cdf4;

/* Badge Colors */
--easy-bg: #1c4532;
--easy-text: #68d391;
--medium-bg: #4a3a19;
--medium-text: #f6e05e;
--hard-bg: #521b22;
--hard-text: #f56565;
--primary-color: #6a00ff; /* A purple tone for highlights */
--background-color: #1a1a1a; /* Dark background */
--card-background: #2a2a2a; /* Slightly lighter card background */
--text-color: #e0e0e0; /* Light grey text */
--light-text-color: #b0b0b0; /* Lighter grey for descriptions */
--border-color: #444444; /* Darker grey for borders */
--success-color: #28a745; /* Green for completed */
--pending-color: #ffc107; /* Yellow for pending (or leave as default) */
}
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: These hardcoded CSS variables break the existing theme system. Users in light mode will be forced into dark theme colors. Should use the existing theme variables from themes.css instead.

</section>
</main>

<script >
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: Empty script tag attribute - should be <script> without the space

Suggested change
<script >
<script>

Comment on lines +30 to +37
/* header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 3rem;
background-color: var(--card-background);
border-bottom: 1px solid var(--border-color);
} */
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Commented-out header styles will break the page layout since the challenges.html expects header styling to be provided.

Suggested change
/* header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 3rem;
background-color: var(--card-background);
border-bottom: 1px solid var(--border-color);
} */
header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 3rem;
background-color: var(--card-background);
border-bottom: 1px solid var(--border-color);
}

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] Add Challenges Page to Display and Track Coding Problems

1 participant