mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-31 05:47:00 -06:00
* Ruler tab stops: corner selector, click to set, drag to move, drag off to clear The ruler's markers were read-only (double-click opened the Tabs dialog, click sets (Left, Center, Right, Decimal, Bar; right-click cycles back), clicking the ruler sets one on the half-division grid (Alt places freely), dragging moves it with a dashed guide down the page and a position tooltip, and dragging it off the ruler clears it. Markers draw per kind, mirrored for right-to-left paragraphs. Each gesture runs para.tabs once on release, so it is one undo step and inherited-stop clearing keeps working. Double-click still opens the dialog. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Progress docs: ruler tab stops (ui-parity Rulers row and revision history, ROADMAP progress log) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Tabs dialog: OK applies what the fields show; double-click a stop to edit its position Selecting a stop, changing its alignment or leader and pressing OK now applies the change without Set, and a new position typed while a stop is selected (the dialog preselects the first) is set on OK, so adding a stop never requires leaving the dialog for the ruler. Double-clicking a stop in the list edits its position in place: Enter or clicking away commits (the interface unit by default, any unit spelled out, either decimal separator), Escape cancels, and the commit moves the stop in one clear + set, keeping its alignment and leader. Clear still wins over a re-typed cleared position, and junk input changes nothing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Tabs dialog: New button, delete from the list, and the list fills its frame New stages a fresh stop - deselects, proposes the next free multiple of the default interval after the last stop (skipping cleared positions), resets alignment and leader, and focuses the position field - and Set or OK adds it. Every row gets a small x that clears its stop, and the Delete key clears the selected one when nothing is being typed; the selection and an in-progress inline edit follow when a row above them goes. The list is a fixed 150 pt wide and the rows and scrollbar fill it, so labels stay left-aligned, the x sits at the frame's edge clear of the scrollbar, and the scrollbar docks at the edge instead of floating mid-list. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Tabs dialog: the stop list is an inline-edit table Each row edits its stop in place: a unit-aware position field (rows resort into position order once the edit ends, never mid-typing; two stops landing on one position merge, the edited row winning), an alignment dropdown and a leader dropdown (the closed box shows just the fill), and the x that clears the row. The double-click editor and move_stop go: the table subsumes them. The selected row keeps an accent outline, its edits sync the fields below, and the frame widens to fit the three columns. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Tabs dialog: the table is the whole editor New adds a row straight into the table at the next free multiple of the default interval, selected and ready to edit in place, and the position field, the Alignment and Leader radio groups and the Set and Clear buttons go: every one of their jobs is a table cell or the row's x. What stays is New, Clear All, the default interval, the cleared list and OK/Cancel, with OK applying the staged diff as one para.tabs call. The staged-field methods (set, clear, on_ok) go with them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Review fixes: safe ruler gestures, one tab tolerance, dialog cleanups Ruler gestures are primary-button only, a click on an indent marker places nothing (the markers absorb their clicks), Escape cancels a drag like a table-border drag (#217), and a drag is stamped with its paragraph: the caret leaving it mid-drag, or a release the ruler never saw, abandons the gesture instead of applying it elsewhere or late. The dragged marker no longer double-draws on its first frame. One TAB_POS_EPS in the doc layer replaces four hardcoded 0.5s across the engine, the dialog and the ruler. The dialog's normalize is a no-op unless a position edit happened, its combos share the ruler's KINDS and one LEADERS table, dead code and a stale doc comment go, and the ui-parity revision row moves to the table's top. Regression tests cover each gesture rule. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>