Skip to content

Add expand/collapse all to sections of dottydoc #2211

Closed
@felixmulder

Description

@felixmulder

We currently have [+] to expand items with longer comments. I want to have an “expand/collapse all” button at the top left of each category where this is relevant.
So for example if you look here: http://dotty.epfl.ch/api/dotty/tools/dotc/transform/IsInstanceOfEvaluator.html
You can see that the member phaseName has an expand button. I would like its category (i.e. “Members”) to have a collapse all button.

So before this change you would have:
screen shot 2017-04-10 at 10 45 53

And after you’d have:
screen shot 2017-04-10 at 10 47 15

But with the [+] on “Members” having the same style as the one inside the categories
This would be the first superficial change - which means just changing the HTML

After this, I want one more change: collapsed comments should contain nothing. Currently they contain an abbreviated version of the docstring, I don’t think it is beneficial. It clutters a lot and in the end you know roughly what you’re looking for if you’re browsing the API.

In summary:

  • Give each relevant category (e.g. “Members”, “Constructors”) a “expand/collapse all” [+]-button
  • Remove the summary on collapsed
  • Remove summary-related code in the dottydoc scala codebase

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions