At the moment, many of us find the documentation very hard to navigate and find relevant information. We should refactor the documentation and the paths through it so that it is more beneficial for both new contributors and existing ones alike.
Ignoring the README and index pages, we currently have:
That's vaguely in the order I found the pages. I wouldn't be surprised if I missed some, too. I think it's clear that we have lots of related information scattered all over the place, and having clearer paths through the documentation would be beneficial.
I think we have three rough categories of people looking at documentation:
We should make sure at a high-level each of those people can find what they need quickly to get started.
That said, I think it is notable that we don't expect people to be looking at documentation on how to run tests often, though some are likely to need their hands held through git and GitHub.
What I want opinions on: any of the above, what you (or people you know) frequently look for in the docs, how to organise the docs for both those who are new and those frequently looking up stuff.
cc/ @jgraham @Ms2ger @sideshowbarker @fantasai @frivoal
cc/ @RByers
These are the things I find I most commonly need (and indeed require some searching and a bunch of clicks each time):
Another thing that does not help is that http://testthewebforward.org/ (not easy to remember since everyone always talks about WPT or web platform tests) is a marketing page but also hosts a bunch of project information. That should have links for writing tests (JavaScript, ref, manual, server-side) right on the front page as that's the main thing most visitors care about (I assume).
Another thing that does not help is that http://testthewebforward.org/ (not easy to remember since everyone always talks about WPT or web platform tests) is a marketing page but also hosts a bunch of project information.
Agreed. You'd want to keep the blog and events pages up for historical reasons, but there's absolutely no reason to keep them in the main navigation bar.
Most of the content of the home page needs to be replaced to be less markety and more wpt-specific.
Thanks for opening this issue @gsnedders. I think this is super critical. Commenting to follow and contribute when I have specifics.
Thanks @gsnedders, I'm glad you're doing this and thinking about it in terms of the difference audiences makes perfect sense to me!
From the perspective of the blink engineer the things I think they most need to know (separate from our own blink-specific engineering docs) are:
/cc @foolip who probably has other ideas.
I've generally ignored testthewebforwards docs (referring mainly just to the README) as I thought they were mostly web-developer focused and somewhat out of date. But looking over your list, there's probably some stuff I should have read ;-).
FWIW, I have been to http://testthewebforward.org/ once or twice in search for documentation, but gave up. I think it'd be preferable merge as much of its useful documentation as possible into web-platform-tests, so that people don't need to go elsewhere.
In terms of a style guideline, there's some documentation being written in https://codereview.chromium.org/2492733003/ where I commented, so it captures many things that I think are valuable:
<meta charset=utf-8>)t.step_funcfor (const x of [1]) doesn't work in Firefox 49.What @foolip mentioned is now here having landed in tree. There's also a Blink PSA on How to write reliable layout tests, which has some useful stuff in it.
Otherwise, there's a WebKit wiki page on Writing good test cases and a Mozilla wiki page on Avoiding intermittent test failures.
https://github.com/w3c/web-platform-tests/issues/3757 also contains some stuff about Edge testing policies which is likely relevant here.
So my basic suggestion is some rough hierarchal structure something along the lines of:
I don't envision all of these being separate pages; some of them will be sections, some will be pages. We should have pages for all the top-level things which are more than just a bunch of links, though.
I think someone earlier made a good point that all that information should either be put directly in or linked from the README. That way the repository becomes self-contained and addresses all questions.
Pretty much all the docs are already in the docs/ subdirectory of the repo; I think the plan is to move to publishing all the content using GitHub pages directly from the master docs/.
One thing I'm not 100% sure: should all the git/github info go into Appendices/Introduction to git, or should some of it be spread around. For sure, the very basics of git should get their own section, but I'm more thinking about stuff like:
This kind of question comes up relatively frequently, so we should answer them somewhere. I'm also OK with being tasked to write this up if this needs a volunteer. Just wondering where that goes, and thinking it should probably be spread throughout, possibly in <aside>s titled “git tips” or something like that.
@frivoal My basic thought was that actual introductory material for people who haven't used git goes into an appendix, information on how we want you to use git goes in the relevant places (most writing tests).
https://gsnedders.github.io/wpt-docs/ is around if anyone wants to have a look over it. I don't claim that it's done, but it is perhaps getting towards the point where we can consider replacing the live docs with it.
Looks great.
A couple suggestions if I may:
@gsnedders Nice job. I've been through it, and submitted a bunch of issues and Pull Requests, but I agree this is already in a better shape than the live docs.
@gsnedders I think it's still an awful lot of clicks to get to actual documentation. One thing that could help is to flatten testharness.js. Link directly to the library, idl, and wptserve documentation. However, even then it seems that writing tests should be expanded directly on the front page. The other topics require far less frequent consultation and can be addressed by a sidebar or some such.
@tobie That's incidental from how I'd refactored the docs a few days prior. But yeah, obviously silly.
@frivoal Right, the big goal here is to be strictly better and get the right high-level structure so we can then iterate on that.
@annevk There's the difficult balancing act between information overload for people new and writing their first test and ease-of-reference who know what they're looking for. testharness.js is hard at the moment because of https://github.com/jekyll/jekyll/issues/5728 and the fact that its documentation largely lives in another repo, and I think it's obviously bad as a result here. I'm also deeply unhappy with the wptserve documentation, because it's largely written as if you're going to start using wptserve for another project, which just isn't the case here.
(I also have a whole load of fixes to make having gone through the whole thing, on paper, with a red pen, on transatlantic flight.)
The things I most often need to look up but cannot find in the current documentation are server features, especially:
There's now a menu in the top right with links to every page. Perhaps this is a bit too many, but there's frequently people wanting one specific thing. Hopefully the titles are good enough!
FWIW, I'm going to move towards trying to get this all merged and live soon—should then probably move everything else into specific issues to fix later.
Can you add something like .wpt-site-nav { padding-right: 1rem; } to limit the interference between the top-right menu's content and overlay scrollbars?
That makes it look very asymmetrical. And making it sufficiently large on all sides makes it overflow the header. Can we have a media query for this already? :)
No, but we have this: https://drafts.csswg.org/css-overflow-4/#scollbar-gutter-property
It is not yet implemented though.
Yay! In https://codereview.chromium.org/2696323003/ I'm linking to some of these new docs.
Most helpful comment
The things I most often need to look up but cannot find in the current documentation are server features, especially: