-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Build docs using 'fsdocs' tooling #27
Conversation
@baronfel Is CI set up for this repo at the moment? Or do we need to set it up again? |
CI is set up to do pushes from master only right now, if we wanted previews of branches we'd need to set that up. Regarding fixes that happened recently, the only one that's relevant I think is the fix to the search URL path prefixes. Since the generated site is hosted at a subpath of fsharp.github.io, the path prefix of the site needs to be incorporated into any urls generated by F#F. |
@baronfel @cartermp I have pushed the newly generated docs for FSHarp.Core to https://fsharp.github.io/fsharp-core-api-docs Could you walk through them and note down everything you see that's wrong with them? |
@Krzysztof-Cieslak would like your opinion too.
|
@baronfel I think I'd like to merge this if that's ok. I do think it's the way we need to go.
|
@baronfel The URLs being produced no longer add e.g. https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-collections-arraymodule.html I wonder if we should rename this repo to BTW one concern is that |
How much of that data is used to populate tooltips? I think we should aim to reduce the size of the payload, so if that part is significant then it shoul dbe cut. Especially since parameters and return types are already there with each entry. |
It is the search index (we're using a lunr client side index). I'm not going to prioritise it until we know it's an issue, particularly would like to determine if switching between pages causes a re-download. If it's downloaded only once that's not such a big deal |
Gotcha. Looking at the file now Array.tryPick gives this content:
The module entry gives:
So I think there's definitely room to improve the payload. 1MB isn't too bad I guess, but that is getting into big territory |
Right. My concern is actually more what happens if we also have other community components in the same search index. But mind you FSHarp.Core is particularly large. Let's see if it's an issue. Perhaps just compressing it would be enough |
Re: re-downloading - a modern browser should cache it, at least I'm seeing that on firefox |
It's important that static resources like the search index be requested with a cache-busting query parameter, so that if the content changes the url parameter can be changed as well, causing a new fetch of the now-updated resource. As things stand now, if we change index generation's schema without this additional parameter, previous visitors will be using the cached versions they have. |
Cool. How do we check that? Here's the request: https://github.com/fsprojects/FSharp.Formatting/blob/master/docs/content/fsdocs-search.js#L14 |
Note if we want to reduce the size of index.json an easy way is to remove the remarks and exception sections from the search corpus |
@baronfel I'll integrate this and let's iterate from here. |
Not sure if my opinions are needed. It seems all the decisions have been already made here. |
To be honest I really very much want your opinions, on all aspects.... I'm happy to change the entire technical basis of this effort if needed, as long as we keep things content driven (possibly apart from a template). All I care is that there is a tool we can run against the content we have (here FSharp.Core.dll and FSharp.Core.xml) and we generate usable quality docs. |
No. Docs is a general term. Frankly I'm not sure what this repo does at this point other than run a tool in CI, but what it emits is very specific: the API reference for FSharp.Core. The repo should be named according to what it does.
etc.
I think we need to slow down here and assess what it is we're actually trying to accomplish. Taking broad strokes to build and merge and completely change everything without time for feedback that's been asked for shouldn't be done. Is this:
At this point I'm not clear about it anymore. The original goal was to act as a stopgap to eventually be subsumed by the MS docs site. |
echoing @cartermp's comments here, there have been a lot of changes done quite recently that, to be honest, feel like a regression in some ways. As an example: the styling we had before was pretty streamlined and looked, if not completely customized for F# at least streamlined and modern. Now what's out and deployed looks spartan, in a not good way. @Krzysztof-Cieslak spent a lot of time finding an existing design system and making pages based off of that. Similarly, I liked the older fashion of having namespace-level pages rather than a (potentially very long) scrollbar with all of the namespaces in the library as the top-level landing page. I usually try to do OSS stuff on the weekend, so weekday stuff is either related to work (and so I can reasonably spend time on it during the workday), or quick, low-effort stuff like the search index fix here a couple days ago. It's hard for me to stay on top of the scope of the changes here, and it makes me want to invest that time less when changes are merged without time to trial and provide feedback. I understand that this is an area of focus for you right now @dsyme, and love the changes to F#F overall, but it doesn't feel like I'm a contributor here so much as along for the ride ;)
Regarding this point, I'd suggest that that content rendered by the templating engine:
Then, when rendering links/src elements to generated content files, append the hash to the query string. This would mean that urls like the one in the search JS you linked would need to be templated as well. Same for css links in the html |
Please redesign the core F#F template and/or CSS for it. But aim to get that into FSharp.Formatting, so all docs for all sites can make use of it.
Please describe what you have in mind in terms of design - examples to link to, principles, etc. |
I'll start a new thread to discuss the full range of F# documentation and tooling issues. |
See #32 for the discussion thread For now I've renamed the repo to |
This is work in progress to use the FSharp.Formatting
fsdocs
default tooling to build the freshest FSharp.Core docs.The CI in this PR attempts to do this
build dotnet/fsharp
feature/docs
branch (where we assume latest doc updates have been pushed)builds
FSharp.Formatting
master branchUses that
FSharp.Formatting
tool to build the docs for the FSharp.Core built in step 1See also README.md
@baronfel We will ened to work together to incorporate any improvements made recently, I need to understand what they are