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

feat: massive docs rewrite #473

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

feat: massive docs rewrite #473

wants to merge 25 commits into from

Conversation

huijing
Copy link
Collaborator

@huijing huijing commented Aug 20, 2024

This is the replacement PR for #463 after the main branch visual update

Copy link

netlify bot commented Aug 20, 2024

Deploy Preview for webmonetization-preview ready!

Name Link
🔨 Latest commit ae054d7
🔍 Latest deploy log https://app.netlify.com/sites/webmonetization-preview/deploys/67911faefb8cb2000776e266
😎 Deploy Preview https://deploy-preview-473--webmonetization-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@raducristianpopa raducristianpopa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i) Support content review:

src/content/docs/support/how-payments-work.mdx Outdated Show resolved Hide resolved
src/content/docs/support/how-payments-work.mdx Outdated Show resolved Hide resolved
src/content/docs/support/how-payments-work.mdx Outdated Show resolved Hide resolved
src/content/docs/support/how-payments-work.mdx Outdated Show resolved Hide resolved
Copy link
Collaborator

@raducristianpopa raducristianpopa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ii) Experiment w/ WM - How payments work content review:

src/content/docs/experiment/how-payments-work.mdx Outdated Show resolved Hide resolved
src/content/docs/experiment/how-payments-work.mdx Outdated Show resolved Hide resolved
src/content/docs/experiment/how-payments-work.mdx Outdated Show resolved Hide resolved
src/content/docs/experiment/how-payments-work.mdx Outdated Show resolved Hide resolved
src/content/docs/experiment/how-payments-work.mdx Outdated Show resolved Hide resolved
src/content/docs/experiment/how-payments-work.mdx Outdated Show resolved Hide resolved
src/content/docs/experiment/how-payments-work.mdx Outdated Show resolved Hide resolved
src/content/docs/experiment/how-payments-work.mdx Outdated Show resolved Hide resolved
src/content/docs/experiment/link-element.mdx Outdated Show resolved Hide resolved
src/content/docs/experiment/link-element.mdx Outdated Show resolved Hide resolved
src/content/docs/experiment/link-element.mdx Show resolved Hide resolved
src/content/docs/experiment/link-element.mdx Outdated Show resolved Hide resolved
src/content/docs/experiment/link-element.mdx Outdated Show resolved Hide resolved
src/content/docs/experiment/onmonetization.mdx Outdated Show resolved Hide resolved
Comment on lines 37 to 39
window.onmonetization = function () {
alert('This page supports Web Monetization.')
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this will get called on each monetization event, so we should not recommend this event as this use case.

Recommended way to detect WM support is following:

const supportsMonetization: boolean = document.createElement('link').relList.supports('monetization');

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...it's part of "DOM API"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm aligned with what Sid is mentioning. I think the example should state something around these lines:

Show a message to site visitors to thank them for their support.

src/content/docs/experiment/onmonetization.mdx Outdated Show resolved Hide resolved
src/content/docs/experiment/events.mdx Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given Firefox & Safari don't support Permissions-Policy, but they both support iframe allow attribute, maybe this file should add some more focus on that attribute.

Also, extension doesn't support the header as of now. But it has partial support for allow attribute (interledger/web-monetization-extension#575).

Copy link
Collaborator

@raducristianpopa raducristianpopa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iii) APIs & Headers review:

Comment on lines 37 to 39
window.onmonetization = function () {
alert('This page supports Web Monetization.')
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm aligned with what Sid is mentioning. I think the example should state something around these lines:

Show a message to site visitors to thank them for their support.

src/content/docs/experiment/onmonetization.mdx Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants