iTranslated by AI
My Attempt to Send a Pull Request to Prism
I'm sure you have all had the thought at least once or twice: "I want to have my name listed as a contributor to a project I admire!"
I certainly have.
And I actually had an idea that seemed worth adopting.
In this post, I'd like to talk about the actions I took with that goal in mind and the results I got.
For those of you who know me, you can probably guess which project I wanted to send a pull request to.
Yes, it’s Prism.
//hatenablog-parts.com/embed?url=https%3A%2F%2Fgithub.com%2FPrismLibrary%2FPrism
Prism provides a feature that allows you to inject the DependencyService itself by using an IDependencyService that wraps the DependencyService.
So, I thought:
"Wouldn't it be useful if we did the same thing with the Xamarin.Forms.Device class?"
Xamarin.Forms.Device depends on Xamarin.Forms.Init and specific device details, which makes it hard to test if you use it directly.
I thought that wrapping it in an interface and making it injectable would make things much more convenient.
Just as I was thinking about this, the creator, Brian Lagunas, happened to visit Japan, and luckily, I had the chance to speak with him directly.
So, I decided to do an impromptu interview (with the help of an external simultaneous interpreter).
Me: Hey, Brian! Why isn't there an IDevice for Device? Has there been any discussion about it in the past?
Brian: No, we haven't really discussed it. But I don't really see the necessity.
Me: Well, I'll open a proper issue for it, so if it looks good, would you mind if I sent a pull request?
Brian: OK! I'll be waiting!
That was the exchange.
Being the serious person I am, I went ahead and translated the entire Prism Contributing manual.
I even got help on Twitter when I couldn't grasp the nuances.
Thank you, @takuya_takeuchi and @espresso3389!
http://www.nuits.jp/embed/2016/10/16/183517
Hmm, I see.
"If you want to send a pull request, it's best to open an issue and discuss it first!"
OK! Open an issue. Easy peasy. Take it away, Google Translate sensei.
The issue I opened is linked below, but to summarize it:
Me: Hey, Brian! I want IDevice. Here is the design!
Brian: It's easy to build. But what is the scenario for using it?
Someone out there: I'd like to use it in these situations. <- Backup has arrived!
Me: Also, maybe in these situations as well.
Brian: I see, sounds good! It's simple!
Me: Oh! Can I send a PR then!?
Brian: Easy! I already made it! Could you review the PR?
Me: ( ゚д゚) ...Wait, what? I wanted to send the PR... Ah... Don't you need the generic methods?
Brian: Oh! I forgot! I added them, so please review!
Me: I-I think it's good! It's perfect!
Brian: OK! That's one done!
//hatenablog-parts.com/embed?url=https%3A%2F%2Fgithub.com%2FPrismLibrary%2FPrism%2Fissues%2F808
That was how it all ended up.
I mean, Brian is a great guy, but I really wanted to be the one to send the PR...
Anyway, IDeviceService is scheduled to be released in the next version of Prism, 6.3.
Prism/IDeviceService.cs at master · PrismLibrary/Prism · GitHub
Next time, I'm going to send an issue along with a "What do you think about this!?" PR! (#゚Д゚)!!
Oh, and just to repeat, Brian really is a great guy. Seriously.
Everyone, let's use Prism!
Discussion