Repository navigation
Add TextInput widget for text entry support - #12
Merged
Merged
Conversation
Extends the declarative UI framework with a TextInput widget that follows a controlled-component pattern (Haskell owns the state). The widget takes a placeholder hint, current value, and onChange callback. Changes across the full stack: - Widget ADT: new TextInput constructor - UIBridge.h/hs: UI_NODE_TEXT_INPUT, UI_PROP_HINT, UI_EVENT_TEXT_CHANGE - Render.hs: separate text callback registry, dispatchTextEvent - HaskellMobile.hs: haskellOnUITextChange FFI export (no re-render to avoid EditText cursor flicker) - Android JNI/Java: EditText creation, setHint, TextWatcher integration - 5 new tests covering text callbacks, ID space sharing, and reset Prompt: Implement TextInput widget for haskell-mobile as Phase 1 of gym PR tracker app Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds visibility: public to haskell-mobile-lifecycle and haskell-mobile-ui sub-libraries, allowing external packages (like prrrrrrrrr) to depend on them directly for Backpack instantiation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jappeace-sloth
pushed a commit
to jappeace-sloth/prrrrrrrrr
that referenced
this pull request
Mar 27, 2026
PRRRRRRRRR — Olympic weightlifting 1RM personal record tracker using haskell-mobile as the UI framework with Backpack signature instantiation. Features: - 12 Olympic weightlifting and strength exercises - SQLite storage via bundled amalgamation (raw FFI) - Two-screen UI: exercise list with PRs, weight entry with text input - Controlled-component TextInput pattern for weight entry - Weight parsing with validation (positive numbers only) Architecture: - Backpack: prrrrrrrrr-app-impl provides HaskellMobile.App - prrrrrrrrr-app instantiates haskell-mobile with our implementation - unsafePerformIO global state for DB init (same pattern as counter demo) - Nix: shell.nix for dev, nix/android.nix for cross-compilation, nix/apk.nix for APK assembly 15 tests: model (3), storage (2), views (4), weight parsing (6) Depends on haskell-mobile text-input-widget branch (jappeace/hatter#12) Prompt: Implement prrrrrrrrr gym PR tracker as Phases 2-8 of plan Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
TextInputconstructor to Widget ADT (placeholder, value, onChange callback)Test plan
cabal buildpassescabal test— all 26 tests pass (21 existing + 5 new)🤖 Generated with Claude Code