Skip to content

feat(event) make date_time + title editable#130

Merged
sectore merged 9 commits intomainfrom
feat/ev-editable
Oct 15, 2025
Merged

feat(event) make date_time + title editable#130
sectore merged 9 commits intomainfrom
feat/ev-editable

Conversation

@sectore
Copy link
Copy Markdown
Owner

@sectore sectore commented Oct 14, 2025

An event is editable now.

Summary of Changes

  1. Event System for Cursor Positioning:

    • Added SetCursor(Option<Position>) to AppEvent enum
    • Added cursor position handling in App::draw()
    • Widgets can now request cursor positioning via events
  2. Editable Event Widget:

    • Made title and date_time editable with tui-input
    • Added edit mode with e key to enter editing
    • Tab/Shift+Tab to switch between datetime and title fields
    • Enter to confirm, Esc to cancel
    • Input validation with error highlighting (red color)
  3. Cursor Positioning:

    • Implemented centered cursor / input calculation to work correctly with centered text (via centered_input helper function)
  4. Event Handling:

    • Updated TuiEvent to include Crossterm(CrosstermEvent) variant. Needed to proper event passing to tui-input for full input handling.

Last part to
close #93

@sectore sectore marked this pull request as ready for review October 15, 2025 14:48
@sectore sectore merged commit 95d914c into main Oct 15, 2025
3 checks passed
@sectore sectore deleted the feat/ev-editable branch October 15, 2025 14:49
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 “event countdown” mode: show time-until a future DateTime (with optional label)

1 participant