Skip to content

Conversation

effozen
Copy link

@effozen effozen commented Aug 17, 2025

Description

  • Add typedoc to parse jsdoc to html files.
  • Use typedoc due to jsdoc not support for typescript (it needs transfiling to js, and could generate jsdoc using comments)
    • typedoc support jsdoc and tsdoc both.
    • tsdoc is made by microsoft for typescript.

Changes

  • add typedoc to parse jsdoc to html file.
  • delete api explanation on README.md
  • add tsdoc to LottiePlayer class

Example Images

Build docs

Screenshot 2025-08-17 at 10 21 29 PM
  • After do build command, output likes:
Screenshot 2025-08-17 at 10 26 41 PM

Docs Examples

Screenshot 2025-08-18 at 12 17 41 AM

Considerations

  • Adopted typedoc which uses Microsoft's tsdoc since Thorvg.web is using typescript instead of javascript

  • The following need to consider:
    1. I didn't add /docs in .gitignore, because it build separately and might be used in ThroVG's api docs (guess maintainer will do CI/CD).
    2. Currently, only lottie-player exists in src, so this is set as the entry point (the "entryPoints" option in the configuration file may need to be modified later)
      • Reference: "entryPoints": ["./src/lottie-player.ts"]
    3. I added tsdoc on the top of LottiePlayer class. But, need to consider leave comments tsdoc style.
      • jsdoc also can use in typedoc, but tsdoc allow a lot of features for typescript.

  • Following issues still remain (It is about typedoc, so not that big issues)
    • Typedoc not support exclude empty group and exclude lit annotation.
    • It automately generate empty group by lit annotation.
    • To delete this, need to add typedoc plugin or waiting to update futher.
      • but, for issue's purpose, add plugin is not necessary, so I didn't add plugin.

Relative Issue

#21

Copy link

vercel bot commented Aug 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
thorvg-perf-test Ready Ready Preview Comment Sep 18, 2025 2:17pm

@effozen
Copy link
Author

effozen commented Aug 17, 2025

Pending for squash commit. (solve coflict)

@effozen
Copy link
Author

effozen commented Aug 17, 2025

Merge conflict solved and did squash commit.

@tinyjin tinyjin requested review from Copilot and tinyjin August 17, 2025 16:04
@tinyjin tinyjin added the documentation Improvements or additions to documentation label Aug 17, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR integrates TypeDoc to automatically generate API documentation from TypeScript code, replacing the manually maintained API documentation in README.md with an automated documentation solution.

  • Adds TypeDoc configuration and build scripts for generating HTML documentation
  • Removes manually maintained API documentation section from README.md
  • Adds TSDoc comments to the LottiePlayer class as an example

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
typedoc.json Configuration file for TypeDoc documentation generation
src/lottie-player.ts Adds TSDoc comments to LottiePlayer class
package.json Adds TypeDoc dependency and documentation build scripts
README.md Removes manually maintained API documentation section

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@tinyjin tinyjin left a comment

Choose a reason for hiding this comment

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

Image

Not sure, current open PR is ready for review.
Please draft PR unless it's ready. Thank you.

@effozen effozen marked this pull request as draft August 17, 2025 16:25
@effozen effozen marked this pull request as ready for review August 28, 2025 15:37
@effozen
Copy link
Author

effozen commented Aug 28, 2025

스크린샷 2025-08-29 오전 12 19 14

Thank you for waiting. I fixed bugs which happened in package.json (sorry for the typo), and updated typedoc.json for new features (which are base-lottie-player.ts, lottie-player.ts, lottie-preset-player.ts)

@effozen effozen requested a review from tinyjin August 28, 2025 15:52
Copy link
Member

@tinyjin tinyjin left a comment

Choose a reason for hiding this comment

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

Image

Please check wrong spelling and typo in commit message.

Also I am curious about "Remain Issue" section.
If the issue is valid and you know way out, then please make a decision and apply and request review again.

A commit message is not a place to pass unresolved issues on to future contributors.
If even the PR author considers a patch incomplete (because a valid issue still exists), I don’t think it makes sense for reviewers to spend time reviewing it.

@effozen effozen marked this pull request as draft August 31, 2025 21:15
@effozen
Copy link
Author

effozen commented Aug 31, 2025

Thank you for review.
I will check and re-push it later, it is needed to wait for update by typedoc-team, so I'll check another library to fix this problem.

@effozen
Copy link
Author

effozen commented Sep 10, 2025

스크린샷 2025-09-11 오전 1 39 31

Problem solved. Sorry for bothering. Always thank you for kind review. :)

Change List:

  • add typedoc.
  • fix commit message typo.
  • fix typedoc configuration. (not include lit annotation which makes unnecessary api explanation.)
  • check build and merge.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

effozen and others added 3 commits September 18, 2025 23:16
- add typedoc to parse jsdoc to html file.
- delete api explanation on README.md.
- Because codebase is based on typescript, use typedoc instead of jsdoc. Typedoc support tsdoc and jsdoc both.
- Create web-based example matching thorvg's Lottie.cpp behavior
- Display animations in 10x10 grid layout with gray background
- Copy lottie animation resources to avoid thorvg dependency
- Include performance monitoring (FPS/MS/Memory) stats
Copy link
Member

@tinyjin tinyjin left a comment

Choose a reason for hiding this comment

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

Image

base-lottie-player and lottie-preset-player are not public classes. Users have no idea about them.

I don’t understand that the documentation is focused on classes that users can’t access.

Please note, users don't use pure typescript classes. Every scripts are built to library bundle and users will use the that.

I think docs should describe library bundle usage.

"tsconfig": "./tsconfig.json",
"plugin": [],
"theme": "default",
"name": "@thorvg/thorvg.web",
Copy link
Member

Choose a reason for hiding this comment

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

@thorvg/lottie-player

@tinyjin
Copy link
Member

tinyjin commented Oct 16, 2025

This change doesn’t synchronize the package’s API, just adds the Typedoc library.
Please reopen PR with a proper update.

@tinyjin tinyjin closed this Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants