Skip to content

Redesign homepage with a click-to-run live map hero - #22

Merged
mfazekas merged 3 commits into
mainfrom
homepage-redesign
Oct 26, 2026
Merged

mfazekas merged 3 commits into
mainfrom
homepage-redesign

Conversation

@mfazekas

@mfazekas mfazekas commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Reworks the homepage so a first-time visitor sees what @rnmapbox/maps is, which platforms it supports, how to install it, and where to go next (install, examples, components, navigation, community).

The hero shows the example app's existing web build (/example-app/V10/GlobeProjection) inside a phone frame. It only loads on click: until then it is a 68 KB WebP poster, and the poster stays up until tiles actually load, so a missing or rejected token shows "Live map unavailable here" instead of a blank map. It reuses the example app's URL-restricted token, so the homepage needs no token of its own. Without JS, the button is a plain link to the example page.

Also swaps the 1.7 MB hero PNG for WebP, removes the unused template HomepageFeatures component, removes the obsolete Gitter footer link, fixes the mobile horizontal overflow, and adjusts one Prism token color and the homepage primary buttons to pass WCAG AA contrast.

Lighthouse on local builds (median of 3, before → after): mobile performance 72 → 76, simulated LCP 13.9s → 5.7s; desktop 87 → 97, LCP 2.4s → 1.2s; accessibility, best practices and SEO stay at 100. Page weight drops from 2.6 MB to 1.0 MB.

Adds a "Turn-by-turn navigation" section with a 13 s muted loop of <NavigationView> on a simulated route (Android emulator), in the same phone frame, and the same clip on the navigation overview page. The PhoneVideo component uses preload="none" and only plays while on screen, so page load fetches just the 25 KB poster (WebM 386 KB / MP4 395 KB load on scroll); reduced-motion and no-JS visitors get the poster. Lighthouse is unchanged with it (mobile 76, desktop 97, median of 5 and 3 runs, page weight +25 KB).

Hero now explains what the library is, lists platforms, links to install
and examples, and shows the web build of the example app inside a phone
frame. The live map only loads on click; a static WebP poster is shown
until tiles actually load, and stays if they fail (e.g. the URL-restricted
token rejecting a non-production origin).

Also replaces the 1.7 MB hero PNG with WebP assets, drops the unused
Docusaurus template feature component, fixes the mobile horizontal
overflow, and nudges one Prism token color and the homepage primary
buttons to pass WCAG AA contrast.
@mfazekas
mfazekas marked this pull request as ready for review October 26, 2026 09:41
@mfazekas
mfazekas merged commit c1bb29d into main Oct 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant