Add typedoc to include JSDoc comments in Docs site#6045
Draft
nabbydude wants to merge 4 commits into
Draft
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Docs have drifted out of sync with the codebase, many functions are entirely undocumented. Added typedoc package to convert JSDoc packages to doc API pages. Goal with this PR is not to write new documentation, just convert existing documentation and scaffold some basic doc architecture, then once this is merged contributing docs can be more seamless for everyone. This also means scope is just limited to API docs, and doesn't touch guides, concept pages, etc
Creating a draft so I can document and plan architecture decisions and get feedback.
Issues
Implements #3319
I'll also hopefully address these bc they seem doc-related:
To-do
Decisions
Custom Types
How to show eg
EditorvsBaseEditorin the docs. I think what makes most sense to me would be to redirectEditortoBaseEditorand explain the distinction at the top of the page but idk yet how possible that is in typedoc. If not, the former could just be a stub that links to the latter. Further complicated by next heading:Static helpers vs Types
Elementis a type of node with achildrenproperty, butElementis also a const collection of static utility functions for element nodes. How to square this in docs? I could see the helper being renamed to either its type (ElementInterfacein this case) or something like "Element Helper" With a clarifying note at the top of theElementpage.Multiple overlapping definitions
collapseis exported 3 times by slate, as a standalone static function, as a static member of theTransformshelper, and as an instance method of theBaseEditorobject. Ideally we wouldn't have to write the same documentation 3 times.Currently under the hood the helper method just redirects to the instance method, then the instance method calls the bare method, but could be overwritten by plugins/users. idk for sure if the bare methods are even intentionally exported, I've certainly never used them but curious if anyone else does. As a bonus
collapseis also in theSelectionTransformshelper, which is merged intoTransformsexternally but still referenced by name internally.Checks
yarn test.yarn lint. (Fix errors withyarn fix.)yarn start.)yarn changeset add.)