Skip to content

Commit 8bb5020

Browse files
authored
Make auto-links to GH issues less obnoxious (#2143)
1 parent 2fe4eaf commit 8bb5020

File tree

478 files changed

+5977
-1214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

478 files changed

+5977
-1214
lines changed

bikeshed/Spec.py

+11
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def initializeState(self):
108108
self.extraStyles["style-autolinks"] = styleAutolinks
109109
self.extraStyles["style-selflinks"] = styleSelflinks
110110
self.extraStyles["style-counters"] = styleCounters
111+
self.extraStyles["style-issues"] = styleIssues
111112
self.extraScripts = defaultdict(str)
112113

113114
try:
@@ -867,3 +868,13 @@ def findImplicitInputFile():
867868
figcaption:not(.no-marker)::before {
868869
content: "Figure " counter(figure) " ";
869870
}"""
871+
872+
styleIssues = """
873+
a[href].issue-return {
874+
float: right;
875+
float: inline-end;
876+
color: var(--issueheading-text);
877+
font-weight: bold;
878+
text-decoration: none;
879+
}
880+
"""

bikeshed/boilerplate.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,9 @@ def addIssuesSection(doc):
11931193
if el.tag not in ("pre", "xmp"):
11941194
el.tag = "div"
11951195
appendChild(container, el)
1196-
appendChild(el, E.a({"href": "#" + issue.get("id")}, " ↵ "))
1196+
appendChild(
1197+
el, " ", E.a({"href": "#" + issue.get("id"), "class": "issue-return", "title": "Jump to section"}, "↵")
1198+
)
11971199
for idel in findAll("[id]", container):
11981200
del idel.attrib["id"]
11991201
for dfnel in findAll(config.dfnElementsSelector, container):

bikeshed/unsortedJunk.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ def processIssuesAndExamples(doc):
11021102
elif doc.md.issueTrackerTemplate:
11031103
remoteIssueURL = doc.md.issueTrackerTemplate.format(remoteIssueID)
11041104
if remoteIssueURL:
1105-
appendChild(el, " ", E.a({"href": remoteIssueURL}, "<" + remoteIssueURL + ">"))
1105+
appendChild(el, " ", E.a({"href": remoteIssueURL}, "[Issue #" + remoteIssueID + "]"))
11061106
for el in findAll(".example:not([id])", doc):
11071107
el.set("id", safeID(doc, "example-" + hashContents(el)))
11081108
fixupIDs(doc, findAll(".issue, .example", doc))

tests/abstract001.html

+10
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec

tests/adjacent-boilerplate/adjacent-boilerplate.html

+10
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,16 @@
245245

246246
.dfn-paneled { cursor: pointer; }
247247
</style>
248+
<style>/* style-issues */
249+
250+
a.issue-return {
251+
float: right;
252+
float: end;
253+
color: var(--issueheading-text);
254+
font-weight: bold;
255+
text-decoration: none;
256+
}
257+
</style>
248258
<style>/* style-md-lists */
249259

250260
/* This is a weird hack for me not yet following the commonmark spec

tests/advisement001.html

+11-1
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec
@@ -428,5 +438,5 @@ <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
428438
</main>
429439
<h2 class="no-num no-ref heading settled" id="issues-index"><span class="content">Issues Index</span></h2>
430440
<div style="counter-reset:issue">
431-
<div class="issue"> This is an issue.<a href="#issue-05237a4c"></a></div>
441+
<div class="issue"> This is an issue. <a class="issue-return" href="#issue-05237a4c" title="Jump to section"></a></div>
432442
</div>

tests/algorithm001.html

+10
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec

tests/basic001.html

+10
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec

tests/biblio001.html

+10
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec

tests/biblio002.html

+10
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec

tests/biblio003.html

+10
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec

tests/biblio004.html

+10
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec

tests/biblio005.html

+10
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec

tests/biblio006.html

+10
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec

tests/boilerplate-substitution001.html

+10
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec

tests/caniuse001.html

+10
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,16 @@
250250
figcaption:not(.no-marker)::before {
251251
content: "Figure " counter(figure) " ";
252252
}</style>
253+
<style>/* style-issues */
254+
255+
a[href].issue-return {
256+
float: right;
257+
float: inline-end;
258+
color: var(--issueheading-text);
259+
font-weight: bold;
260+
text-decoration: none;
261+
}
262+
</style>
253263
<style>/* style-md-lists */
254264

255265
/* This is a weird hack for me not yet following the commonmark spec

tests/comments001.html

+10
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec

tests/conditional001.html

+10
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec

tests/conditional002.html

+10
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec

tests/conditional003.html

+10
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@
204204
figcaption:not(.no-marker)::before {
205205
content: "Figure " counter(figure) " ";
206206
}</style>
207+
<style>/* style-issues */
208+
209+
a[href].issue-return {
210+
float: right;
211+
float: inline-end;
212+
color: var(--issueheading-text);
213+
font-weight: bold;
214+
text-decoration: none;
215+
}
216+
</style>
207217
<style>/* style-md-lists */
208218

209219
/* This is a weird hack for me not yet following the commonmark spec

tests/css-production-range001.html

+10
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,16 @@
245245

246246
.dfn-paneled { cursor: pointer; }
247247
</style>
248+
<style>/* style-issues */
249+
250+
a[href].issue-return {
251+
float: right;
252+
float: inline-end;
253+
color: var(--issueheading-text);
254+
font-weight: bold;
255+
text-decoration: none;
256+
}
257+
</style>
248258
<style>/* style-md-lists */
249259

250260
/* This is a weird hack for me not yet following the commonmark spec

tests/dict-type.html

+10
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,16 @@
245245

246246
.dfn-paneled { cursor: pointer; }
247247
</style>
248+
<style>/* style-issues */
249+
250+
a[href].issue-return {
251+
float: right;
252+
float: inline-end;
253+
color: var(--issueheading-text);
254+
font-weight: bold;
255+
text-decoration: none;
256+
}
257+
</style>
248258
<style>/* style-md-lists */
249259

250260
/* This is a weird hack for me not yet following the commonmark spec

tests/elementdef001.html

+10
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,16 @@
245245

246246
.dfn-paneled { cursor: pointer; }
247247
</style>
248+
<style>/* style-issues */
249+
250+
a[href].issue-return {
251+
float: right;
252+
float: inline-end;
253+
color: var(--issueheading-text);
254+
font-weight: bold;
255+
text-decoration: none;
256+
}
257+
</style>
248258
<style>/* style-md-lists */
249259

250260
/* This is a weird hack for me not yet following the commonmark spec

0 commit comments

Comments
 (0)