All rules

Sheath rule

native-structure

NativePHP chrome items need compatible parents, and virtual lists need usable row inputs.
Package
NativePHP
Category
Native
Default severity
error by default
Auto-fix
Manual fix

#Why

Chrome item elements are consumed only by their expected direct container. Virtual lists render no rows without a usable item view and positive count.

#Examples

#Bad

{{-- bottom-nav-item is not a direct child of bottom-nav. --}}
<native:column>
<native:bottom-nav-item label="Home" url="/" />
</native:column>

#Good

{{-- bottom-nav receives the item directly. --}}
<native:bottom-nav>
<native:bottom-nav-item label="Home" url="/" />
</native:bottom-nav>
{{-- A virtual list supplies an item view and a positive count. --}}
<native:virtual-list item="native.article-row" :count="$articleCount" />

#Supported Relationships

Supported relationships include bottom navigation items, top bar actions and titles, and side navigation headers, groups, and items. A top bar action may contain another top bar action for nested action menus. A side navigation item may be a direct child of the side navigation or one of its groups.

Virtual-list item values cannot be empty or 0. Static counts must cast to a positive integer. Dynamic item and count values are allowed.

#Options

All NativePHP rules accept nativeViewPaths. The default is ['views/native/']. See Native View Detection for path configuration.

#See Also

Related rules check native identity and chrome insets: