docs: fix undefined tap/1 in getting_started example (closes #46) - #63
Merged
Conversation
The example used `on_tap={tap(:increment)}`, but no `tap/1` exists — `use
Mob.Screen` imports the sigil, not a `tap` helper — so pasting the getting-
started example produced a compile error (GH #46). Use the canonical inline
tuple `on_tap={{self(), :increment}}` (matches `Mob.Sigil`'s own docstring,
screen_lifecycle.md, and device_capabilities.md), which the existing
`handle_info({:tap, :increment}, ...)` already handles. Added a clause to the
walkthrough explaining the `{self(), :increment}` → `{:tap, :increment}` wiring.
Verified: the corrected module compiles and renders a valid tree.
Closes#46.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Uh oh!
There was an error while loading. Please reload this page.
GenericJam added a commit
that referenced
this pull request
Jul 5, 2026
Ships MOB-14 (#62): Mob.Device.network_state/0 + online?/0 + the :network subscribe category. %{online, transport, expensive, validated, constrained}, with :unavailable where a platform can't answer. iOS NWPathMonitor + Android ConnectivityManager.NetworkCallback (Kotlin bridge via mob_new 0.4.18+). Device-verified on iOS sim + moto g power (2021). Also ships doc fixes#63/#64. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GenericJam added a commit
that referenced
this pull request
Jul 5, 2026
Ships MOB-20 (#66): Mob.Device.keep_awake/1 prevents screen auto-dim/lock, no permission. Device-verified both directions on moto g power (2021) + iPhone SE (3rd gen). Android Kotlin bridge ships via mob_new 0.4.19+. (0.7.16 was taken by the parallel connectivity release, which already folded in the docs from #63/#64 — so #65 is superseded.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GenericJam added a commit
that referenced
this pull request
Sep 1, 2026
Records the two merged doc-only PRs under a new [0.7.16] section so they're ready for the next release (doc changes only reach hexdocs via a publish). No mix.exs bump — this stages the entry without triggering release.yml. Co-Authored-By: Claude Opus 4.8 (1M context) <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 freeto 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.
What
The "Your first screen" example in
guides/getting_started.mdused:There is no
tap/1function —use Mob.ScreenimportsMob.Sigil(which has notaphelper), so a newcomer pasting the getting-started example hits a compile error:undefined function tap/1. Reported as #46.Fix
Use the canonical inline tuple, which the example's existing
handle_info({:tap, :increment}, ...)already handles:This matches the form already used in
Mob.Sigil's own docstring (lib/mob/sigil.ex:23),guides/screen_lifecycle.md, andguides/device_capabilities.md— getting_started was the only doc with the broken form. Also added one clause to the walkthrough prose explaining the{self(), :increment}→{:tap, :increment}wiring, since that mapping was previously unexplained.Verification
Compiled the corrected module (
use Mob.Screen+ the~MOBsigil) and calledrender/1— it compiles and produces a valid render tree, where the old form was a hard compile error. Docs-only; no code paths touched.Closes#46.
🤖 Generated with Claude Code