Skip to content

docs(example): add snackSupported example metadata - #4416

Merged
mfazekas merged 1 commit into
mainfrom
docs/snack-supported
Oct 27, 2026
Merged

mfazekas merged 1 commit into
mainfrom
docs/snack-supported

Conversation

@mfazekas

Copy link
Copy Markdown
Contributor

Description

Adds an optional snackSupported example metadata flag for the "Edit in Snack" button proposed in rnmapbox/maps-docs#26, so maps-docs doesn't need its own allowlist. It defaults to webSupported and is written to the example page front matter as snack_supported.

Also sets webSupported: true on 9 examples that run in both the hosted web example app and Snack (MarkerView, MarkerViewPlacement, ViewportGestures, CameraGestureObserver, SetLanguage, ShowMapLocalStyle, StyleJson, ScalableImages, GlobeProjection). GeoJSONSource and ImageOverlay set snackSupported: false because Snack can't load their PNG assets by URL.

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder
  • I have tested the new feature on /example app.
    • In V11 mode/ios
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I added/updated a sample - if a new feature was implemented (/example)

The 9 newly flagged examples were checked in headless Chromium against https://rnmapbox.github.io/example-app/ (map renders, tiles load), and every example with snack_supported: true was opened in Snack from a local maps-docs build.

…les webSupported

snackSupported defaults to webSupported and is emitted to the example doc
front matter as snack_supported, so maps-docs can show an "Edit in Snack"
link without keeping its own allowlist. GeoJSONSource and ImageOverlay opt
out since Snack can't load their PNG assets.
@mfazekas
mfazekas merged commit 05a94b8 into main Oct 27, 2026
19 of 20 checks passed
@mfazekas
mfazekas deleted the docs/snack-supported branch October 27, 2026 13:07
@mfazekas mfazekas mentioned this pull request Oct 27, 2026
4 of 8 tasks

This branch was previously deployed

1 inactive deployment
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