Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename everything from rctmgl to rnmbx #3062

Conversation

WoLewicki
Copy link
Contributor

Description

PR changing all of the names of components from RCTMGL to RNMBX including all the generators, folders etc.

Checklist

  • I have tested this on a device/simulator for each compatible OS
  • I updated the documentation with running yarn generate in the root folder
  • I added/updated a sample - if a new feature was implemented (/example)

Screenshot OR Video

@mfazekas
Copy link
Contributor

@WoLewicki can you look into the tests? They are failing yarn jest

@MichaelDanielTom
Copy link
Contributor

Since we're on the cusp of new versions (MapboxMaps 10 -> 11) and are already doing some renaming, what is everyone's thoughts on keeping the latest versions' code not having prefixes/suffixes, and only after something is outdated does it include prefixes/suffixes if unavoidable? For example, I feel like it's already confusing that everything in RCTMGL-v10 is the actual new code being worked on as opposed to just RCTMGL, which will only get worse with mapbox v11, v12, etc.

@mfazekas
Copy link
Contributor

Since we're on the cusp of new versions (MapboxMaps 10 -> 11) and are already doing some renaming, what is everyone's thoughts on keeping the latest versions' code not having prefixes/suffixes, and only after something is outdated does it include prefixes/suffixes if unavoidable? For example, I feel like it's already confusing that everything in RCTMGL-v10 is the actual new code being worked on as opposed to just RCTMGL, which will only get worse with mapbox v11, v12, etc.

The reason for renaming is that "RCT" prefix is reserved for internal react-native components. MGL prefix is outdated as well as GL refers to OpenGL which is no longer used on iOS. We also could get away without any prefixes, as swift and java has namespaces, but ObjC doesn't, so I think the simplest one is using the RNMBX prefix for now.

I do agree that it sound like a good time to remove the -v10 from the folders.
Also using com.mapbox.rnmbx on android is a bit confusing as it's not a Mapbox project, but I'm not sure what's the best alternative, maybe just rnmapbox.rnmbx

But I personally don't feel very strongly about naming. This is a legacy codebase, and there are a lot of issues with the code, naming is the least important for me.

@WoLewicki
Copy link
Contributor Author

@mfazekas tests should be good now.

@mfazekas
Copy link
Contributor

@WoLewicki thanks I'll try to merge tonight. Do you mind the other renaming suggested here?

In directories:
java-v10 => java
RNMBX-v10 => `RNMBX'

And moving the java namespace from com.mapbox.rnbmx' to rnmabpox.rnmbx` ?

@WoLewicki
Copy link
Contributor Author

So should I remove com or did you mean com.rnmabpox.rnmbx? I pushed a change with the com.rnmabpox.rnmbx and the other requested changes.

@mfazekas
Copy link
Contributor

So should I remove com or did you mean com.rnmabpox.rnmbx? I pushed a change with the com.rnmabpox.rnmbx and the other requested changes.

I was thinking of the one without '.com' as we don't have the rnmabpox domain, but it should be good as is, the issue was that since it's not an official mapbox library we shouldn't be using the com.mapbox namespace.

@WoLewicki
Copy link
Contributor Author

Hey, I have a question. I can see you are merging my PRs through making another PR with all the commits from my PR and then merging them. This way I am not the author of the commit and not added as a contributor. Is it done on purpose @mfazekas ?

@mfazekas
Copy link
Contributor

mfazekas commented Sep 21, 2023

@WoLewicki So the issue is that because actions are using GitHub secrets it's not running for branches outside. Since Mapbox SDK needs access token, only basic test are running for PR-s from forks. (I think even if you define the secret needed - mapbox tokens in your source repo, it still won't work a no ci will run)

That's why I cloned/tested/CI your PR and mergedI . You should be marked as contributor, but GH adds my name as well.

Let me know if you have suggestions about that. I'll try to add you as a contributor to the repo, so you can push to a branch on this repo so full CI can run.

has_mapbox_token:
runs-on: ubuntu-latest
outputs:
has-mapbox-token: ${{ steps.has-mapbox-token.outputs.defined }}
steps:
- id: has-mapbox-token
env:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
if: "${{ env.MAPBOX_ACCESS_TOKEN != '' }}"
run: echo "::set-output name=defined::true"

@WoLewicki
Copy link
Contributor Author

Hmm I am not too familiar with CI setups, but is there no option to run the CI on the other branch with all the changes that is made by you and then eventually merge the original PR? Or is it dangerous in any sense? I cannot see myself in the contributors: https://github.com/rnmapbox/maps/graphs/contributors and looks like I am only a coauthor of the commit: c72d4da so it can be discouraging for new contributors to the library.

@WoLewicki
Copy link
Contributor Author

And thanks for adding me as a contributor 🚀

@mfazekas
Copy link
Contributor

@WoLewicki Sorry I don't know about details of GitHub contributors graph. I think you should show up. I did see a "Contributor" badge in GitHub comment, where I now see member.

image

And your name is on the commit.
image

So not sure why you're not on contributors graph.

Yep I could have pressed the merge on your pr in this case. In a lot of cases I also add smaller changes to the PR, so I usually merge mine and close the authors. I wasn't aware that it has effect on contributors graphs:
The process is described here:
https://web.archive.org/web/20160622033602/http://blog.spreedly.com/2014/06/24/merge-pull-request-considered-harmful/#.V2oHqC3P1qY

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.

3 participants