Commit graph

2 commits

Author SHA1 Message Date
58b7607074 feat: Add interactive dropdown selection for forms
- Parse and store OPTION elements in SELECT fields
- Display selected option text in dropdown UI
- Add SELECT_OPTION input mode for dropdown navigation
- Support Enter on SELECT to enter selection mode
- Use j/k or arrow keys to navigate through options
- Enter to confirm selection, Esc to cancel
- Auto-select first option or option marked with 'selected'
- Real-time option preview in status bar
- Status bar shows "-- SELECT --" mode

Data structure:
- Added options vector to DomNode (value, text pairs)
- Added selected_option index to track current selection

Keyboard shortcuts in SELECT mode:
- j/Down: Next option
- k/Up: Previous option
- Enter: Select current option
- Esc: Cancel selection
2025-12-28 00:03:39 +08:00
7e55ade793 feat: Add interactive form text input editing
- Add FORM_EDIT input mode for editing text fields
- Add actions: NEXT_FIELD, PREV_FIELD, EDIT_TEXT, ACTIVATE_FIELD
- Support 'i' key to focus first form field
- Tab/Shift+Tab to navigate between fields
- Enter on text input fields to edit them
- Real-time text editing with live preview
- Enter/Esc to exit edit mode
- Checkbox toggle support (press Enter on checkbox)
- Status bar shows "-- INSERT --" mode and current text
- Form fields highlighted when active

Keyboard shortcuts:
- i: Focus first form field
- Tab: Next field
- Shift+Tab: Previous field
- Enter: Activate/edit field or toggle checkbox
- Esc: Exit edit mode
2025-12-27 23:52:36 +08:00