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

chore: isolate API docs #3237

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

chore: isolate API docs #3237

wants to merge 18 commits into from

Conversation

danielbate
Copy link
Contributor

@danielbate danielbate commented Oct 2, 2024

Summary

Moves the API docs to fuels-ts-docs-api.vercel.app with preview URLs. Also exposed more packages with typedoc.

Screenshot 2024-10-16 at 00 02 09

We have still kept the old API docs in place to facilitate a smoother transition for the docs hub.

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

@danielbate danielbate added the chore Issue is a chore label Oct 2, 2024
@danielbate danielbate self-assigned this Oct 2, 2024
Copy link

vercel bot commented Oct 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 9, 2024 7:26am
ts-api-docs ❌ Failed (Inspect) Nov 9, 2024 7:26am
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 9, 2024 7:26am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
ts-docs-api ⬜️ Ignored (Inspect) Visit Preview Nov 9, 2024 7:26am

@petertonysmith94
Copy link
Contributor

Finally 🙏🏼

@danielbate
Copy link
Contributor Author

danielbate commented Oct 15, 2024

@FuelLabs/sdk-ts leaving this as draft until we have a new vercel project as we deleted the last one. But the code is ready.

Copy link

codspeed-hq bot commented Oct 15, 2024

CodSpeed Performance Report

Merging #3237 will not alter performance

Comparing db/chore/isolate-api-docs (84b1cb5) with master (9dd92de)

Summary

✅ 18 untouched benchmarks

@danielbate
Copy link
Contributor Author

@Dhaiwat10 is going to take over this in my abcsense.

I've isolated the API docs, but now we need a new project in vercel and to enable the CLI element. We should not do that until we have unfrozen master as it will break CLI.

@Dhaiwat10
Copy link
Member

Need to get these two PRs merged in order for CI to pass:

FuelLabs/github-actions#43
FuelLabs/docs-hub#485

Dhaiwat10 added a commit to FuelLabs/github-actions that referenced this pull request Oct 24, 2024
This PR removes the validation in place for the TS SDK API docs since
they have now been isolated in a different project on a different URL
(FuelLabs/fuels-ts#3237) and they are now only
referenced from the 'main' TS SDK docs.
@petertonysmith94
Copy link
Contributor

Update Vercel to ignore this deployment (temporarily)

Copy link
Contributor

@petertonysmith94 petertonysmith94 left a comment

Choose a reason for hiding this comment

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

Potentially, instead of Closing the issue, we could make it related to it, then in our subsequent PR for full integration, can we close it?

  • I think we should leave the changes to the docs URLs till the subsequent PR.
  • We may want to add to the package path in scripts/lint-md-links.ts.
    The generated files from apps/docs-api/src/api/media are currently failing the linting step.

Comment on lines +5 to +19
"../../packages/abi-coder",
"../../packages/abi-typegen",
"../../packages/address",
"../../packages/interfaces",
"../../packages/predicate",
"../../packages/account",
"../../packages/program",
"../../packages/contract",
"../../packages/script",
"../../packages/utils",
"../../packages/crypto",
"../../packages/errors",
"../../packages/hasher",
"../../packages/math",
"../../packages/transactions"
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently, we only use the following packages (in: apps/docs/typedoc.json)

  • @fuel-ts/address
  • @fuel-ts/interfaces
  • @fuel-ts/predicate
  • @fuel-ts/account
  • @fuel-ts/program
  • @fuel-ts/contract
  • @fuel-ts/script
  • @fuel-ts/utils

Do we want to add all our packages to the api-docs?

Copy link
Member

Choose a reason for hiding this comment

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

I think this was intentional from Dan, but I am not aware of his motivation behind it

Copy link
Contributor

Choose a reason for hiding this comment

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

@danielbate what was the motivation behind this?

.github/workflows/release.yaml Show resolved Hide resolved
apps/docs-api/package.json Show resolved Hide resolved
@Dhaiwat10
Copy link
Member

I think we should leave the changes to the docs URLs till the subsequent PR.

A counter argument to this could be that if we swap out the URLs now, we can enable a smoother transition by testing thew new API docs in production and see if we face any issues. 👀 Rather than rolling out the whole thing at once without having had it tested by users in prod at all

Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
70.9%(-1.97%) 69.95%(-0.29%) 74.46%(-0.17%) 71.19%(-1.94%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 ✨ apps/docs-snippets2/src/create-fuels/decrement-counter.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/encoding/encode-and-decode.ts 0%
(+0%)
100%
(+100%)
0%
(+0%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/encoding/working-with-bytes.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/scripts/deploying-scripts.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/scripts/script-custom-transaction.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/scripts/script-with-configurable.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/testing/launching-a-test-node.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/testing/tweaking-the-blockchain.ts 0%
(+0%)
0%
(+0%)
100%
(+100%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/typegend/predicates/SimplePredicateLoader.ts 80%
(+80%)
100%
(+100%)
0%
(+0%)
80%
(+80%)
apps/docs-snippets2/src/typegend/scripts/ScriptSum.ts 100%
(+20%)
100%
(+0%)
100%
(+100%)
100%
(+20%)
✨ apps/docs-snippets2/src/typegend/scripts/ScriptSumLoader.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ apps/docs-snippets2/src/typegend/scripts/ScriptTransferToContract.ts 80%
(+80%)
100%
(+100%)
0%
(+0%)
80%
(+80%)
🔴 ✨ apps/docs-snippets2/src/typegend/scripts/ScriptTransferToContractLoader.ts 80%
(+80%)
100%
(+100%)
0%
(+0%)
80%
(+80%)
🔴 ✨ apps/docs-snippets2/src/utilities/unit-conversion.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/wallet-manager/getting-started-with-wallet-manager.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/wallet-manager/locking-and-unlocking-wallet-manager.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider moving ApiDocs outside of the documentation.
4 participants