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

Move react-native-cookies to react-native-community #174

Closed
safaiyeh opened this issue Nov 26, 2019 · 19 comments
Closed

Move react-native-cookies to react-native-community #174

safaiyeh opened this issue Nov 26, 2019 · 19 comments
Labels
🗣 Discussion This label identifies an ongoing discussion on a subject

Comments

@safaiyeh
Copy link
Member

safaiyeh commented Nov 26, 2019

Introduction

react-native-cookies is a popular library amongst react-native developers. The repo has been unmaintained for about a year now. With many PRs to fix bugs and crashes, the repo is no longer improving and supporting the community.

Created a issue there at: joeferraro/react-native-cookies#163

Discussion points

react-native-webview has a bunch of issues concerning react-native-cookies because of the lack of support from the repo. reference: https://github.com/react-native-community/react-native-webview/issues?q=is%3Aissue+react-native-cookies
• Many developers use PRs of the repo to address bug fixes they need. This is not sustainable as more issues will show up, we cannot use more than one branch unless we maintain our own fork.
• In terms of maintenance, I would volunteer as a maintainer as I use the library in production at work and personal projects

@takameyer
Copy link

takameyer commented Nov 26, 2019

I would also like to amend that the features from react-native-cookie be included in a community library. This provides the ability to set the cookie storage in both Android and iOS (react-native-cookies only supports setting cookies in iOS).

@kelset kelset added the 🗣 Discussion This label identifies an ongoing discussion on a subject label Nov 26, 2019
@kelset
Copy link
Member

kelset commented Nov 26, 2019

👋
Perfect timing, I basically had to write the same reply to #173 :D

Basically, 3 things need to happen:

  1. open an issue in said repo and make sure that the maintainers are ok with this idea.
  2. The current owners of the repo need to move the repo to an owner of the RNCommunity org (like @cpojer or @grabbou, full list here, filter by owners) and then they have to move it into the org.
  3. new maintainers that will take care of the repo need to be found (and npm publishing permissions must be given to them too) (but overall I think you got that covered already)

In case the library is super dead and there is no way to reach out to the current owner, an option is to fork the repo and move that in the RNComm org. In that case, it could be published as a new npm package under the @react-native-community/ npm org (and I think that for this you need to speak with @Titozzz).

@safaiyeh
Copy link
Member Author

I would also like to amend that the features from react-native-cookie be included in a community library. This provides the ability to set the cookie storage in both Android and iOS (react-native-cookies only supports setting cookies in iOS).

Agreed! Once this repo becomes community managed, we can manage issues and plan for new features better.

@safaiyeh
Copy link
Member Author

👋
Perfect timing, I basically had to write the same reply to #173 :D

Basically, 3 things need to happen:

  1. open an issue in said repo and make sure that the maintainers are ok with this idea.
  2. The current owners of the repo need to move the repo to an owner of the RNCommunity org (like @cpojer or @grabbou, full list here, filter by owners) and then they have to move it into the org.
  3. new maintainers that will take care of the repo need to be found (and npm publishing permissions must be given to them too) (but overall I think you got that covered already)

In case the library is super dead and there is no way to reach out to the current owner, an option is to fork the repo and move that in the RNComm org. In that case, it could be published as a new npm package under the @react-native-community/ npm org (and I think that for this you need to speak with @Titozzz).

Awesome thank you for response! I have created an issue here: joeferraro/react-native-cookies#163.

The owner just reached out to me on Twitter, will sync back here about our conversation.

@elicwhite
Copy link

Can you help us understand what you are looking to achieve by having it be in react-native-community rather than a separate repo?

If the goal is just to have more maintainers, I don’t think that is a given by being part of the community org. We have a hard time as it is finding maintainers for the repos currently in the org.

I’m nervous about the community org ingesting a ton of the modules in the community, especially the ones that are coming unsupported. That is more likely to reduce the quality of the brand react-native-community as well.

It sounds like you reached out to the maintainer and are in conversations with them now. Maybe a reasonable approach is to try and get maintainers permission on that existing repo so that you can merge the PRs and release new versions. If you can’t get permissions then you could fork the repo and merge them under a new name as a now supported module.

What are your thoughts on these questions and other approaches?

@safaiyeh
Copy link
Member Author

safaiyeh commented Nov 26, 2019

Thanks for the question, @TheSavior! I'll provide more context on the issue.

Technical/Developer Challenge

iOS saves certain response cookies in the device storage and developers cannot access them from their response headers. The only way to access these cookies are through the native APIs, which is what this library provides.

I could argue that this library is a crucial piece to React Native development. Anything that affects our networking requests and managing tokens and cookies should be maintained with more care and urgency.

Bugs in this library and general cookie issues have been a blocker for a project I am working on at work and based on the issues have been a blocker for many other organizations.

Also, this library needs some parity with react-native-webview. There are issues and PRs needed to have better support for WebKit as UIWebView was removed for WKWebView, which has a different API for cookies.

History of the open source repos

Initially there was a package react-native-cookie that was also abandoned before this project. This project supported features that react-native-cookie did not support. Now this project has been unmaintained.

There is already a cycle of cookie libraries not being maintained in the open source community. Having it in react-native-community would solve the problem of chasing down the old contributors or starting a brand new fork/repo and moving everyone to it.

I have the bandwidth and intentions to maintain this library now; however, personal priorities will and can change, so I would want to have a smoother transition as we already have had an issue with transferring repos.

Current Experience

Individuals and organizations have been maintaining their own forks of this repo; however, only to solve their use case. I have not found a fork that actively maintains the community's needs.

Currently, I am using a fork that has a bug fix merged into. As soon as I have a need for another bug/issue, I would have to maintain my own fork with those changes.

Simply, there are too many forks with little community motivation.

Summary

• This is a crucial feature to react-native development
react-native-community provides a centralized place for a community driven repo
• Less friction to change maintainers
• I am willing to maintain the future of the library (ci/cd, react-native v0.61, merge in PRs, feature plans)

@elicwhite
Copy link

Thanks for writing that up. One of the strong arguments to me is that it is a big part of the community webview module. I’d like to get the thoughts of the current maintainers of WebView. Cc @jamonholmgren @Titozzz

@grabbou
Copy link
Member

grabbou commented Nov 28, 2019

Thanks for working on this @safaiyeh, I appreciate your effort here and I am happy that you volunteered to further maintain this library!

Given high WebView coupling here, I am wondering whether it makes sense to just fold react-native-cookie functionality into react-native-webview (can be a subset of features), to secure the ability to set/modify cookies without a need of an external library.

It could come as a static API available on the WebView, or via a ref. I am not sure how much of the maintenance overhead that is for existing WebView team, but I think this could be an interesting option to explore.

@Titozzz
Copy link

Titozzz commented Nov 28, 2019

@safaiyeh I've merged several PR to address cookies issues in the WebView, however if you feel like something is still not working properly, I'd love to get your help and fix it. 💪

@grabbou regarding merging react-native-cookies into webview, I wouldn't. I've been trying hard to reduce the number of dependencies of the webview (my personnal webview lean effort 😏). I'm all in to add the possibility for people to extend webview functionality, but I'd also like to keep it as simple as possible for most people. However, I don't have tons of time to dedicate to webview right now and if anyone wanted to help maintain it and wants to get that part in it, I really wouldn't mind having more contribs 😄 .

@kelset
Copy link
Member

kelset commented Nov 28, 2019

I agree with Tito, I wouldn't "merge" the two libraries. It seems that they are "near" in the feature (= around the web part) but still separated.

@safaiyeh
Copy link
Member Author

Yeah I mentioned WebView because there are a few issues open in react-native-cookies about supporting WebKit and such. Needs more parity if and when WebView does have changes.

Also, I wouldn’t want to merge the two repos. react-native-cookies affects any call that has cookies whether or not it is associated with a WebView.

@safaiyeh
Copy link
Member Author

safaiyeh commented Dec 5, 2019

It has been a week since the owner of the repo has responded back to me. Conversation ended on what are his next steps.

What is the timeline to move forward with forking the project rather than transferring over?

cc @kelset @Titozzz

@kelset
Copy link
Member

kelset commented Dec 5, 2019

Since @TheSavior was the one "pushing back" (even if it was in a really light way) I would prefer first to learn if he's onboard with having this library in. I don't have admin powers anymore over the RNComm so I can't act on this.

@elicwhite
Copy link

I created an issue to talk about the more general thoughts around bringing in new packages, separate from any specific package. #176

@safaiyeh
Copy link
Member Author

safaiyeh commented Dec 5, 2019

@TheSavior in terms of this proposal, what do you think about the validity of cookies being part of community based on what has been said here?

@elicwhite
Copy link

I'm not sure it makes sense, which is why I started that other issue to get more perspectives.

I think in the immediate term, regardless of a fork getting moved into the community, you should communicate with the maintainers of the other forks of this module that you mentioned, and see if you can get them to come together with you on a shared repo with all of the support you all need, with multiple maintainers.

@safaiyeh
Copy link
Member Author

safaiyeh commented Dec 6, 2019

I guess there needs to be more requirements and defining for react-native-community in general. I am okay with maintaining my own for of cookies for the time being and we can reevaluate after the conversation finalizes.

One note I saw from the other issue was #176 (comment)

Using this metric, it looks like react-native-cookies has a high usage in the community
Screen Shot 2019-12-06 at 3 07 10 PM

Using npm installs isn't a correct metric but it does show trends. This functionality is essential vs other react-native libraries that are very niche like Lottie.

@jamonholmgren
Copy link
Collaborator

I do think that react-native-cookies belongs in the community given how critical it is to the ecosystem and the fact that we already have a volunteer to maintain it. Even if we need to fork it and bring it in, I think that’s a viable solution. Finding maintainers is difficult and an ongoing problem for sure, but to me that doesn’t apply here as @safaiyeh has already volunteered. (Thank you by the way!)

@safaiyeh
Copy link
Member Author

safaiyeh commented Jan 9, 2020

Closing as this has been accepted and the repo has been created.
https://github.com/react-native-community/react-native-cookies

Thank you to everyone!

@safaiyeh safaiyeh closed this as completed Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗣 Discussion This label identifies an ongoing discussion on a subject
Projects
None yet
Development

No branches or pull requests

7 participants