docs(components): clarify the tag-whitelist warning + Component vs Composite#58
Merged
Merged
Conversation
…-Composite Follow-up to the 0.7.12 component-authoring guide, addressing the two things issue #53 actually got stuck on: - The '~MOB: <Tag> is not in the Mob tag whitelist — pass-through' warning is expected for any registered composite (registration is runtime; the sigil macro can't see it at compile time). Say so, so it reads as informational rather than 'it doesn't work'. - Disambiguate Mob.Component (existing native-view behaviour, render/1 returns a native props map) from Mob.Composite (pure-Elixir tag expanders, expand/3 returns a ~MOB tree). The reporter reached for use Mob.Component; steer that instinct to Composite. Also reword the 'sub-component event isolation' note so it no longer calls the planned feature 'Mob.Component' (that name is taken). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GenericJam
added a commit
that referenced
this pull request
Jul 3, 2026
…e docs Doc-only patch so the components-guide clarifications from #58 reach hexdocs.pm (HexDocs rebuilds only from a published Hex release). Addresses the two sticking points in #53: the whitelist warning is expected for a registered composite, and Mob.Component (native-view behaviour) is distinct from Mob.Composite (pure-Elixir tag expanders). 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 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.
Why
Follow-up to the 0.7.12 component-authoring guide (#…). That release documented how to write a tag composite, which answers the mechanics of issue #53. But it left unaddressed the two things the reporter actually got stuck on:
~MOB: <ReadingTile> is not in the Mob tag whitelist — pass-through as :reading_tileas evidence it "doesn't work." That warning fires at compile time for every custom tag, because registration is a runtime action (Mob.Composite.register/2inon_start/0, or a plugin manifest) the sigil macro can't see. It's informational. The guide never said so.Mob.ComponentvsMob.Composite. They reached foruse Mob.Component. That's a real but different feature — the behaviour for native view components (stateful BEAM process + platform-native view;render/1returns a native props map, not a~MOBtree). The tag-composite path they wanted isMob.Composite(expand/3). The near-identical names are a trap, and nothing steered them off it.What
Three edits to
guides/components.md, all in/around the existing "Defining your own components" section:Mob.Component(native views, advanced) fromMob.Composite(pure-Elixir tags — what most people want).Mob.Componentwrapper" — that name already belongs to the existing native-view behaviour, so the old wording contradicted itself.Docs-only; no code paths touched.
Note on #53
This makes the issue fully answerable from the guide alone. Suggest replying to #53 pointing at the updated "Tag composites" section with a corrected
ReadingTilesnippet (plain module +import Mob.Sigil+expand/3, registered at:expand), then closing.🤖 Generated with Claude Code