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

editorial: attr/method intros are notes (closes #379) #438

Merged
merged 7 commits into from Mar 8, 2017

Conversation

marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Feb 23, 2017

Copy link
Collaborator

@domenic domenic left a comment

Choose a reason for hiding this comment

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

No need to go for the whole domintro style, but there are a few minor things that should be fixed before merging.

index.html Outdated
<a>shippingAddress</a> is populated when the user provides a shipping
address. It is null by default. When a user provides a shipping
address, the <a>shipping address changed algorithm</a> runs.
<p class="note">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm. I am less sure about the attributes than about the methods. Since their behavior isn't defined in these sections at all, maybe it is OK to leave the text as non-note, as long as we don't use any normative keywords. The risk with methods is that people might think the notes are what specs their behavior.

Copy link
Collaborator

Choose a reason for hiding this comment

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

A totally different style you might consider:

  • Get rid of the separate sections for each attribute.
  • Add normative text to the overall PaymentRequest interface section, or maybe to an attributes subsection: "The shippingAddress and shippingOption attributes must return the values they are initialized to. The onshippingaddresschange and onshippingoptionchange attributes are event handle IDL attributes for the shippingaddresschange and shippingoptionchange events, respectively."
  • Introduce "domintro" style notes for web developers. Examples: https://html.spec.whatwg.org/#pixel-manipulation https://w3c.github.io/IndexedDB/#request-api. (You'd have separate domintro boxes for each method + the constructor, plus one for the attributes, I think.)

I think this would help especially with the attributes, to separate the normative parts from the web developer info (e.g. "default value is null" is for the web developer; the normative algorithm that sets it to null takes place in the constructor).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, also note that PaymentResponse currently uses a completely different style for its attributes, instead of having a heading per attribute :-/.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm. I am less sure about the attributes than about the methods.

Agree. Removed "note". Making statements of fact with non-RFC2119 words seems good (even if they mostly benefit developers).

Oh, also note that PaymentResponse currently uses a completely different style for its attributes, instead of having a heading per attribute :-/.

We should switch those to be headings (separate bug) - personally, I find it frustrating when attributes are not in the ToC - one should be able to see/access the API shape there too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We should switch those to be headings (separate bug) - personally, I find it frustrating when attributes are not in the ToC - one should be able to see/access the API shape there too.

+1

Copy link
Member Author

Choose a reason for hiding this comment

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

@adrianhopebailie I filed: #442

Kindly please also note you can "react" to a comment via github's interface:

screenshot 2017-02-27 18 54 16

It saves generating an email with only "+1" in it, while allowing you to throw support behind a proposal.

<section data-dfn-for="PaymentRequest" data-link-for="PaymentRequest">
<h2>
<dfn>onshippingaddresschange</dfn> attribute
</h2>
<p>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is inconsistent with the rest (missing class="note"). But as per above I'd be OK with omitting class="note" for all the attributes...

Copy link
Member Author

Choose a reason for hiding this comment

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

Leaving attributes without notes.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll convert the PaymentResponse attributes into sections/headings to match.

index.html Outdated
<p class="note">
The <a>total</a>.<a data-lt=
"PaymentItem.amount">amount</a>.<a data-lt=
"PaymentCurrencyAmount.value">value</a> can't be a negative number.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe "Algorithms in this specification that accept a PaymentDetails dictionary will throw if the total.amount.value is a negative number."

index.html Outdated
remaining user interface to be closed).
</p>
<div class="note">
<div class="note" title="Dealing with blocked browser UI">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Honestly this feels like a normative requirement, not a note.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree. I've changed the second "may" to an RFC2119 "MAY" and un-noted these two paragraphs.

Copy link
Collaborator

@domenic domenic left a comment

Choose a reason for hiding this comment

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

Some nits to fix, but this is quite a bit nicer, yay.

index.html Outdated
@@ -121,7 +121,7 @@
authorizing as necessary across the flow.
</p>
<p>
The details of how to fulfill a payment request for a given <a>payment
The details of how to fulfil a payment request for a given <a>payment
Copy link
Collaborator

Choose a reason for hiding this comment

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

The original word was correct here

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah right, my editor is misconfigured I think: https://en.wiktionary.org/wiki/fulfil

We should change those to en-us. Or is there a difference between "fulfill" and "fulfil" that I don't know about?

index.html Outdated
<h2>
<dfn>onshippingoptionchange</dfn> attribute
</h2>
<p class="note">
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should not be a note, to be consistent

index.html Outdated
<p class="note">
If the web page wishes to update the payment request then it can
call <a>updateWith()</a> and provide a promise that will resolve
with a <a>PaymentDetailsUpdate</a> dictionary containing changed
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe point out that you don't have to provide a promise. E.g. "provide a PaymentDetailsUpdate dictionary, or a promise for one, containing..."

@marcoscaceres marcoscaceres merged commit 95cd483 into gh-pages Mar 8, 2017
@marcoscaceres marcoscaceres deleted the intro-notes branch March 8, 2017 03:52
@marcoscaceres marcoscaceres restored the intro-notes branch May 4, 2017 06:36
@marcoscaceres marcoscaceres deleted the intro-notes branch May 4, 2017 06:38
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

Successfully merging this pull request may close these issues.

None yet

3 participants