Homepage: Mobile/Desktop path chooser with SuperNative-first messaging#438
Draft
simonhamp wants to merge 2 commits into
Draft
Homepage: Mobile/Desktop path chooser with SuperNative-first messaging#438simonhamp wants to merge 2 commits into
simonhamp wants to merge 2 commits into
Conversation
…r v4 The hero CTAs become a platform toggle (persisted, Mobile by default) and the Under the hood, tools, Fast/Tiny apps and install-steps blocks adapt to the chosen track. Mobile leads with SuperNative: Blade rendering to real SwiftUI/Jetpack Compose views over shared memory, web view demoted to an optional component. Desktop keeps the accurate Electron story: static PHP binary, authenticated HTTP, Chromium window. Also: Bifrost diagram redrawn with a two-arm fan (Windows track removed) and a centred bubble, announcement cards scoped to the Mobile track, and the invalid flux-pro carousel stub class excluded from Tailwind's sources to silence a Lightning CSS warning on every build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The test renders a docs page with fenced code blocks; Torchlight throws outside production when no token is configured (as in CI). Worse, the thrown request skipped the middleware's clearBlocks(), so the static block registry leaked into every later HTML response in the process, 500ing 12 unrelated tests. Fake the token and API (the DocumentationRenderingTest pattern) and clear the registry in tearDown so a failure here can never cascade. 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
For the Mobile v4 release, the homepage needs to demonstrate that NativePHP for Mobile doesn't rely on web views — the old "Under the hood" copy and diagram said the opposite ("shows your app in a native web view"), and the tools section led with ten JS frameworks. Conflating mobile and desktop in one narrative also kept forcing hedged copy, so the page now splits into two tracks.
What
Path chooser — the hero CTAs are now a
role="tablist"toggle ("Mobile app" / "Desktop app"), backed by a persisted Alpine store ($store.platform, default mobile, registered onalpine:initbecause$persistonly exists once Livewire installs Alpine's plugins). A docs link follows the selection, with a static Mobile-docshrefas the no-JS fallback.Blocks that adapt per track:
/docs/mobile/4/…while v4 is prerelease)composer require nativephp/mobilecomposer require nativephp/desktopBifrost card — Windows track removed; connector redrawn as a single two-arm fan whose endpoints land exactly on the two platform tile centres; "Your NativePHP app" label removed and the bubble is now truly centred via
grid-cols-[1fr_auto_1fr].Hero cleanup — "Try our Mobile app" links (Play Store/TestFlight/Source) removed.
Fixes along the way
id="a", so duplicating the pill silently dropped its fill. One list now toggles only the web pills (skill-pillforwards attributes to allowx-show), and a DOMXPath test fails on any duplicated pill.xl:max-w-max(content-width, only filled the row by accident when there were 14 pills) withlg:grow xl:max-w-none.[snap="mandatory"_&]:snap-always, which Lightning CSS rejects on every build. Excluded just that stub dir via@source not— we don't use<flux:carousel>; verified only carousel selectors left the bundle. Drop when Flux fixes it upstream.Testing
tests/Feature/HomeExplainerNativeUiTest.php(new): both tracks' copy and diagrams, store bindings, pill scoping/uniqueness, SuperNative link target returns 200, Bifrost has no Windows track.HomeCourseCardTest: announcements-wrapper scoping asserted via DOMXPath (cards stay in the DOM; only visibility changes).php -d memory_limit=1G vendor/bin/phpunit— the default 128M limit fatals in an unrelated intervention/image test).Notes for review
docs/mobile/4/edge-components/introduction.md:32still says EDGE compiles to "a simple JSON configuration", which contradicts the new "No JSON bridge" homepage line (andrenderer.md) — worth fixing before release, separate PR.🤖 Generated with Claude Code