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

docs: better docs and types for the API #7796

Merged
merged 35 commits into from
Jul 31, 2024
Merged

docs: better docs and types for the API #7796

merged 35 commits into from
Jul 31, 2024

Conversation

ozyx
Copy link
Contributor

@ozyx ozyx commented Jul 30, 2024

Describe your changes:

  • Update docs and types for just about all of Open MCT's API
  • Export commonly used types from the top level of the typings files
    • This makes common types like DomainObject, Identifier, ObjectPath, etc. available at the root level so they can be used easily in JSDocs
  • Removes the alias for EventEmitter so that tsc correctly generates types for classes that extend it
Screen.Recording.2024-07-30.at.11.29.01.AM.mov

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this a notable change that will require a special callout in the release notes? For example, will this break compatibility with existing APIs or projects that consume these plugins?

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

Copy link

codecov bot commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 84.90566% with 8 lines in your changes missing coverage. Please review.

Project coverage is 56.83%. Comparing base (e3fcbe1) to head (6945652).

Files Patch % Lines
src/api/annotation/AnnotationAPI.js 85.00% 3 Missing ⚠️
src/utils/clock/DefaultClock.js 66.66% 2 Missing ⚠️
src/utils/visibility/VisibilityObserver.js 83.33% 2 Missing ⚠️
src/api/composition/CompositionProvider.js 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7796      +/-   ##
==========================================
- Coverage   57.15%   56.83%   -0.32%     
==========================================
  Files         674      674              
  Lines       27276    27283       +7     
  Branches     2668     2668              
==========================================
- Hits        15589    15506      -83     
- Misses      11347    11437      +90     
  Partials      340      340              
Flag Coverage Δ
e2e-full 23.52% <22.64%> (-18.46%) ⬇️
e2e-stable 60.83% <84.90%> (-0.01%) ⬇️
unit 49.40% <65.38%> (-0.04%) ⬇️
Files Coverage Δ
example/exampleUser/ExampleUserProvider.js 83.60% <ø> (ø)
example/generator/SinewaveStalenessProvider.js 100.00% <ø> (ø)
openmct.js 100.00% <100.00%> (ø)
src/MCT.js 96.93% <ø> (ø)
src/api/Editor.js 90.90% <ø> (ø)
src/api/actions/ActionCollection.js 83.58% <ø> (ø)
src/api/actions/ActionsAPI.js 96.15% <100.00%> (ø)
src/api/composition/CompositionAPI.js 100.00% <ø> (ø)
src/api/composition/CompositionCollection.js 93.58% <ø> (ø)
src/api/composition/DefaultCompositionProvider.js 95.45% <ø> (ø)
... and 86 more

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3fcbe1...6945652. Read the comment docs.

@ozyx ozyx added this to the Target:4.0.0 milestone Jul 30, 2024
@ozyx ozyx added the type:maintenance tests, chores, or project maintenance label Jul 30, 2024
@ozyx ozyx requested review from scottbell and unlikelyzero July 30, 2024 18:17
@ozyx ozyx marked this pull request as ready for review July 30, 2024 18:17
src/MCT.js Outdated Show resolved Hide resolved
src/utils/duration.js Outdated Show resolved Hide resolved
Copy link
Contributor

@scottbell scottbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good @ozyx! Had a few suggestions below. Also tested renderWhenVisible changes and they seemed to work nicely.

src/utils/visibility/VisibilityObserver.js Outdated Show resolved Hide resolved
src/utils/visibility/VisibilityObserver.js Show resolved Hide resolved
src/utils/visibility/VisibilityObserver.js Show resolved Hide resolved
tsconfig.json Show resolved Hide resolved
@ozyx ozyx requested a review from scottbell July 31, 2024 17:03
Copy link
Contributor

@scottbell scottbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff!

@ozyx ozyx changed the title docs: better docs and types for Open MCT's API docs: better docs and types for the API Jul 31, 2024
@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Jul 31, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Jul 31, 2024
@ozyx ozyx merged commit 4ee68cc into master Jul 31, 2024
30 checks passed
@ozyx ozyx deleted the whats-up-docs branch July 31, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:maintenance tests, chores, or project maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants