mirror of
https://github.com/aculix/negotium.git
synced 2026-09-11 07:28:17 +00:00
fix: give editing its own button and hand the text back to dragging
Making the task text clickable turned it into a button, and the drag handler skips anything inside a button. That quietly cost the row its best drag handle: press and move across the text and nothing picked the card up, so you got a text selection instead. Verified before changing anything, dragging from the text did nothing while dragging from the row's padding worked. Editing moves to a pencil next to the arrow and the bin, and the text goes back to being text. Rows also stop being selectable, since the row is a drag handle and highlighting words across one is never what you meant. The edit field keeps selection so text can still be copied out of it. A third button costs width on a phone, where all three stay visible because there is no hover. Grouping the actions so their gaps stop multiplying across the row, and drawing them at 26px, keeps most of it back: 199px of text becomes 187, 24 characters a line becomes 23. The 44px tap targets come from the overlay underneath, so a smaller drawn button does not shrink them. Also drops the click-after-drag guard, which only existed because the text was clickable.
This commit is contained in:
@@ -90,7 +90,7 @@ The date, storage, rollover, task and undo logic lives in `src/lib/` as plain mo
|
||||
### Managing Tasks
|
||||
- **Add a task**: Type in the input field and press Enter
|
||||
- **Complete a task**: Click the checkbox next to the task
|
||||
- **Edit a task**: Click its text. Enter saves, Escape cancels, and clicking away saves too
|
||||
- **Edit a task**: Click the pencil on the task. Enter saves, Escape cancels, and clicking away saves too
|
||||
- **Delete a task**: Click the delete icon on the task (it shows on hover, and is always visible on touch), or press `Delete` with the task focused
|
||||
- **Undo**: An Undo button appears for a few seconds after a task is deleted, cleared or moved to another day. `Cmd/Ctrl+Z` does the same. Either way the task returns to where it was
|
||||
- **Move a task to Tomorrow**: Click the arrow on the task, or press `Alt+→`. From Tomorrow, the arrow points back and `Alt+←` returns it to Today
|
||||
|
||||
Reference in New Issue
Block a user