Skip to content

Conversation

@Mert-Kirman
Copy link
Contributor

Add Challenge Deadline Display and Management

Summary

Implemented deadline functionality for challenges, allowing users to create challenges with deadlines and view deadline information with visual urgency indicators.

Changes Made

Challenge Creation

  • Added deadline input field to challenge creation modal (YYYY-MM-DD format)
  • Deadline is now a required field when creating challenges
  • Localized "Make challenge public" toggle text

Deadline Display

  • Challenges now show deadline information with clock icon (⏰)
  • Smart deadline formatting:
    • "X days left" (>1 day remaining)
    • "Due tomorrow" (1 day)
    • "Due today" (0 days)
    • "Overdue by X days" (past deadline)
  • Color-coded urgency indicators:
    • 🔴 Red: Overdue or ≤1 day remaining
    • 🟡 Yellow/Orange: 2-3 days remaining
    • 🟢 Green: >3 days remaining

Technical Improvements

  • Added helper functions: getDaysRemaining(), formatDeadline(), getDeadlineUrgencyColor()
  • Refactored UserChallenge interface and challenge filtering logic
  • Improved challenge refresh functionality
  • Fixed challenge enrollment state tracking

Screenshots

Challenge cards now display deadline information below the Public/Private indicator with appropriate urgency colors.

Testing

  • Create a challenge with various deadline dates
  • Verify deadline text formats correctly for different time ranges
  • Confirm urgency colors change based on days remaining

Closes: #462

@Mert-Kirman Mert-Kirman self-assigned this Dec 15, 2025
@Mert-Kirman Mert-Kirman added enhancement New feature or request pr:high High-Priority task 6-12 hours Expected time of the task labels Dec 15, 2025
Copy link
Contributor

@berkayak13 berkayak13 left a comment

Choose a reason for hiding this comment

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

thanks for handling challenges screen + deadline
great set of changes

@berkayak13 berkayak13 merged commit 4f923c0 into main Dec 15, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6-12 hours Expected time of the task enhancement New feature or request pr:high High-Priority task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deadlines and Notifications for Challenges - Requirement Coverage: RQ-2

3 participants