Skip to content

feat: implement ExpirySelector component (#64) #93

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

Merged
merged 1 commit into from
Jun 7, 2025

Conversation

nullcoder
Copy link
Owner

Summary

  • Implements ExpirySelector component with 6 predefined time options as per spec
  • Adds human-readable date formatting showing when gists will expire
  • Includes comprehensive tests and interactive demo page

Implementation Details

  • Component: Dropdown selector with Clock icon for visual clarity
  • Options: Never, 1 hour, 6 hours, 1 day, 7 days, 30 days
  • Date Formatting: Smart display showing "today at", "tomorrow at", day of week, or full date
  • API: Returns ISO 8601 timestamps for compatibility with backend
  • Features: Disabled state support, custom styling, keyboard accessible with ARIA labels

Testing

  • ✅ All 10 tests passing covering core functionality
  • ✅ Handles edge cases like non-matching values
  • ✅ Verifies time calculations and formatting

Demo

New demo page at /demo/expiry-selector showcasing:

  • Basic usage with state management
  • Disabled state
  • Multiple selectors on same page
  • Available time options
  • Component features
  • Usage examples

Closes #64

🤖 Generated with Claude Code

- Add ExpirySelector component with 6 predefined time options
- Implement human-readable date formatting (today/tomorrow/weekday)
- Add Clock icon for visual clarity
- Support disabled state and custom styling
- Create comprehensive tests covering all functionality
- Add interactive demo page with multiple examples
- Install date-fns for date manipulation
- Follow GhostPaste spec for expiration options

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@nullcoder nullcoder merged commit bd77092 into main Jun 7, 2025
1 check was pending
@nullcoder nullcoder deleted the feat/expiry-selector branch June 7, 2025 07:16
nullcoder added a commit that referenced this pull request Jun 7, 2025
- Mark ExpirySelector (#64) as complete in TODO.md
- Update PHASE_4_ISSUE_TRACKING.md with PR #93
- Update progress to 13/19 issues (68%) complete
- Update next priority issues list

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
nullcoder added a commit that referenced this pull request Jun 7, 2025
- Mark ExpirySelector (#64) as complete in TODO.md
- Update PHASE_4_ISSUE_TRACKING.md with PR #93
- Update progress to 13/19 issues (68%) complete
- Update next priority issues list

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
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.

feat: create expiry time selector component
1 participant