Repository navigation
components 0.8.0: the web map wrapper loads the map on demand; MapPicker web twin; lint config - #213
Merged
Merged
Conversation
… (owner 2026-11-16) .eslintrc.js extended '@react-native-community', a config no longer in the dependencies: package.json declares @react-native/eslint-config 0.85.0, the package React Native publishes under that name now, so `npm run lint` stopped at "couldn't find the config". It now extends '@react-native'. Checked: after `npm ci`, eslint loads and lints src/MapboxGLWrapper/ with 0 errors and 10 warnings, all in files that predate this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…face and loads the map on demand (owner 2026-11-16) MapboxGLWrapper/index.web.js exported a monolithic GeoPositionTracker written against props nobody passes; CustomerApp replaced it with its own web-stubs/mapbox-gl-wrapper.js and a Metro rule. That implementation moves here, where PROJECT.md puts the web twins: - MapboxGLWrapperMap.web.js: the native surface on react-map-gl v8 (the map, Camera, BoundingBoxCamera, user location, markers, tooltip, route monitoring), comments in English, the token read from Config at render (the host configures it, as before through react-native-config's web stub). - index.web.js: the default export with the same statics as index.js. The map module is loaded with import(); each part is lazy() inside its own Suspense, the map's empty box (MapboxGLWrapperContainer.web.js) shown while the code arrives. The barrel exports this wrapper, so a static import put mapbox-gl (about 1.8 MB minified in daxir.com's bundle) and its stylesheet in every host page. Minor, not patch: the web default export changes shape (GeoPositionTracker -> the native surface). Its only consumer, CustomerApp, already renders this surface through its override. peerDependencies: mapbox-gl ^3.5.0, the app's. package-lock.json: only its two version lines (npm version), as in ce97553. PROJECT.md: the map wrapper is no longer a host web stub. Checked: the repo's own eslint, 0 problems in the three web files; `npm run build` copies them to lib/. Not yet bundled in a host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ap wrapper (owner 2026-11-16) Measured in CustomerApp's `expo export -p web` with the previous commit: the map wrapper was its own chunk, but mapbox-gl (1.85 MB minified) and its stylesheet stayed in the first load. The barrel exports Geoposition/MapPicker, which imports @rnmapbox/maps, and @rnmapbox's web build (lib/module/web/index.js) imports mapbox-gl and 'mapbox-gl/dist/mapbox-gl.css'. Geoposition/MapPicker/index.web.js is MapPicker's web twin, as PROJECT.md places web differences: the same props and layout on MapboxGLWrapper (Camera, FolowUserLocation) instead of @rnmapbox. The native picker, index.js, is unchanged; native Metro never resolves .web.js. The back button's fixed style is in the StyleSheet (only its top inset is computed), so the new file is lint-clean. Measured with 0.8.0 from `npm pack` in CustomerApp (--no-save), `expo export -p web`: AppEntry 8,573,966 -> 6,673,582 bytes (1,496,637 gzip -9), with no WebGL or @rnmapbox code in it; mapbox-gl is its own chunk (mapbox-gl-*.js, 1,892,315 bytes), requested only by MapboxGLWrapperMap-*.js. The stylesheet (48,902 bytes) is still linked from index.html: Expo hoists the CSS of async chunks into the page. Lint (the repo's own config): 0 problems in the new file. Co-Authored-By: Claude Opus 5.5 <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.
What
MapboxGLWrapper/index.web.jsis the native surface on react-map-gl v8 (moved from CustomerApp'sweb-stubs/mapbox-gl-wrapper.js). The map itself,MapboxGLWrapperMap.web.jswith mapbox-gl and its stylesheet, loads throughimport(). Each part islazy()in its ownSuspense, and the map's empty box (MapboxGLWrapperContainer.web.js) shows while the code arrives.Geoposition/MapPicker/index.web.js: MapPicker's web twin on that wrapper. @rnmapbox/maps' web build imports mapbox-gl and its CSS, and the barrel exports MapPicker, so the engine reached every web page..eslintrc.jsextends@react-native, the config the repo installs (@react-native/eslint-config0.85.0). It was extending@react-native-community.MapboxGLWrapperchanges shape, from GeoPositionTracker to the native surface. Its only consumer, CustomerApp, already renders that surface through its override. Peermapbox-gl ^3.5.0, the app's. PROJECT.md updated.Why
On daxir.com the first JS bundle carried mapbox-gl (1.85 MB minified) on every page (owner, 2026-11-16: web performance).
Native
No native file changes.
index.jsfiles are untouched, and native Metro never resolves.web.js.Checked
npm run build, thennpm packinstalled in CustomerApp (--no-save),expo export -p web: AppEntry went from 8,573,966 to 6,673,582 bytes (1,496,637 gzip). It holds no WebGL or @rnmapbox code. mapbox-gl is its own chunk (1,892,315 bytes), requested only by the map wrapper's chunk. The mapbox-gl CSS stays linked from index.html, because Expo hoists async CSS.statusChipTones, which loads the barrel): 2 passed.Order
Merge, then publish 0.8.0. CustomerApp then installs it with its override removal (CustomerApp branch
web/mapbox-fork-0.8.0). CI still fails at install: no dxr-artifacts access, as on #212.🤖 Generated with Claude Code