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

Adapt PaymentRequest API to new events structure #13891

Merged
merged 6 commits into from
Mar 17, 2022
Merged

Adapt PaymentRequest API to new events structure #13891

merged 6 commits into from
Mar 17, 2022

Conversation

queengooborg
Copy link
Collaborator

This PR adapts the PaymentRequest API to conform to the new events structure.

BCD PR: mdn/browser-compat-data#15180

This PR adapts the PaymentRequest API to conform to the new events structure.
@queengooborg queengooborg requested review from a team as code owners March 15, 2022 10:14
@queengooborg queengooborg requested review from sideshowbarker and removed request for a team March 15, 2022 10:14
@github-actions github-actions bot added the Content:WebAPI Web API docs label Mar 15, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 15, 2022

Preview URLs

Flaws

Note! 6 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/PaymentResponse/shippingOption
Title: PaymentResponse.shippingOption
on GitHub
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/PaymentOptions does not exist

URL: /en-US/docs/Web/API/PaymentRequest
Title: PaymentRequest
on GitHub
Flaw count: 4

  • bad_bcd_links:
    • no explanation!
    • no explanation!
    • no explanation!
    • no explanation!

URL: /en-US/docs/Web/API/PaymentRequest/merchantvalidation_event
Title: PaymentRequest: merchantvalidation event
on GitHub
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/PaymentRequest/payerdetailchange_event does not exist

URL: /en-US/docs/Web/API/PaymentRequest/paymentmethodchange_event
Title: PaymentRequest: paymentmethodchange event
on GitHub
Flaw count: 3

  • macros:
    • /en-US/docs/Web/API/PaymentShippingOption does not exist
    • /en-US/docs/Web/API/PaymentMethodChangeEvent/updateWith does not exist
    • /en-US/docs/Web/API/PaymentRequest/payerdetailchange_event does not exist

External URLs

URL: /en-US/docs/Web/API/PaymentResponse/shippingOption
Title: PaymentResponse.shippingOption
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/PaymentResponse/shippingAddress
Title: PaymentResponse.shippingAddress
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/PaymentRequestUpdateEvent
Title: PaymentRequestUpdateEvent
on GitHub

No external URLs


URL: /en-US/docs/Web/API/PaymentRequest
Title: PaymentRequest
on GitHub

No external URLs


URL: /en-US/docs/Web/API/PaymentRequest/shippingoptionchange_event
Title: PaymentRequest: shippingoptionchange event
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/PaymentRequest/shippingaddresschange_event
Title: PaymentRequest: shippingaddresschange event
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/PaymentRequest/shippingOption
Title: PaymentRequest.shippingOption
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/PaymentRequest/shippingAddress
Title: PaymentRequest.shippingAddress
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/PaymentRequest/merchantvalidation_event
Title: PaymentRequest: merchantvalidation event
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/PaymentRequest/paymentmethodchange_event
Title: PaymentRequest: paymentmethodchange event
on GitHub

No new external URLs

(this comment was updated 2022-03-17 07:48:31.885284)

@sideshowbarker sideshowbarker removed their request for review March 15, 2022 10:45
@teoli2003
Copy link
Contributor

teoli2003 commented Mar 16, 2022

[REVIEW IN PROGRESS] Checklist I used for reviewing this event Content PR:

When onXYZ exists, for each onXYZ

  • Redirect from /Web/API/xxxx/onXYZ to /Web/API/xxxx/XYZ_event` set
  • /Web/API/xxxx/onXYZ deleted.
  • In /Web/API/xxxx/XYZ_event:
    • Front-runner YAML: Correct browser-compat front-runner key
    • Front-runner YAML: Correct title front-runner key to: Interface: XYZ event (with ticks!)
    • Front-runner YAML: No Property and Event Handler int the tag list but Event in it (more cleaning possible)
    • Check if the event bubbles. If not, no mention in article
    • Intro explain the event itself and no more just onXYZ.

      Example: "The levelchange event of the Battery Status API is fired when the battery {{domxref("BatteryManager.level","level")}} property is updated."

    • No HTML table with Bubbles, Cancelable, and Interface lines.
    • Syntax section with the structure of the template, and fix the names of event and of the onXYZ property
    • If inheritance is not only Event, there is an Event type section (two texts possible!, with
      • {{InheritanceDiagram}} with the right argument
      • There is an Event properties section and list the parameters, taken from the interface of the event type
    • Check that no mention of this onXYZ is a link.
    • Check that links to other onXYZ are links to the corresponding XYZ_event

On the API interface page:

  • There is no Event handlers section
  • There is an Events section (with the correct events)
  • Check that there are no links to onXYZ.

On each page of the interface and the API overview page:

  • Check that there are no links to onXYZ.
  • Check that examples uses the modern syntax for defining function in event handler (onXYZ = event => { …} )
  • Check that no {{event} macro is left.
  • Fix flaws (as much as possible); at least, make sure not to introduce new flaws.
  • Check that if an event is linked to a property value, that property documents when this event is fired.

    Example: "When its value changes, the chargingchange event is fired."

Optional:

  • Remove gremlins (non-breaking spaces, curly tick, curly double-ticks)
  • If the interface is no more experimental, remove the experimental tags/banners.

Administration:

  • Link to the BCD PR.

Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

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

I will need a second pass once this is fixed, I may have missed one nit or another.

Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

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

Two nits and we are good to go.

queengooborg and others added 2 commits March 17, 2022 00:45
…index.md

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>
…/index.md

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>
@teoli2003 teoli2003 merged commit 96836c9 into mdn:main Mar 17, 2022
@queengooborg queengooborg deleted the api/PaymentRequest/events branch March 17, 2022 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants