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
x/tools/cmd/godoc: add 'expand all' link to expand all examples #3081
Comments
Printing such pages is not common, but this could be addressed by adding a little JS toggle at the top to expand/collapse all the examples. I'd imagine some people printing out reference material would *not* want the examples, so we should make sure that's easy too. It doesn't seem high priority, though. Labels changed: added priority-later, removed priority-triage. Status changed to Accepted. |
Perfect, thanks ! |
@bradfitz / @andybons - I have been thinking about where to put this button on the page. I have decided to place it beside the "Example" header under which all examples are listed. It has one click access from the top level ToC and is in a position from where all examples are accessible. It looks a bit clumsy to me. But I am not able to find a better place. Let me know if you think of a more suitable place. /cc @ysmolsky , @jimmyfrasche for more inputs. |
If this is for printing, and I'm not sure where else it would be
useful, I'd go with
#3081 (comment)
Just works is a better UI than more UI
|
True. Maybe I misunderstood; the title does say to add an 'expand all' link. But I don't think we should expand all examples by default during printing, which the comment is doing. The user should be able to control this with a toggle. |
The initial request does state that this is specifically for printing.
When would this be useful, other than printing?
When would you want to exclude some examples when printing?
|
Yea, the title and the description are not in sync. ping @vdobler for clarification.
I might not want to print all examples always. For eg- I might want only 1 or 2 examples. So I can expand them specifically and then print the document. I think that's a fair thing to ask. |
@agnivade I think your position in #3081 (comment) is fine. Let's move forward with that. |
Change https://golang.org/cl/118935 mentions this issue: |
@agnivade |
Thanks for clarifying.
Cool, we are going with that. |
The text was updated successfully, but these errors were encountered: