Add Showcase App - #53
Draft
otondin wants to merge 8 commits into
Draft
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WAGND918FAPrcDY3ifcnQt
…eric Compose interpreter Swift (ShowcaseKit) owns the component model, all screen state, event handling, and form validation; Kotlin renders whatever Swift declares via a single JSON/JNI boundary of three (String...) -> String functions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WAGND918FAPrcDY3ifcnQt
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WAGND918FAPrcDY3ifcnQt
Raises the swift-java requirement to 0.5.1 and adds .iOS(.v18) to the supported platforms list in Package.swift. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D9NoZGnDMVGstd731cE3am
…nents Renames the wire vocabulary to match ReSwift, which contributors coming from iOS unidirectional-data-flow work are likely to already know: - Event -> Action, and ScreenDefinition.handle() -> reduce(). This is documented as intentionally *not* a pure functional reducer: each screen still mutates its own state in place rather than returning a new immutable tree, so the naming shouldn't be read as a promise of ReSwift's exact semantics. - ShowcaseStore -> ScreenRegistry, since each ScreenDefinition is already its own independent store; the registry only routes showcaseDispatch to the right one, never holds UI state itself. Splits the single Screens.swift into one file per screen (Buttons, Selection, Sliders, TextInputs, Form), matching the "one store per feature" scoping above, and adds two new screens: - FeedbackScreen: progress indicator + alert dialog (confirm/cancel). - PickersScreen: stepper + date picker, split out of TextInputsScreen since neither is actually a text-entry control. Adds new Component kinds along the way: `role` (primary/secondary) on button, segmentedControl, progressIndicator, alert, stepper, datePicker, textEditor, and code (a Swift snippet paired with each screen section, rendered as a fullscreen modal on the Kotlin side). Reuses existing Action cases (.select, .setString, .setNumber, .tap) and CodingKeys wherever the wire format allowed it, rather than growing the format for every new control. 23 tests pass, including a parameterized check that every section across every screen carries exactly one code snippet. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D9NoZGnDMVGstd731cE3am
Adds Compose rendering for every new Component kind from ShowcaseKit: - button role (primary/secondary) drives filled Button vs. OutlinedButton. - segmentedControl via SingleChoiceSegmentedButtonRow/SegmentedButton. - progressIndicator via the lambda LinearProgressIndicator overload. - alert via AlertDialog, dispatching select(0)/select(1) for confirm/cancel. - stepper as a row of two IconButtons around the value, disabled at min/max. - datePicker via DatePickerDialog/DatePicker, converting between the ISO date string on the wire and epoch millis for rememberDatePickerState. - textEditor as a multi-line OutlinedTextField. Adds CodeSnippetView/CodeSnippetDialog: an icon-only trigger that opens a fullscreen Dialog showing the section's Swift snippet, with Copy (via LocalClipboardManager) and a Wrap/No-wrap toggle for long lines. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D9NoZGnDMVGstd731cE3am
Splits a screen's flat component list into sections at each sectionHeader boundary (groupIntoSections) — a purely Kotlin-side concern, since Swift only ever emits a flat list. Each section renders as its own OutlinedCard, with the header text leading and the section's code-snippet info icon trailing in the same row, instead of flowing through the section as an ordinary component. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D9NoZGnDMVGstd731cE3am
…een files Updates the schema table with role, segmentedControl, progressIndicator, stepper, datePicker, alert, textEditor, and code rows; renames the "Events it emits" column to "Actions it emits"; updates the JNI-boundary diagram and function table from event/eventJSON to action/actionJSON; and points "Add your own screen" at reduce(_:componentId:) and ScreenRegistry.swift, noting screens now live one-per-file. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D9NoZGnDMVGstd731cE3am
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.
No description provided.