Comments (5)
Summary
- Docs-hub pulls over our raw assets (.md and .test.ts), parses, and builds them.
- I've identified probable issues and tested their solutions (see below).
- Maintaining two documentations systems seems obsolete to me.
Investigation
- Sometimes code snippets are malformatted (indentation)
https://docs.fuel.network/docs/nightly/fuels-ts/providers/
Occurs during the fix-indent.ts process on the docs hub. Also appears to be a problem with the rust snippets.
https://docs.fuel.network/docs/nightly/fuels-rs/deploying/configurable-constants/
https://docs.fuel.network/docs/nightly/fuels-rs/predicates/send-spend-predicate/
I believe this is due to regex replacement conflicting. For all projects, languages and coding format.
- Simplify and separate this regex replacement by project + language, should alleviate this issue and lead to more predictable results.
- Sometimes code snippets don't have syntax highlight
There is no syntax highlighting configured for html
or html-vue
in the docs hub.
- The code snippet language changed from
html-vue
tohtml
. - Add
html
to the highlighter langs in the docs-hub.
- Sometimes code snippets have "import" comments
- https://docs.fuel.network/docs/nightly/fuels-ts/cookbook/custom-transactions/#custom-transactions
// #import { BN, CoinQuantityLike, ScriptTransactionRequest }
Incorrect #import
format. Should be: // #import { BN, CoinQuantityLike, ScriptTransactionRequest }
;
- Additional lint checking within
fuels-ts
.
- Variables are not getting rendered
Variables not being detected. Potential solution:
- Changing equality check to
includes
on the conditions.
tsBookVersions: (node: any) => {
return (
typeof node.value === 'string' &&
(node.value.includes('{{fuels}}') ||
node.value.includes('{{fuelCore}}') ||
node.value.includes('{{forc}}')
)
);
},
- Alter the node value directly before any other manipulation.
visit(newTree, '', (node: any, idx, parent) => {
if (conditions.tsBookVersions(node)) {
node.value = node.value
.replace('{{fuels}}', versions.FUELS)
.replace('{{fuelCore}}', versions.FUEL_CORE)
.replace('{{forc}}', versions.FORC);
}
...
})
- Button "see code in context" doesn't work on the docs portal
- I believe this is a feature request within the docs-hub?
Side quest: We should probably be considering getting rid of
#context
tags if possible.
There are 54 instances of#context
, 45+ should be pretty simple. Would be good to get people's ideas on the import
, as I can't see a way to do it currently.
https://github.com/FuelLabs/fuels-ts/blob/master/apps/demo-typegen/src/demo.test.ts#L79
from fuels-ts.
That sounds like a better idea 🥇
from fuels-ts.
Closing due to all issues within fuels-ts
being resolved and associated docs-hub
issues have been created.
from fuels-ts.
Moving this back to Queued
and setting to blocked as awaiting docs-hub related work.
Keeping my name on for follow up purposes 😄
from fuels-ts.
Great job! Can't we close the issue as completed? 🙂
You did everything and created issues on the docs-hub repo for the remaining items.
from fuels-ts.
Related Issues (20)
- Implement contract testing in `create fuels` HOT 1
- Investigate Why Test Files Are Being Ignored By Lint Script HOT 2
- Check for Blobs' existence before uploading them
- Abi - Refactor / Kickoff HOT 3
- Abi - Refactor / Parser
- Abi - Refactor / Coder
- Abi - Refactor / Gen HOT 1
- Abi - Refactor / Conclusion
- Typedoc secondary entrypoints rendered on the docs hub HOT 6
- Typegen producing inconsistent outputs between runs
- Add basic infra for benchmarks HOT 1
- Document Error for Failed Transaction Resubmission Due to Spent Resources HOT 2
- Upgrade to `[email protected]`
- Error on contract call forwarding an assetId different from base assetId HOT 3
- Upgrade to forc `0.63.3`
- Consider moving `ApiDocs` outside of the documentation.
- Improve DX for storage slots deployment
- remove u64 from NumberCoderType Union
- `UtxoIdCoder` output index should be `u16`
- Increase test timeout to reduce flakiness HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fuels-ts.