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

Work with MDN #4

Closed
marcoscaceres opened this issue Jan 24, 2018 · 30 comments
Closed

Work with MDN #4

marcoscaceres opened this issue Jan 24, 2018 · 30 comments

Comments

@marcoscaceres
Copy link
Member

I'm worried about us maintaining this repo - specially the developer examples. We should be working with the MDN folks instead, as it's duplicating their work. They are in a better position than us to communicate with developers, and to maintain documentation.

cc @torgo @dontcallmedom

@marcoscaceres
Copy link
Member Author

@dontcallmedom
Copy link
Member

paging @chrisdavidmills - how should we proceed with that proposal from an MDN perspective?

@marcoscaceres has this been discussed / approved by the task force?

@chrisdavidmills
Copy link

Sounds good to me. I would do these two things:

  1. Move the examples page to somewhere on MDN, probably as a child of https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API
  2. Turn each one of the snippets into a working example, and put them into the MDN code examples repo, underneath https://github.com/mdn/dom-examples/. So for example, mdn/dom-examples/payment-request/feature-detect, etc.

I would be happy to do the first one, and could do so really quickly. I'd probably like some help putting the code examples together, although I could push them to the repo if you lioke. I only ask this because I'm still not very familiar with the web payments stuff, and am snowed under atm.

@poshaughnessy
Copy link
Collaborator

(Hi, I've been involved with our Web Payment efforts and I'm hoping to get more involved with MDN too, so) I'd be happy to help with 2 if I can? It seems like it should just be a case of turning them into full HTML pages for each one and testing they work OK? How about I make an initial effort at it (just under some test repo) for review - and once they looked OK they could be added under mdn/dom-examples?

@dontcallmedom
Copy link
Member

my (absolutely uninformed) advice would be to start on a fork of https://github.com/mdn/dom-examples/ so that your work can easily be brought as a pull request down the line - and thanks for the offer, I think that's a great way to move this forward

@ianbjacobs
Copy link
Contributor

Hi all,
I had missed this thread completely; sorry about that. Now watching the repo.
I support moving the code examples to MDN. However, there are other resources that may not be as useful there, such as the FAQ. Is that your sense as well?

Ian

@chrisdavidmills
Copy link

Thanks @poshaughnessy / @dontcallmedom — sounds perfect.

So are we OK to move the examples page to MDN? I might even add some more explanation and turn it into a full Usage guide article.

@ianbjacobs we have a few FAQs on MDN, but don't commonly create them as a matter of course when documenting APIs. If it was thought useful, I wouldn't be against putting it on MDN.

@ianbjacobs
Copy link
Contributor

I have not worked with content on MDN previously. How is the content maintained? Who has write access?
Thanks!
Ian

@poshaughnessy
Copy link
Collaborator

Good idea @dontcallmedom, I can fork dom-examples and make a PR for review.

@chrisdavidmills
Copy link

@ianbjacobs we use GitHub accounts for login; anyone with an account can log in and edit pages. We have a system whereby we can subscribe and watch pages that we have responsibility over, and check all the edits made to the different sections of the site. But yeah, basically anyone can get involved.

@ianbjacobs
Copy link
Contributor

@chrisdavidmills, thanks for the explanation. Is there a specific person who has volunteered to take responsibility for the payment request content? (e.g., you or @poshaughnessy)?

Ian

@chrisdavidmills
Copy link

I am happy to watch the pages (I already watch quite a lot of API reference trees). I've just subscribed to:

@ianbjacobs
Copy link
Contributor

I've linked a new MDN account with my GitHub account and am watching the same resources.

When you and @poshaughnessy feel the time is right, let me know and I will redirect
https://github.com/w3c/payment-request-info/wiki/CodeExamples
to
https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API

Thanks!!
Ian

@poshaughnessy
Copy link
Collaborator

Hi. I've turned each code sample into a self-contained example page. Here's where I'm upto, in my fork:

