Updating Example App to use React Native 0.81.1#3940
Updating Example App to use React Native 0.81.1#3940mfazekas merged 10 commits intornmapbox:mainfrom
Conversation
|
FYI in this PR I had to put the changes from PR #3937, because otherwise the example app for iOS wouldn't build. It would make sense to merge PR #3937 before this one and #3941. In addition, I also had to update |
b359528 to
9e8bd6e
Compare
61e2897 to
167ac64
Compare
|
@mfazekas When you have some time, will you please take a look into why the CI is still failing the pod installation step despite I updated the macOS image version to 15 and also specified explicitly the Xcode version to use? I can't really tell what's wrong: if it's in changes or if it's about something else. Thank you |
|
@whiteHatCip are you sure macOS image was updated?
|
@mfazekas No I am not sure of this. Actually I was sure that the image was not updated. But I don't understand: I changed the yml file in the PR have. Why doesn't it work? |
@whiteHatCip I have no idea. Yes it should have updated the image. Maybe it's something about .github/workflows/ci-for-forked-repos.yml but ??? On main I've updated the image, which now causes builds to fail - detox issue. I'm working on that. |
Thank you! Today I cannot work on this. Will need to get back at it later tonight or tomorrow. Hopefully tonight I will find your solution ready 😃 |
I'm wondering if the issue could be that the macOS image version should be specified in the |
|
So I've upgraded macOS image on main, but now I'm getting build failure with xcodebuild with module map not found See #3958 I've also invited you to the repo, so you can push your branch to repo, without me having to approve the CI. Please do not merge anything to the main, unless instructed so, for now. |
|
@whiteHatCip I think the issue is that GitHub actions for forks are not using the workflow files from the fork but from the repo. This is likely a security concern. |
Thank you for trusting me with this invitation. Won't merge anything on main, of course 😊 |
It would make sense, if this is the issue. Can we confirm that somehow? |
.github/workflows/ci-for-forked-repos.yml does starts with: I see. Since I am now part of the maintainers team, I don't know how to behave. I see you have a branch where you're working on this issue. should I branch out from that branch of yours, or can I push to that branch right away, if I have a potential fix ready to be tested? what's the process? |
mfazekas
left a comment
There was a problem hiding this comment.
Thanks much for working on it. Looks good to me 👍 apart from those minor concerns.
Updating expo optional dependency version Updating example app dependencies to latest versions Fixing yarn start command failing for example project Importing SafeAreaView from react-native-safe-area-context to get rid of deprecation warnings for importing it from 'react-native'
Fixing Earthquakes example, which was always crashing when tapping clusters. Improving modal presentations Fixing examples: MapAndRNNavigation, TakeSnapshot, Yoyo, RestrictMapBounds, Compass, GeoJSONSource, QueryAtPoint, QueryWithRect, AnimatedLine, DriveTheLine, TakeSnapshot and DrawPolyline Fixing AnimatedPoint page title Fixing error in ShapeSourceIcon Updating debounce dependency in the root package.json because otherwise debounce wouldn't work in the example app's MapView
Restoring Earthquakes in the examples docs Restoring earthquakes in the Symbol/Circle layer examples sublist
…eact-native Modal component
restoring prettier functionality and fixing a couple files
Making it a typescript-based component. Wrapping it into an example group and adding it to the examples in the docs
There was a problem hiding this comment.
Pull Request Overview
This PR updates the example app to use React Native 0.81.1 and makes several quality improvements. It includes upgrading dependencies, improving error handling, replacing deprecated imports, and enhancing the navigation structure for better user experience.
- Updates React Native from 0.80.2 to 0.81.1 and upgrades related dependencies
- Refactors debounce library usage and improves TypeScript configuration
- Enhances modal presentation with React Navigation modals and native modals
Reviewed Changes
Copilot reviewed 43 out of 46 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/MapView.tsx | Updates debounce library usage for API compatibility |
| package.json | Upgrades debounce to v2.2.0 and adds eslint-plugin-prettier |
| ios/RNMBX/ShapeAnimators/ | Renames method from create to generate for consistency |
| example/ files | Updates SafeAreaView imports to use react-native-safe-area-context |
| example/src/examples/CacheManagement/ | Converts from class to functional component and reorganizes structure |
| example/src/examples/SymbolCircleLayer/Earthquakes.tsx | Refactors modal presentation and improves component organization |
| example/src/examples/Map/MapAndRNNavigation.js | Enhances modal presentation with multiple navigation options |
| Various example files | Removes deprecated Page wrapper usage throughout examples |
Comments suppressed due to low confidence (1)
example/src/examples/SymbolCircleLayer/ShapeSourceIcon.js:1
- Text components cannot have border radius, shadow properties, or backgroundColor applied directly. These styling properties should be applied to a wrapping View component instead.
import React from 'react';
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| /** @type ExampleWithMetadata['metadata'] */ | ||
| const metadata = { | ||
| title: 'Animaated point', | ||
| title: 'Animated point', |
There was a problem hiding this comment.
The title was corrected from "Animaated point" to "Animated point" - this fixes the spelling error.
…rce Icons example
Running yarn generate to update docs
|
@whiteHatCip I'm concerned about this PR getting bigger and bigger. Also I'm not 100% sure about converting examples to typescript. Those are code examples serving as documentation/demonstrating the use of rnmapbox and typescript generally means a bit more noise. |
@mfazekas I see your point. The thing is that saw the notification from the Copilot review: Corrected one suggestion for a useless wrapper, and noticed a couple more things, like an error that would have caused a crash related to the ShapeSource example. Anyway, I won't add any more changes to the changes from this PR. You approved it, early this morning, Shall we merge it as is, or should I revert that last file I turned from JS to TS for this PR to be merged? What is exactly that you are concerned about? Is it just about that single js-to-tsx file? |


Description
Updating Example App to use React Native 0.81.0
Because of the high amount of files changed, I advise you to review this PR using Google Chrome, as it seems that from Safari the Github UI hangs when entering the Files Changed tab
Checklist
CONTRIBUTING.mdyarn generatein the root folder/exampleapp.Changes
SafeAreaViewfromreact-native-safe-area-contextto get rid of deprecation warnings for importing it fromreact-native