docs: add the snack demo and document its upkeep - #14
Merged
Merged
Conversation
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.
Summary
Adds
snack/, the source of the publishedExpo Snack, and links
it from the README so the module can be tried from a browser or Expo Go with
nothing installed. The Snack exists because 1.1.0 made the native module
optional:
react-native-webviewalready ships inside Expo Go, so the view runsthere.
The demo is deliberately small next to
example/— one screen, one document,four highlighters — and it is what the README, the React Native Directory entry
and future answers point at.
Why the source lives in the repo: Snack has no git integration to rely on, so
the folder is the reviewed, formatted, versioned copy and the Snack is a mirror
of it.
snack/README.mdcarries the procedure, anddocs/VERSION-UPDATE.mdnow lists
snack/package.jsonamong the places a release has to touch —a stale pin there demos an older library than the one people install.
Also here:
react-native-libraries-entry.json, our React Native Directory entry, nowdocumented in
CONTRIBUTING.md(the live copy lives in that project's repo;this is the local original). It is already open as
react-native-community/directory#2828.
yarn lintnow coverssnack/too: the ESLint config always matched thosefiles, but
expo-module lintonly ever passedsrcto ESLint.docs/VERSION-UPDATE.mdgained the cosmetic references and the other versionstrings that drift the same way — the
react-native-webviewrange duplicatedin four places, and the vendored
rangy@1.3.2directory name that appears innine.
Type of change
fix— bug fix (no public API change)feat— new backward-compatible APIdocs/chore/ci/test— no runtime changeNothing under
src/,ios/orandroid/is touched, andsnack/stays out ofthe published package:
filesinpackage.jsonis a whitelist, sonpm pack --dry-runships zero files from it.How was this tested?
yarn lint(now including the five files insnack/),yarn typecheckandyarn test(151 tests) pass.The demo itself was run on Android through a prebuilt app that installs the
published 1.1.0 from npm: select a passage, apply a highlighter from the native
menu, clear everything, then undo — the highlights come back from the
serialized payload, and the undo button disables itself when the history runs
out.
without accessibility permission
Checklist
yarn lint,yarn typecheck, andyarn testall pass.CHANGELOG.mdupdated under## [Unreleased]— not applicable: noruntime change ships to consumers from this PR.