Skip to content

Use Web IDL's new record type #412

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

Merged
merged 5 commits into from
Nov 23, 2016
Merged

Use Web IDL's new record type #412

merged 5 commits into from
Nov 23, 2016

Conversation

TimothyGu
Copy link
Member

This is my first PR here, so please point out if I'm doing anything wrong.

Closes #164.

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

Overall this looks great. Thank you for working on this. I have a couple nits and we need some tooling changes that I requested here: plinss/widlparser#18.

I'd also appreciate it if you could add your name to the Acknowledgments section, but no worries if you don't want to.


<p>See <a href=https://github.com/whatwg/fetch/issues/164>issue #164</a> for discussion.
</div>
<pre data-no-idl class=idl>typedef (Headers or sequence&lt;sequence&lt;ByteString>> or record&lt;ByteString, ByteString>) <dfn id=headersinit typedef export>HeadersInit</dfn>;</pre>
Copy link
Member

Choose a reason for hiding this comment

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

The "data-no-idl" can be removed now this is all part of IDL.

Copy link
Member Author

Choose a reason for hiding this comment

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

That and the manual <dfn> removed.


<pre>
var meta = { "Content-Type": "text/xml", "Breaking-Bad": "&lt;3" }
new Headers(meta)</pre>
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer to keep this example. Change the class on the <div> to example and change the opening paragraph to something like: Constructing a {{Headers}} object is fairly straightforward:

Copy link
Member Author

Choose a reason for hiding this comment

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

Kept and added to it example of creating an object with the sequence syntax.

<li><p><a lt=append for=Headers>Append</a>
<var>header</var>'s key/<var>header</var>'s value to
<var>key</var>/<var>value</var> to
<var>headers</var>. Rethrow any exception.
Copy link
Member

Choose a reason for hiding this comment

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

Since this is now the only substep you should just inline it in the paragraph that introduces it. "then for each mapping ... in object, append ..."

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.


<ol>
<li><p>Set <var>header</var>'s key to <var>header</var>'s key,
<a spec=webidl>converted to ByteString</a>.
Copy link
Member

Choose a reason for hiding this comment

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

Since this is removed we can remove the corresponding line in class=anchors.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed, but I added a reference to the definition of a record mapping.

@annevk
Copy link
Member

annevk commented Nov 8, 2016

Thanks for fixing the IDL parser issue. Next up is speced/bikeshed#864 and then we can move on here. 😊

@annevk
Copy link
Member

annevk commented Nov 10, 2016

Found one more issue that needs figuring out: whatwg/webidl#233. Sorry about that. This one has quite a few dependencies. 😊

@@ -24,7 +24,7 @@ Translate IDs: typedefdef-bodyinit bodyinit,typedefdef-responsebodyinit response

<pre class=anchors>
url:https://xhr.spec.whatwg.org/#concept-formdata-entry;spec:XHR;type:dfn;text:entries
url:https://heycam.github.io/webidl/#es-ByteString;type:dfn;text:converted to ByteString;spec:WEBIDL
url:https://heycam.github.io/webidl/#record-mappings;type:dfn;text:mapping;spec:WEBIDL
Copy link

Choose a reason for hiding this comment

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

These are not picked-up by Shepherd yet?

Copy link
Member

Choose a reason for hiding this comment

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

"mappings" should soon be picked up per the change to IDL today. My plan was on updating this PR after that.

Copy link

Choose a reason for hiding this comment

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

Got it.

@annevk
Copy link
Member

annevk commented Nov 15, 2016

I forgot that I wanted to link record too and that IDL does not export that yet. So I guess this needs to wait yet another day.

@annevk
Copy link
Member

annevk commented Nov 15, 2016

Sorry about that. I did push my final nits. Would appreciate if you could look those over.

@annevk annevk merged commit 579e363 into whatwg:master Nov 23, 2016
@annevk
Copy link
Member

annevk commented Nov 23, 2016

Thanks @TimothyGu, finally all the dependencies are resolved and this could land.

@TimothyGu TimothyGu deleted the record-type branch November 23, 2016 16:01
@TimothyGu
Copy link
Member Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants