Repository navigation
core: the text widgets end a touch frame the same way - #1211
Merged
Merged
Conversation
Signed-off-by: fizzy pop-os-claude-2 <slot+pop-os-claude-2@fizzy.invalid>
|
TRIAGE @01da6f17 auto: mechanical rules met (fizzy-* app author, names work#1182, 34 non-test lines <= 400, no risky path). Labelled |
Contributor
Where this PR standsStage: Author's turn What the PM needs before approving (ticks as it is met; the full CI runs only at the end, after the reviews are clean):
Reviews at the current commit (
Updated 2026-11-11 17:15 UTC by the PM. This comment is edited in place. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
core: the text widgets end a touch frame the same way
Part of fizzyedit/work#1182
In plain words
On a phone or tablet you hold a finger on text to select a word. Fizzy has two kinds of text a finger can do this on: text you can only read, like a chat message, and text boxes you type into. Each had its own copy of the step that decides, at the end of a frame, whether the hold has lasted long enough to select. Now both use one copy, so they cannot drift apart. Nothing about how a hold feels changes.
What changes
In the text box, eight lines become one:
What you will notice
Nothing visible: internal. A later fix to how a hold ends lands in both kinds of text at once.
How we know it works
The existing touch tests for both widgets pass unchanged: a hold selects a word, a drag past the slop cancels the hold, a scroll lets go of it, a hold in a floating window, and the text box's touch, tap, double-tap and hold cases. No test was added or changed, because the behaviour is the same.
How this serves fizzy
It keeps touch text selection the same on every kind of text, so fizzy on phones and tablets behaves as one app (Platform).
For agents: technical summary
Goal
Remove the duplicated end-of-frame hold handling between
SelectableText.processTouchandTextEntry.processTouch(work#1182).What changed and why
core/widgets/SelectableText.zig: newpub fn endHold(hold, tl, focus_id) boolright afterselectWordAt, holding the captured-cancel,due/selectWordAtandremaining/dvui.timerlines in their original order;processTouchcalls_ = endHold(hold, tl, tl.data().id).init/initStyledtakestd.lang.SourceLocation.core/widgets/TextEntry.zig:processTouchcallsSelectableText.endHold(hold, tl, self.entry.data().id)and setsplaced. The timer still keys on the layout's id and the focus on the entry's, as before. TextEntry already imported SelectableText, so no new import.Line counts (
git diff --numstat HEAD): added 17, deleted 17, total 34 (SelectableText.zig +16/-9, TextEntry.zig +1/-8). Added non-test lines: 17.How it was verified
zig fmt --checkon both files,scripts/zb build,scripts/zb build test,scripts/zb build test-integration; see report.md for results.Not done / follow-ups
None.
Part of fizzyedit/work#1182