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: fix invalid context imports in doc-examples #1493

Merged
merged 10 commits into from
Dec 11, 2023

Conversation

danielbate
Copy link
Contributor

Closes #1355

@danielbate danielbate self-assigned this Dec 8, 2023
@danielbate danielbate marked this pull request as ready for review December 8, 2023 15:32
@danielbate danielbate added the docs Requests pertinent to documentation label Dec 8, 2023
@arboleya arboleya added this to the Salamander milestone Dec 8, 2023
Copy link
Contributor

github-actions bot commented Dec 10, 2023

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 86.55% 6031/6968
🟡 Branches 70.05% 933/1332
🟡 Functions 77.44% 992/1281
🟢 Lines 86.55% 5778/6676

Test suite run success

1464 tests passing in 258 suites.

Report generated by 🧪jest coverage report action from e5cfcad

Copy link
Member

@arboleya arboleya left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this.

Just copying my two questions from:

  1. Don't these #context bits defeat the purpose of having unit-tested docs?
  2. Shouldn't these doc-examples.test.ts be placed in the doc-snippets?

In short, I think all code-snippets should be placed inside the docs-snippets package to avoid confusion.

Also, it would be good to have a way to bulletproof the use of #context to avoid breaking the snippets — is that possible? (cc @Torres-ssf)

@Torres-ssf
Copy link
Contributor

Thanks for fixing this.

Just copying my two questions from:

  1. Don't these #context bits defeat the purpose of having unit-tested docs?
  2. Shouldn't these doc-examples.test.ts be placed in the doc-snippets?

In short, I think all code-snippets should be placed inside the docs-snippets package to avoid confusion.

Also, it would be good to have a way to bulletproof the use of #context to avoid breaking the snippets — is that possible? (cc @Torres-ssf)

@arboleya Since these #context are comments inside our code, it is hard to bulletproof them. Unless we find another approach to using them

@danielbate
Copy link
Contributor Author

  1. Agreed, we probably need to change approach completely to how these are implemented. Not 100% sure what the solution looks right now, I did some digging in the past but did not find something that was both unit testable and documentable. I'll investigate again at some point but lower priority than some of my other work. @FuelLabs/devrel may have some ideas?
  2. Agreed, have raised Migrate snippets from fuel-gauge #1505

@danielbate danielbate enabled auto-merge (squash) December 11, 2023 16:45
@danielbate danielbate merged commit 14e38dc into master Dec 11, 2023
10 checks passed
@danielbate danielbate deleted the db/docs/fix-doc-examples-context-import branch December 11, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Requests pertinent to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dysfunctional code on Provider's docs
3 participants