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

Linkify all class definitions #913

Merged
merged 3 commits into from
Apr 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 46 additions & 45 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1240,13 +1240,13 @@ would look like

<pre><code class="lang-javascript">
class ReadableStreamDefaultReader {
constructor(stream)
<a href="#default-reader-constructor">constructor(stream)</a>
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 desirable for readability of the output, but it sure makes the source unreadable.

@tabatkins Can Bikeshed help our markup look nicer here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had a different markup in #872 but the consensus was that simple a tags were preferred. I think these links could be automatically generated, so I am in favor of somehow using bikeshed for this.

Copy link
Member

Choose a reason for hiding this comment

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

If we end up doing what @ricea suggested in #907 we'd align more with existing specs so I wouldn't suggest adding anything to Bikeshed for this definition.

That said, the domintro blocks (as proposed in #907) are also not very readable in the source either. See e.g. https://github.com/domenic/async-local-storage/blob/master/spec.bs#L239-L249 for my latest attempt. (Explicit <p>s needed because of speced/bikeshed#1203.)

Personally I'm not too worried about the source readability here.


get closed()
get <a href="#default-reader-closed">closed</a>()

cancel(reason)
read()
releaseLock()
<a href="#default-reader-cancel">cancel</a>(reason)
<a href="#default-reader-read">read</a>()
<a href="#default-reader-release-lock">releaseLock</a>()
}
</code></pre>

Expand Down Expand Up @@ -1381,13 +1381,13 @@ would look like

<pre><code class="lang-javascript">
class ReadableStreamBYOBReader {
constructor(stream)
<a href="#byob-reader-constructor">constructor</a>(stream)

get closed()
get <a href="#byob-reader-closed">closed</a>()

cancel(reason)
read(view)
releaseLock()
<a href="#byob-reader-cancel">cancel</a>(reason)
<a href="#byob-reader-read">read</a>(view)
<a href="#byob-reader-release-lock">releaseLock</a>()
}
</code></pre>

Expand Down Expand Up @@ -1615,13 +1615,13 @@ it would look like

<pre><code class="lang-javascript">
class ReadableStreamDefaultController {
constructor() // always throws
<a href="#rs-default-controller-constructor">constructor</a>() // always throws

get desiredSize()
get <a href="#rs-default-controller-desired-size">desiredSize</a>()

close()
enqueue(chunk)
error(e)
<a href="#rs-default-controller-close">close</a>()
<a href="#rs-default-controller-enqueue">enqueue</a>(chunk)
<a href="#rs-default-controller-error">error</a>(e)
}
</code></pre>

Expand Down Expand Up @@ -1986,14 +1986,14 @@ would look like

<pre><code class="lang-javascript">
class ReadableByteStreamController {
constructor() // always throws
<a href="#rbs-controller-constructor">constructor</a>() // always throws

get byobRequest()
get desiredSize()
get <a href="#rbs-controller-byob-request">byobRequest</a>()
get <a href="#rbs-controller-desired-size">desiredSize</a>()

close()
enqueue(chunk)
error(e)
<a href="#rbs-controller-close">close</a>()
<a href="#rbs-controller-enqueue">enqueue</a>(chunk)
<a href="#rbs-controller-error">error</a>(e)
}
</code></pre>

Expand Down Expand Up @@ -2228,12 +2228,12 @@ would look like

<pre><code class="lang-javascript">
class ReadableStreamBYOBRequest {
constructor(controller, view)
<a href="rs-byob-request-constructor">constructor</a>(controller, view)

get view()
get <a href="rs-byob-request-view">view</a>()

respond(bytesWritten)
respondWithNewView(view)
<a href="rs-byob-request-respond">respond</a>(bytesWritten)
<a href="rs-byob-request-respond-with-new-view">respondWithNewView</a>(view)
}
</code></pre>

Expand Down Expand Up @@ -3449,16 +3449,16 @@ would look like

<pre><code class="lang-javascript">
class WritableStreamDefaultWriter {
constructor(stream)
<a href="#default-writer-constructor">constructor</a>(stream)

get closed()
get desiredSize()
get ready()
get <a href="#default-writer-closed">closed</a>()
get <a href="#default-writer-desired-size">desiredSize</a>()
get <a href="#default-writer-ready">ready</a>()

abort(reason)
close()
releaseLock()
write(chunk)
<a href="#default-writer-abort">abort</a>(reason)
<a href="#default-writer-close">close</a>()
<a href="#default-writer-release-lock">releaseLock</a>()
<a href="#default-writer-write">write</a>(chunk)
}
</code></pre>

Expand Down Expand Up @@ -3539,7 +3539,7 @@ lt="WritableStreamDefaultWriter(stream)">new WritableStreamDefaultWriter(<var>st
1. Return *this*.[[closedPromise]].
</emu-alg>

<h5 id="default-writer-desiredSize" attribute for="WritableStreamDefaultWriter" lt="desiredSize">get desiredSize</h5>
<h5 id="default-writer-desired-size" attribute for="WritableStreamDefaultWriter" lt="desiredSize">get desiredSize</h5>
Copy link
Contributor Author

@surma surma Mar 28, 2018

Choose a reason for hiding this comment

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

I changed this to have consistent spelling with the other IDs and couldn’t find any other references to it. I am assuming I’m not breaking anything here?


<div class="note">
The <code>desiredSize</code> getter returns the <a lt="desired size to fill a stream's internal queue">desired size to
Expand Down Expand Up @@ -3788,9 +3788,9 @@ it would look like

<pre><code class="lang-javascript">
class WritableStreamDefaultController {
constructor() // always throws
<a href="#ws-default-controller-constructor">constructor</a>() // always throws

error(e)
<a href="#ws-default-controller-error">error</a>(e)
}
</code></pre>

Expand Down Expand Up @@ -4462,13 +4462,13 @@ it would look like

<pre><code class="lang-javascript">
class TransformStreamDefaultController {
constructor() // always throws
<a href="#ts-default-controller-constructor">constructor</a>() // always throws

get desiredSize()
get <a href="#ts-default-controller-desired-size">desiredSize</a>()

enqueue(chunk)
error(reason)
terminate()
<a href="#ts-default-controller-enqueue">enqueue</a>(chunk)
<a href="#ts-default-controller-error">error</a>(reason)
<a href="#ts-default-controller-terminate">terminate</a>()
}
</code></pre>

Expand Down Expand Up @@ -4815,8 +4815,8 @@ would look like

<pre><code class="lang-javascript">
class ByteLengthQueuingStrategy {
constructor({ highWaterMark })
size(chunk)
<a href="#blqs-constructor">constructor</a>({ highWaterMark })
<a href="#blqs-size">size</a>(chunk)
}
</code></pre>

Expand Down Expand Up @@ -4894,8 +4894,8 @@ look like

<pre><code class="lang-javascript">
class CountQueuingStrategy {
constructor({ highWaterMark })
size()
<a href="#cqs-constructor">constructor</a>({ highWaterMark })
<a href="#cqs-size">size</a>(chunk)
}
</code></pre>

Expand Down Expand Up @@ -5809,6 +5809,7 @@ Mihai Potra,
Romain Bellessort, <!-- rombel on GitHub -->
Simon Menke,
Stephen Sugden,
Surma,
Tab Atkins,
Tanguy Krotoff,
Thorsten Lorenz,
Expand Down