scala / scala3

The Scala 3 compiler, also known as Dotty.
https://dotty.epfl.ch
Apache License 2.0
5.88k stars 1.06k forks source link

api docs: parent classes in signatures are distracting, can they only show when expanded? #16126

Open bishabosha opened 2 years ago

bishabosha commented 2 years ago

if you are just scanning this doc for names, the huge signatures are distracting, e.g. for ArraySeq

scala 2 doc scala 3 doc

Screenshot 2022-09-30 at 11 07 49

also I think the names should be aligned, with "modifiers" expanding to the left, like scala 2 docs, otherwise its harder to scan the page

odersky commented 2 years ago

I agree. Furthermore, they really should use , instead of with. , is idiomatic for Scala 3 and will help with layout.

Besides that, I find the Scala 2 docs hugely more readable than the Scala 3 docs. In particular if you need to find something which is the standard (maybe the only?) mode we interact with docs. I get drowned in a sea of whitespace and don't find anything. This might be fashionable for essays and such but if you need to look up anything it's a really bad UX.

Is there a way to go back to the Scala 2 layout rules? It's such an unnecessary distraction that the Scala 3 docs are so much worse.

szymon-rd commented 2 years ago

@odersky Right now we are doing a polish of the UI. The API members list is one of the things that we are changing. Here you can see the new design of members list:

image

(note that this is on a small resolution display) I think that way it's easier to work with when you want to look something up. Right now it is being implemented, along with a lot of changes including:

And concerning the issue: I think we can limit rendered superclasses to one line and show that there are more, but render them only when in the "expanded" view of member.

odersky commented 2 years ago

The new layout does look a lot better! I think that's actually quite promising.

Dedelweiss commented 1 year ago

Hello, can I help for this issue ? It seems to me that the main problem is solved but the Issue is not closed.

bishabosha commented 1 year ago

Hey @Dedelweiss the current situation indeed is vastly improved in my opinion!

I wonder iff we should also hide the bounds of type parameters unless expanded, however scala 2 docs do show the bounds.

But in my opinion for this list view I think the most important information is just the name and type parameter names

233012895-87d48961-3c61-4160-a99a-b0a9e9b7221c