-
Notifications
You must be signed in to change notification settings - Fork 6
Features and UX discussion #149
Comments
My take on doctools: there are two kinds of documentation that I don't think should be mixed:
Typically, for the first kind there's the library's webapge, which provides this introduction as well as link to the actual apidocs, while the apidocs are a published to maven and retrieved by IDEs, can be opened locally as well. Both dottydoc and this tool focus too much on the first, which again, is only read at the beginning when you start using the library, but as you code you don't want this, and the fact that it's taking the center of attention of the apidocs is a waste of space and time since you have to dodge it everytime (as well as download it from maven). I feel that this doctool is trying to provide a website template engine, and I don't want that in my docs (note that this is different to a class or package documentation. I find it perfectly fine to find all relevant information on this, like java does, or scala-test). Focusing on the apidocs part, I use this in two modes: question-answer, and exploring. For exploring, the traditional tree of package classes does a fairly okay job, but could be improved by adding implementations of a type, as descendants of that type's node In general, I'd say scaladoc current UX reflects pretty much the right focus of attention Some notes on the UX of current implementation of dottydoc and this tool: do not reload the page when clicking a link. I live in the southern hemisphere, far away from all your servers in north america and europe. Each time I click a link, the page goes blank because the browser is loading something new, and I have to wait 2-3 seconds as it loads, making me totally lose context and focus. The javadoc and scaladoc design using iframe works perfectly, I can keep browsing or reading what I currently have present, while I wait for the link I clicked to show up. This reloading ailment is exacerbated by the fact that even clicking a node on the tree (like a package) causes the entire page to be reloaded just for expanding that node. Spacing is totally wrong, 90% of the page is just empty space, and the scrollbar becomes huge simply because there's endless whitespace in between lines. |
If it isn't available already ... it would be nice to reference a function parameter in the documentation text (such that it is seen as a function parameter and picked up during refactoring and such) /**
* Adds one to the specified ???
*
* @param number given number to add 1 to
* @return ??? incremented by 1
**/
def addOne(number: Int): Int = ... A way to specify |
Thanks for your feedback!
I think there are several issues here:
Javadoc and Scaladoc don't seem to do anything special here: no ajax, no iframes, just normal links. But those links often point to the same page. And the generated pages are smaller (in terms of bytes). |
I know javadoc, when using the left frame, uses an iframe for the "center" where the page is actually rendered, this allows the tree to not be reloaded. For scaladoc I think you're right, I wonder what gave me that impression. |
You're right. I didn't know about that feature! They are no longer generated by default on recent javadoc versions, that's a shame. |
I agree @vivekragunathan, I tried to do that a bunch of times when writing Scaladoc. If I remember correctly, IntelliJ understands such links and takes them into account when refactoring. I'll see about actually supporting them in the doctool. |
@rcano For the most part, I agree with how you think. I personally would say that there are three types of documentation - one is tutorials, second is concept documentation (or high-level documentation), third is API documentation. Those are different in their aims, but they all want similar features. What we're focusing on (what I'd like us to focus on) is adding support for concept documentation. Cats page is a good example of concept documentation. Note that it's not structured like a tutorial - it doesn't try to show you how to use functors, it only describes what they are. I don't think this kind of documentation is useful to beginners only - I'd also say this is the correct place to document relationships between high-level concepts in a codebase, and that is the sort of information one would like to have available together with the API docs. Also note that this doc really, really needs practically zero templating - you can see that this is basically a Markdown file + tree navigation. And if we already support writing doc comments in Markdown - how come we cannot also display a standalone Markdown file? I've written similar project documentation in the past and I've seen it happen time and time again in open source as well - there's a real need here, and the effort on our part to support such documentation is really minimal compared to the gains. |
I think the concept documentation is still just the first kind of documentation I described, for some libraries it may be just a tutorial, for a library like cats you are documenting applied category theory, for Play you want a comprehensive explanation of the different parts from html to json handling. How involved or structured this documentations are depends on each library but they are still just webpages that you consult at the beginning and then as you've grasped the concepts you don't check again (this is true for that cats documentation as well, since the concepts explained in that link are not cats specific even), the fact that cats could make do with just some MD files is anecdotal. I still think this is best served by webpages no matter how simple it is to add to the tool that specific markdown case for cats. The way I see it it's a matter of design/concerns, not implementation difficulty; having this information displayed every time you consult the apidocs is the problem for me. I believe we both have articulated our perspectives well enough (and thanks for that). I'd like to hear other people points of view on the subject. |
Following @abgruszecki suggestion, I'm opening thread for discussion on the features and UX the scala 3 doctool should have.
The documentation tool is as important to a language as its collection api, and this will be reflected on all online documentation for scala 3 for years to come, so a process similar in importance to that of the collections strawman should take place.
The text was updated successfully, but these errors were encountered: