Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
91db92f
docs(mobile/4): custom fonts + leading-* line height
shanerbaner82 Jul 11, 2026
4b4554a
docs(mobile/v4): document --core-v4 plugin uninstall flag in the upgr…
shanerbaner82 Jul 11, 2026
8206c4c
docs(mobile/v4): Floating overlay section in SuperNative layouts
shanerbaner82 Jul 11, 2026
54868f9
docs(mobile/v4): text inputs — bare variant, keep-focus-on-submit, co…
shanerbaner82 Jul 11, 2026
de4f42f
docs(mobile/v4): selection controls — drop no-op slider size, sync pr…
shanerbaner82 Jul 11, 2026
7b1a01d
docs(mobile/v4): buttons & indicators — icon element API, per-platfor…
shanerbaner82 Jul 11, 2026
2368b0b
docs(mobile/v4): lists — plain prop, Element-only toggle callbacks, p…
shanerbaner82 Jul 11, 2026
5896e69
docs(mobile/v4): drawer & floating-overlay builder APIs and per-scree…
shanerbaner82 Jul 11, 2026
9c61acf
docs(mobile/v4): overlays & tabs — a11y-hint, carousel a11y + clip sh…
shanerbaner82 Jul 11, 2026
e2a5b56
docs(mobile/v4): gestures — document only the shipped animation surface
shanerbaner82 Jul 11, 2026
e6582b7
docs(mobile/v4): core element fixes — divider example, rect children,…
shanerbaner82 Jul 11, 2026
08a9d30
docs(mobile/v4): command reference — add the missing commands
shanerbaner82 Jul 11, 2026
ef70041
docs(mobile/v4): icons — point enum examples at native-ui:generate-icons
shanerbaner82 Jul 11, 2026
20b8d7f
docs(mobile/v4): routing — @navigate directive; pressable — @doubleTa…
shanerbaner82 Jul 11, 2026
7ae779a
docs(mobile/v4): typography — full text styling surface, complete cla…
shanerbaner82 Jul 11, 2026
74a7717
docs(mobile/v4): new pages for lazy-grid and refreshable
shanerbaner82 Jul 11, 2026
3cd0eef
docs(mobile/v4): per-screen chrome — TabBarOptions, full NavBarOption…
shanerbaner82 Jul 11, 2026
2796f5d
docs(mobile/v4): testing — assertDontSee, assertNotSet, assertTransition
shanerbaner82 Jul 11, 2026
06203da
docs(mobile/4): chrome fonts + single-file weight caveat
shanerbaner82 Jul 12, 2026
c187fd5
Mobile v4: document the color value grammar
shanerbaner82 Jul 12, 2026
b668ae3
docs(mobile/4): live-preview overhaul of every edge-component example
shanerbaner82 Jul 12, 2026
2a8f3d8
docs(mobile/4): fix badge anchor example — negative insets can't righ…
shanerbaner82 Jul 12, 2026
5fd6544
docs(mobile/4): list-item checkbox interactivity + honest pull-to-ref…
shanerbaner82 Jul 12, 2026
c73461e
docs(mobile/4): digging-deeper examples are all code-only (static)
shanerbaner82 Jul 12, 2026
8d12b76
Merge pull request #427 from NativePHP/docs/mobile-v4-live-examples
shanerbaner82 Jul 12, 2026
bf04524
docs(mobile/4): dark-mode legibility follow-ups — theme tokens on bar…
shanerbaner82 Jul 12, 2026
c08847f
docs(mobile/4): escape inline Blade mentions in prose — layouts page …
simonhamp Jul 16, 2026
dfe0dd4
docs(mobile/4): trim EDGE intro — drop image, component list, Inertia…
simonhamp Jul 16, 2026
2b2567b
docs(mobile/4): font aliases
shanerbaner82 Jul 14, 2026
fdbf217
docs(mobile/4): font tokens accept config aliases everywhere
shanerbaner82 Jul 14, 2026
8f376e0
docs(mobile/4): font alias keys are arbitrary; no chaining
shanerbaner82 Jul 14, 2026
8ba3a0c
docs(mobile/v4): document FakeBridge macros and harness bridge forwar…
shanerbaner82 Jul 17, 2026
5023d03
Updates
shanerbaner82 Jul 17, 2026
e3721e6
docs(mobile/4): document the <native:webview> embedded element
simonhamp Jul 18, 2026
4060b5f
docs(mobile/4): escape inline Blade echo in text-input prose
simonhamp Jul 18, 2026
edfa5ae
chore(deps): update lockfiles and republish Filament assets
simonhamp Jul 18, 2026
7f20c58
Fix sentence
simonhamp Jul 18, 2026
cc4c6f3
Merge branch 'main' into docs/mobile-v4-native-ui-audit
simonhamp Jul 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 45 additions & 1 deletion app/Services/DocsSearchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,51 @@ public function getNavigation(string $platform, string $version): array
usort($sections[$section], fn ($a, $b) => $a['order'] <=> $b['order']);
}

return $sections;
// Order the sections themselves to match the sidebar (each section
// directory's `_index.md` front-matter `order` — the same source
// ShowDocumentationController sorts by). Nested subsections (e.g.
// plugins/core) rank right after their parent. JSON objects keep key
// order, so API consumers get the sidebar order for free. Unknown
// sections trail in their original grouping order (stable sort).
$rank = $this->sectionRanks($platform, $version);
$slugs = array_keys($sections);
usort($slugs, fn ($a, $b) => ($rank[$a] ?? PHP_INT_MAX) <=> ($rank[$b] ?? PHP_INT_MAX));

$ordered = [];
foreach ($slugs as $slug) {
$ordered[$slug] = $sections[$slug];
}

return $ordered;
}

/**
* Sidebar rank per section slug for one platform/version: top-level
* sections rank by their `_index.md` front-matter `order` (scaled so
* children can interleave); a nested subsection ranks just after its
* parent, offset by its own `order`. Sections without an `_index.md`
* get no rank (callers push them to the end).
*
* @return array<string, int>
*/
protected function sectionRanks(string $platform, string $version): array
{
$base = "{$this->docsPath}/{$platform}/{$version}";
$rank = [];

foreach (glob("{$base}/*/_index.md") ?: [] as $index) {
$slug = basename(dirname($index));
$order = YamlFrontMatter::parse(file_get_contents($index))->matter('order') ?? 9999;
$rank[$slug] = $order * 10000;

foreach (glob("{$base}/{$slug}/*/_index.md") ?: [] as $nested) {
$nestedSlug = basename(dirname($nested));
$nestedOrder = YamlFrontMatter::parse(file_get_contents($nested))->matter('order') ?? 9999;
$rank[$nestedSlug] = $rank[$slug] + 1 + min($nestedOrder, 9998);
}
}

return $rank;
}

public function getPlatforms(): array
Expand Down
Loading
Loading