Skip to content
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

Documentation: Add missing docs in editor package #60358

Open
41 of 83 tasks
ntsekouras opened this issue Apr 2, 2024 · 6 comments
Open
41 of 83 tasks

Documentation: Add missing docs in editor package #60358

ntsekouras opened this issue Apr 2, 2024 · 6 comments
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Type] Developer Documentation Documentation for developers

Comments

@ntsekouras
Copy link
Contributor

ntsekouras commented Apr 2, 2024

Recently, we added auto-generated docs for the editor package.

There are lots of undocumented APIs, so let's add what's missing.

  • AutosaveMonitor #60882, #60905
  • CharacterCount #60906
  • DocumentBar #61733
  • DocumentOutline #61129
  • DocumentOutlineCheck #61129
  • EditorHistoryRedo #60932
  • EditorHistoryUndo #60932
  • EditorKeyboardShortcuts #60933
  • EditorKeyboardShortcutsRegister #60933
  • EditorNotices #61736
  • EditorProvider - needs review and merge #61739
  • EditorSnackbars #61110
  • EntitiesSavedStates
  • ErrorBoundary - needs review and merge #61950
  • LocalAutosaveMonitor - needs review and merge #61951
  • PageAttributesCheck #60977
  • PageAttributesOrder #60977
  • PageAttributesPanel #60977
  • PageAttributesParent #60977
  • PageTemplate
  • PostAuthor #61090
  • PostAuthorCheck #61090
  • PostAuthorPanel #61090
  • PostComments
  • PostDiscussionPanel
  • PostExcerpt
  • PostExcerptCheck #60864
  • PostExcerptPanel
  • PostFeaturedImage #61165
  • PostFeaturedImageCheck #61165
  • PostFeaturedImagePanel #61165
  • PostFormat #61732
  • PostFormatCheck #61732
  • PostLastRevision #61166
  • PostLastRevisionCheck #61166
  • PostLastRevisionPanel #61166
  • PostLockedModal
  • PostPendingStatus
  • PostPendingStatusCheck
  • PostPingbacks
  • PostPreviewButton
  • PostPublishButton
  • PostPublishButtonLabel
  • PostPublishPanel
  • PostSchedule #61345
  • PostScheduleCheck #61345
  • PostScheduleLabel #61345
  • PostSchedulePanel #61345
  • PostSlug
  • PostSlugCheck
  • PostSticky
  • PostStickyCheck
  • PostSwitchToDraftButton
  • PostSyncStatus
  • PostTaxonomies
  • PostTaxonomiesCheck
  • PostTaxonomiesFlatTermSelector
  • PostTaxonomiesPanel
  • PostTemplatePanel
  • PostTextEditor
  • PostTitle - needs review and merge #61740
  • PostTitleRaw - needs review and merge #61740
  • PostTrash
  • PostTrashCheck
  • PostURL #61737
  • PostURLCheck #61737
  • PostURLLabel #61737
  • PostURLPanel #61737
  • PostVisibility #61735
  • PostVisibilityCheck #61735
  • PostVisibilityLabel #61735
  • ServerSideRender
  • TableOfContents
  • TextEditorGlobalKeyboardShortcuts
  • ThemeSupportCheck
  • TimeToRead
  • transformStyles
  • useEntitiesSavedStatesIsDirty
  • usePostScheduleLabel #61345
  • usePostURLLabel
  • usePostVisibilityLabel
  • VisualEditorGlobalKeyboardShortcuts
  • WordCount

We can do this iteratively, but it would be probably best to do it in chunks.

Instructions

  1. The documentation for editor package is auto generated, so after the addition of any JSDoc we need to npm run docs:build in order to update the README file. We shouldn't update manually the README file!
  2. There are some linting rules for JSDoc. You can check this doc's section about setting this up in your code editor.
  3. The generation script searches for JSDocs above the exported module. In some cases we declare the module, but export it in a different place (usually somewhere below in the same file). In that case we should add the JSDocs above the export.

Example:

function EditorHistoryRedo() { ... }
....
....

{ Add JSDoc here!!! } 
export default forwardRef( EditorHistoryRedo )
@akasunil
Copy link
Contributor

Looks like there is issue with docs:build command, It generate the documentation only if component is exported as default. Otherwise pipeline get failed. How do we resolve this ?

@ntsekouras
Copy link
Contributor Author

@sunil25393 can you give me an example of this? Because I just tested with usePostScheduleLabel which is not the default export and seems to work for me..

@akasunil
Copy link
Contributor

Sure @ntsekouras, here is my draft PR #60932

@colorful-tones
Copy link
Member

I'm just dropping an update here. I'm organizing an internal WP Engine Contributor Day on Thursday, May 16, 2024, and I plan on utilizing this issue to provide some folks with some quick wins and empower them to feel successful in their contribution efforts. Hopefully, we'll have all the items wrapped up that day. Thanks!

@colorful-tones
Copy link
Member

We did not make it as far as I thought in our internal Contributor Day, but that is to be expected. I plan on still pursuing chipping away at the items. The biggest hurdle for many folks was the issue with wp-scripts command failing: #61748

I've since been running ESLint 10.0.2 locally and everything has been working smoothly. Perhaps @akasunil will continue pitching in as well. No worries if not. I just wanted to post an update. Thanks to @ntsekouras for continuing to chip away at code reviews 👏

@ntsekouras
Copy link
Contributor Author

Thanks so much for all the contributions from everyone and especially the initiative of @colorful-tones and the organized contributors day! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

No branches or pull requests

3 participants