Open cayhorstmann opened 3 years ago
Definitely, it should be filtered out from the signature. I don't have an opinion if it should be mentioned in the full description or if it is just irrelevant detail that can be skipped entirely.
Another thing worth hiding is @SerialVersionUID, see e.g. http://dotty.epfl.ch/api/scala/util/matching/Regex.html
Possible duplicate of https://github.com/lampepfl/dotty/issues/11136 and https://github.com/lampepfl/dotty/issues/11120
I proposed to introduce meta-annotation @MustBeDocumented
as in Java and Kotlin so we would not have to decide on our own about which annotations are relevant to API docs and which are not, yet it didn't receive much support.
Nonetheless, in my opinion, expanding on hover can be unintuitive, and would be tremendous/impossible to look at the whole signature when there would be two or three annotations. How about expanding the whole signature when there is an expanded tab, and hiding annotations when the tab is collapsed, e. g.: (Actually we have such feature for class annotations when listed in tabs, so I think it's bug/misimplementation that infix annotations for method parameters don't hide)
For main pages of classes/objects/traits etc. I can make the signature frame collapsable too, so the annotations would be hidden until expanded. (e. g. SerialVersionUID
)
How do you find proposed changes?
dotc ignores deprecatedName
and it seems dottydoc
does too, or do I miss it?
A related issue is how to present when param names change in overrides. https://github.com/lampepfl/dotty/issues/18831 It would be amazing if doc were rendered "as viewed from" a particular signature, in a class or "at a previous (deprecated) version". A drop-down could offer "as seen from class C" or "as seen at version 2.13".
Consider
in http://dotty.epfl.ch/api/scala/collection/ArrayOps.html#exists-fffff66f. For 99.99% of the users, the fact that
p
used to bef
is irrelevant, yet it takes up almost 50% of the visible space. It could be completely suppressed, or represented as a ... that, when clicked reveals the full content, or revealed when one mouses over the suitably higlightedp
. See also https://github.com/lampepfl/dotty/issues/13116