Skip to content

ui: native text fields + action buttons (search, browse, accounts) - #279

Merged
tannevaled merged 3 commits into
mainfrom
feat/native-entries
Aug 31, 2026
Merged

ui: native text fields + action buttons (search, browse, accounts)#279
tannevaled merged 3 commits into
mainfrom
feat/native-entries

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Continues the native-controls rollout (after #278), on the same Surface-provider mechanism.

Native text fields (composed input, IME, secure)

Topbar feed search, Reddit search + regex, and browse filter each get a real NSTextField over the drawn SearchEntry, bound to the widget's own Text() observable the filter already reads. Composed input (CJK, dead keys, emoji) the drawn toolkit can't accept now works.

Native action buttons — via a hit-dispatch bridge

The reader dispatches clicks by geometry, not widget callbacks. Scene.addNativeButton records key→Hit per frame; the windowapp Handler gives each button descriptor an OnActivate that runs that Hit through the same runHit a click reaches. The accounts editor's action buttons (Back, Done, sign-in, imports) are converted.

Deliberately still drawn (bibliography-confirmed)

Selection pills (provider selector, tabs) can't become clean native radios: the backend adds all controls to one superview with one action selector, and AppKit auto-groups radios by shared superview+action — so every native radio would form one global group. Making pills native needs per-group container views (a separate backend step). Settings text fields need the hit-bridge extended with a commit Hit (their commit is an app method reached via runHit) — also separate.

New producer + bridge tests; new code 100% covered; full reader suite green; verified on-device.

The reader dispatches clicks by geometry, not widget callbacks, so a native
button needs its action wired separately. The Scene records, per frame, each
native button's key -> the Hit its click runs (addNativeButton / NativeHit); the
windowapp Handler gives each button descriptor an OnActivate that runs that Hit
through the same runHit a click reaches. The accounts editor's action buttons
(Back, Done, sign-in, the imports) are the first converted.

Selection pills (provider selector, tabs, on/off toggles) are left drawn for now:
a plain native button loses the selected-state a pill shows; those want native
radios/checkboxes, a separate step.
@tannevaled
tannevaled merged commit 43d5337 into main Aug 31, 2026
13 checks passed
@tannevaled
tannevaled deleted the feat/native-entries branch August 31, 2026 13:33
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.

1 participant