rfcs icon indicating copy to clipboard operation
rfcs copied to clipboard

rfc(feature): Versioned docs

Open chargome opened this issue 1 year ago • 9 comments

This RFC proposes the implementation of versioned documentation for Sentry Docs. The goal is to provide users with access to documentation specific to different versions of a Sentry SDK. Currently, users only have access to the documentation of the latest version of a SDK.

Rendered RFC

chargome avatar Aug 27 '24 13:08 chargome

I am not sure if I agree with you @rahulchhabria Yes, we can combine the logged-in state to pre-select the version. But don't think if we don't this right away it's a blocker or too complex for people to understand - so I wouldn't tie those two problems together.

Now, my feedback for the RFC:

I think we should also think about providing versions for not just major version bumps. What if we add new features in a minor with a new preferred way we want users to use it? Then we should also be able to reflect that somehow. If we need to copy an entire folder for every minor change we want to render, it might quickly become overwhelming.

Can we figure out a solution to version individual files/pages, not entire folders?

HazAT avatar Aug 28 '24 10:08 HazAT

With duplication of code this will make maintaining the prose text in the documentation harder, and the same page in different versions will diverge. This is something we need to keep in mind. Most of the times we want the pages to be different because something changed in the new version. But if we want to update the wording, we need to make sure we do it in all versions.

antonpirker avatar Sep 02 '24 09:09 antonpirker

Another thing (maybe not fully related to this RFC).

I would love to render the "options" sections from source code. We could add this documentation to the source and then render the mark down file from the source. So we would not need to update the code and the docs pages separately, but only update the code and if there are new options or new documentation for an existing option, the documentation is updated automatically.

antonpirker avatar Sep 02 '24 09:09 antonpirker

I saw this a while back, wonder if we could use it to render parts of our docs from source: https://til.simonwillison.net/python/cog-to-update-help-in-readme

mwarkentin avatar Sep 02 '24 11:09 mwarkentin

Another thing (maybe not fully related to this RFC).

I would love to render the "options" sections from source code. We could add this documentation to the source and then render the mark down file from the source. So we would not need to update the code and the docs pages separately, but only update the code and if there are new options or new documentation for an existing option, the documentation is updated automatically.

@antonpirker So you would want to render the options version specific from source I assume?

chargome avatar Sep 04 '24 07:09 chargome

Can we figure out a solution to version individual files/pages, not entire folders?

@HazAT with option 3 we would do basically that. We could for example add the version to filename and use that for displaying different versions of the same page. Or do you think it would make sense to do the versioning within a file (maybe something with a <Versioned version="1.1.1">... component?

chargome avatar Sep 04 '24 07:09 chargome

Another thing (maybe not fully related to this RFC). I would love to render the "options" sections from source code. We could add this documentation to the source and then render the mark down file from the source. So we would not need to update the code and the docs pages separately, but only update the code and if there are new options or new documentation for an existing option, the documentation is updated automatically.

@antonpirker So you would want to render the options version specific from source I assume?

Yes exactly. But I think this is not really related with this RFC. However we decide on organizing the versioned docs, we then can add some code or github action or whatever, to render the options page for the right platform and the right version accordingly

antonpirker avatar Sep 04 '24 08:09 antonpirker

Would this let us write docs for next/future versions, or is that out of scope?

krystofwoldrich avatar Sep 04 '24 14:09 krystofwoldrich

@krystofwoldrich depending on the implementation we could do that yes

chargome avatar Sep 04 '24 15:09 chargome

Docs for versioning available here

chargome avatar Nov 15 '24 07:11 chargome