https://github.com/poshaughnessy/dom-examples/tree/web-payments/payment-request

I'd like to do some more testing next. In particular, I should try to test the two which involve a specific Payment Handler ('Recommend Payment App' and 'Pre-Authorize Transaction')... I hope to do that and be able to submit a PR for review soon. I thought I'd share this in the meantime though to a) Let you all know I'm working on it! and b) Check if it looks like it's on the right track? Is this sort of what you imagined @chrisdavidmills? Any feedback appreciated :)

@ianbjacobs
Copy link
Contributor

@poshaughnessy, thank you! I will have a look (later) this week and send comments.

Ian

@chrisdavidmills
Copy link

@poshaughnessy these look great; cheers. The only thing I'd say is that we should add links to the live examples to the readme once the changes are merged.

Then I can start getting the page itself transferred over.

@ianbjacobs
Copy link
Contributor

[Adding @rsolomakhin for awareness and to see if he has any comments.]

@poshaughnessy, this looks great!

@rsolomakhin
Copy link

Moving to MDN is a-okay with me!

@poshaughnessy
Copy link
Collaborator

Sorry for the delay everyone - got sidetracked for a few days!

Just looking back at the examples that include a Payment Handler, particularly 'Recommend Payment App'...

Having had this conversation about the TommyPay Payment Handler not being maintained any more, it sounds best if we reference / include a different example instead?

How about your AlicePay or BobPay example, @rsolomakhin?

@rsolomakhin
Copy link

The most featureful example is bobpay.xyz. I have simpler examples as well, but none of them use the openWindow() call, which really makes Payment Handler shine.

@poshaughnessy
Copy link
Collaborator

Thanks for your patience everyone. I have switched the Recommend Payment App demo from TommyPay to BobPay now.

I have started the PR here: mdn/dom-examples#16

I have a few questions remaining that I have written up in the PR description there though. I wonder if @rsolomakhin or someone else familiar with Payment Handlers could please help to answer? :)

@rsolomakhin
Copy link

Answered inline. Thank you for updating the docs!

@chrisdavidmills
Copy link

This is wonderful, thanks @poshaughnessy @rsolomakhin ! I have merged the PR to add the demos and made a few changes to the readme files, and I've moved the codeexamples text over to MDN:

https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API/Using_the_Payment_Request_API

It is mostly the same, but I've added links to each of the demos in appropriate places, plus I've added a basic guide section:

https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API/Using_the_Payment_Request_API#The_basics_of_making_a_payment

So, @ianbjacobs can you handle the redirect? And @marcoscaceres can I get a tech review from you on the article?

Thanks again to everyone for helping to pull this together.

@ianbjacobs
Copy link
Contributor

Thank you all very much! I have removed the content from our wiki [1] and left a pointer to MDN.

We might move some of the remaining content from our wiki to other places, but for the time being, I'd like to propose to add a link from "See also" at the bottom of the MDN page to the Web Payments FAQ:
https://github.com/w3c/payment-request-info/wiki/FAQ

Thank you,

Ian

[1] https://github.com/w3c/payment-request-info/wiki/CodeExamples

@chrisdavidmills
Copy link

@ianbjacobs added:

https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API#See_also

@ianbjacobs
Copy link
Contributor

Thank you, @chrisdavidmills!

@marcoscaceres
Copy link
Member Author

@chrisdavidmills, could you help me with subscribing to changes to: https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API

I wasn't able to figure out how to do it :(

@marcoscaceres
Copy link
Member Author

Closing this, as changes were moved over 🎉

@chrisdavidmills
Copy link

@marcoscaceres on the top right of the UI, next to the gear icon button, you should see an eye icon button. The subscribe options are under the eye button. Can you see it?

@marcoscaceres
Copy link
Member Author

Ah, got it! thank you @chrisdavidmills!

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

No branches or pull requests

6 participants