Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(41)

Issue 5303044: code review 5303044: godoc: generate package toc in template, not in JavaScript (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years ago by rsc
Modified:
15 years ago
Reviewers:
adg
CC:
gri, bradfitz, r, golang-dev
Visibility:
Public.

Description

godoc: generate package toc in template, not in JavaScript 1. Generate TOC for package pages using template, instead of using JavaScript magic. This makes the pages generated by godoc -html easier to export to other systems. 2. Make TOC one column. It's hard to do two columns portably without invoking JavaScript. 3. Since the TOC is only one column, show full type signatures for functions and methods. Many times that's all you need to see anyway. 4. Name the section after the TOC "Overview". Naming it something is important, to set it off from the TOC and so that there's a quick link to it in the TOC. For now, some illustrative examples: http://swtch.com:6060/pkg/io/ http://swtch.com:6060/pkg/strings/ http://swtch.com:6060/pkg/tabwriter/ http://swtch.com:6060/pkg/unicode/ Fixes issue 1982.

Patch Set 1 #

Patch Set 2 : diff -r 3198ce30ea39 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 3198ce30ea39 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 4 : diff -r 02e06db88f3a https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 5 : diff -r 02e06db88f3a https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 04345e5969cf https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -35 lines) Patch
M doc/godocs.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M lib/godoc/package.html View 1 2 3 4 2 chunks +68 lines, -35 lines 0 comments Download

Messages

Total messages: 15
rsc
Hello gri (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
15 years ago (2011-10-18 18:39:29 UTC) #1
bradfitz
I like generating it server-side and not jumping around, and I think I could like ...
15 years ago (2011-10-18 18:58:49 UTC) #2
rsc
I think package http is a bad example. Package http is way way way too ...
15 years ago (2011-10-18 19:07:18 UTC) #3
r
i think this is an improvement. http://codereview.appspot.com/5303044/diff/4001/lib/godoc/package.html File lib/godoc/package.html (right): http://codereview.appspot.com/5303044/diff/4001/lib/godoc/package.html#newcode23 lib/godoc/package.html:23: {{with .Types}} this ...
15 years ago (2011-10-18 19:32:09 UTC) #4
gri
I am fine with this change. Presumably you don't want to have the summary in ...
15 years ago (2011-10-18 19:56:20 UTC) #5
rsc
On Oct 18, 2011 at 15:56, gri@golang.org wrote: > I am fine with this change. ...
15 years ago (2011-10-18 20:05:06 UTC) #6
rsc
Hello gri@golang.org, bradfitz@golang.org, r@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
15 years ago (2011-10-18 20:08:36 UTC) #7
gri
LGTM http://codereview.appspot.com/5303044/diff/3/lib/godoc/package.html File lib/godoc/package.html (right): http://codereview.appspot.com/5303044/diff/3/lib/godoc/package.html#newcode11 lib/godoc/package.html:11: {{with .Consts}} this "with" is not needed http://codereview.appspot.com/5303044/diff/3/lib/godoc/package.html#newcode14 ...
15 years ago (2011-10-18 20:16:40 UTC) #8
rsc
> http://codereview.appspot.com/5303044/diff/3/lib/godoc/package.html#newcode11 > lib/godoc/package.html:11: {{with .Consts}} > this "with" is not needed > > http://codereview.appspot.com/5303044/diff/3/lib/godoc/package.html#newcode14 ...
15 years ago (2011-10-18 20:19:14 UTC) #9
rsc
Hello gri@golang.org, bradfitz@golang.org, r@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
15 years ago (2011-10-18 20:20:13 UTC) #10
gri
LGTM
15 years ago (2011-10-18 20:20:50 UTC) #11
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=eec8e79200f0 *** godoc: generate package toc in template, not in JavaScript 1. ...
15 years ago (2011-10-18 20:23:38 UTC) #12
adg
I like it. I think the identifier names in the list should be bold or ...
15 years ago (2011-10-18 21:12:50 UTC) #13
rsc
> I think the identifier names in the list should be bold or some other ...
15 years ago (2011-10-18 21:42:38 UTC) #14
adg
15 years ago (2011-10-18 22:02:26 UTC) #15
I'm working on a CL.

On 19 October 2011 08:42, Russ Cox <rsc@golang.org> wrote:
>> I think the identifier names in the list should be bold or some other
>> color, or the surrounding text should be de-emphasized somehow.
>> It's all useful information, but more often than not I'm just looking
>> for a name.
>
> I am skeptical.  They're all lined up, at least in chunks,
> so it's easy to scan.  Syntax highlighting and all that.
>
> Russ
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b