docs(mobile/v4): native-ui component audit — close the gaps between code and docs#426
Open
shanerbaner82 wants to merge 20 commits into
Open
docs(mobile/v4): native-ui component audit — close the gaps between code and docs#426shanerbaner82 wants to merge 20 commits into
shanerbaner82 wants to merge 20 commits into
Conversation
Text gets Custom fonts (font="Name" from resources/fonts/, bundled at build; iOS PostScript matching, Android assets) and Line height sections (leading-* multipliers + arbitrary [1.4]/[24px], with the iOS additive- spacing caveat). Button and the text inputs cross-reference the font attribute; the inputs note leading is Android-only for typed text. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ade guide Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rrections Documents the previously-missing <native:bare-text-input> (chromeless variant with class-based styling pass-through and a color attribute), the keep-focus-on-submit prop for chat composers, password keyboard type, sync-mode/debounce-ms as direct props with the 300ms default, per-platform leadingIcon()/trailingIcon() signatures, and lineHeight attributes. Drops the stale 'no font overrides' claim. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ops, a11y Removes the slider size prop/method (never read by either renderer), documents sync-mode/debounce-ms on checkbox and the 300ms debounce default, adds a11y props to radio children, notes select options are flat display strings, and adds theme-styling asides matching toggle's. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…m icons, a11y-hint Corrects icon.md to the registered core Element class and documents its full make()/name() signatures, enum-bound :ios/:android attrs, and dark-color. Documents per-platform icon() signatures on button, chip and tab items, the text-only button slot, lineHeight attrs, NavAction menus, badge/chip style overrides (bg-*/rounded-*), optional chip label, and a11y-hint across all seven pages. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…latform accuracy The @leading-change/@trailing-change/@trailing-press Blade events were documented but never wired (not in the precompiler whitelist) — they are now documented as the Element callbacks they actually are, with platform interactivity noted. Adds the plain prop and the automatic inset-grouped style for sectioned lists, per-platform list-item icon attrs and signatures, the shared badge icon key, the auto ellipsis anchor for trailing-menu, ListSection methods, and the virtual-list default window (rows 0-29). Marks separator cross-platform. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…n overrides Documents the Drawer builder (make/width/modal/reveal, default width), its built-in interaction model (auto hamburger, edge-swipe, scrim tap, auto-close on drawer-less screens), the FloatingOverlay builder (top/bottom/offset semantics), and the InteractsWithDrawer / InteractsWithFloatingOverlay per-screen override traits with their precedence. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ape, per-platform tab icons Adds a11y-hint to modal, bottom-sheet and tab-row; gives carousel its missing a11y props/methods and corrects the clip shape (16pt on iOS, Material extraLarge on Android); documents sync-mode on tab-row and the per-platform Tab::icon() signature. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@drag-end described unshipped phase-3b behavior: it isn't in the precompiler event whitelist, GestureArea never reads it, and no callback is registered, so the documented handler never fired. Both pages now center on what works — pan-y SharedValue binding, chainable interpolate/clamp/multiply/add formulas, the animatable props, and PHP-side ->value() reads. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… scroll-view props Divider::make()->borderColor() doesn't exist (fatals) — the real API is ->border(width, color). <native:rect> is self-closing, so the badge example that nested text inside it never rendered; it now layers with a stack. scroll-view gains the undocumented axis (vertical/horizontal/ both) and scroll-anchor=bottom props plus an Element section. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
native:make, native:rm, native:make-test, native:validate, native:debug, native:emulator and native:sim were absent from the 'complete reference'; native-ui:generate-icons joins the plugin section. native:font is intentionally left to the in-flight custom fonts work. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The App\Icons enums used in icon.md's examples don't exist until the generator runs; both pages now say so, and icons.md leads its platform-specific section with the first-class ios/android attributes instead of the System::isIos() ternary. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…+ press feedback routing.md now documents the @Navigate Blade directive where readers look: short and args forms, the eight transition modifiers, and the .back/.replace/.exitToWeb actions (combinable). Transition::ParallaxPush joins the enum list. pressable.md lists @Doubletap and @Navigate and gains a press-feedback section (press-scale/press-opacity/ press-translate-y) linking to the animation guide. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ss table text.md documents the shipped italic/underline/line-through/ text-transform/letter-spacing/font-family surface (classes, attributes, Element methods) and the 1-7 weight clamp. layout.md's class table adds the missing families (leading-*, tracking-*, font style/family, text decoration/transform, flex-wrap, aspect, object-fit) and @Doubletap joins the shared events. Button/text-input line-height props move to the kebab spellings now accepted by the elements. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Both elements ship with renderers on each platform but had zero docs. lazy-grid covers columns/gap/horizontal, cell sizing, and Android's bounded-height requirement for true lazy composition; refreshable covers @refresh, the it-is-the-scroll-container rule, the ~800ms spinner window, and when to prefer list's built-in on-refresh. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…s, side-nav browser opt bottom-nav.md gains the previously-undocumented per-screen surface: tabBarOptions() with hidden/highlight/activeColor/backgroundColor and the hidesTabBar shortcut. top-bar.md now lists every NavBarOptions field, side-nav.md documents open-in-browser, and layouts.md mentions the native-ui-layouts publish tag. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Second batch pushed — a full sweep of the remaining docs surface (core EDGE components, the-basics, testing, commands):
🤖 Generated with Claude Code |
Layouts gets a Chrome fonts section: the three override tiers (layout $font, bar ->font(), per-screen options), fallthrough to the theme default, and the iOS limits (system large titles keep the app default; Liquid Glass tab labels aren't fontable). Text's custom-fonts aside now warns that a single-file font has one weight — Android synthesizes a faux bold while iOS ignores the weight — so bundle and reference the real Bold file instead of font-bold until multi-weight families land. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Theming gets a "Color values" section — hex (incl. CSS #RRGGBBAA alpha), Tailwind palette names, white/black/transparent, and /N opacity modifiers, accepted for theme tokens, element color props, and arbitrary classes — plus notes that components render tokens solid (tonal fills are authored on the token) and disabled controls draw the surface-variant / on-surface-variant pair. Button documents the disabled/loading token styling and the tonal-via-token pattern; List's color-override props link to the grammar instead of claiming hex-only. Co-Authored-By: Claude Fable 5 <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
A full audit compared every native-ui component (Elements, Components, Builders, traits, and both platform renderers) against the v4 mobile docs. This PR closes the gaps it found, plus carries two small follow-ups from local work.
New documentation
<native:bare-text-input>— the chromeless third text-input variant was completely undocumented (class-based styling pass-through,colorattribute, chat-pill patterns)Drawer/FloatingOverlaybuilder APIs —make(),width()defaults,modal()/reveal(),top()/bottom(),offset()null semanticsInteractsWithDrawer/InteractsWithFloatingOverlayper-screen override traits and their precedence, plus the drawer's built-in interaction modelkeep-focus-on-submit, listplainprop + automatic inset-grouped style, per-platform icon signatures across components,dark-coloron icon,sync-mode/debounce-msas direct props with the 300ms defaultCorrections (docs described things that don't exist or don't work)
@leading-change/@trailing-change/@trailing-pressBlade events were never wired — re-documented as the Element callbacks they actually are, with platform notessizeprop/method removed — no renderer reads itbg-*/rounded-*apply); chiplabelis optional; listseparatoris cross-platform; carousel clip shape is platform-specific; text-input font contradiction resolvedCompanion fixes in other repos (documented spellings now work)
NativePHP/native-uifix/progress-bar-track-color-attr—track-colorkebab attrNativePHP/mobile-airelementbranch — kebab-case side-nav attributesAlso includes:
--core-v4uninstall flag in the upgrade guide, the new Floating overlay layouts section, and last night's custom-fonts docs commit.🤖 Generated with Claude Code