-
Notifications
You must be signed in to change notification settings - Fork 196
fix: remove twoslash within codeblocks due to fern issue #2059
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
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
How to use the Graphite Merge QueueAdd the label graphite-merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
🌿 Documentation Preview
|
There was a problem hiding this 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 removes TypeScript twoslash
directives from code blocks within <CodeBlocks>
components due to Fern's lack of support for twoslash, which was causing rendering issues including inaccessible tabs, disabled code focus/highlighting, and broken max height constraints.
Key changes:
- Systematic removal of
twoslash
from all code block language specifiers within<CodeBlocks>
tags - Code examples remain functionally unchanged, only the language specification is modified
- Affects documentation files across multiple categories including smart contracts, transactions, authentication, and SDK reference materials
Reviewed Changes
Copilot reviewed 66 out of 66 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
docs/shared/smart-contracts/session-keys/full-example.mdx | Removed twoslash from TypeScript code block |
docs/shared/smart-contracts/session-keys/base-client.mdx | Removed twoslash from TypeScript code block with filename |
docs/shared/smart-contracts/multisig-client.mdx | Removed twoslash from TypeScript code block with filename |
docs/shared/smart-contracts/multi-owner-light-account-client.mdx | Removed twoslash from TypeScript code block with filename |
docs/shared/smart-contracts/modular-account-client.mdx | Removed twoslash from TypeScript code block with filename |
docs/shared/smart-contracts/light-account-client.mdx | Removed twoslash from TypeScript code block with filename |
docs/shared/signer/wallet-client-signer.mdx | Removed twoslash from TypeScript code block with filename |
docs/shared/signer/signer.mdx | Removed twoslash from TypeScript code block with filename |
docs/shared/react-native/account-provider-setup.mdx | Removed twoslash from two TypeScript code blocks with filenames |
docs/shared/infra/mav2-client.mdx | Removed twoslash from two TypeScript code blocks within CodeBlocks |
docs/shared/infra/client.mdx | Removed twoslash from TypeScript code block with filename |
docs/shared/core/ssr-config.mdx | Removed twoslash from TypeScript code block with filename |
docs/shared/core/config.mdx | Removed twoslash from TypeScript code block with filename |
docs/pages/troubleshooting/server-side-rendering.mdx | Removed twoslash from multiple TypeScript/TSX code blocks within CodeBlocks |
docs/pages/transactions/using-eip-7702/react.mdx | Removed twoslash from TSX code block with focus attribute |
docs/pages/transactions/using-eip-7702/client.mdx | Removed twoslash from two TSX/TypeScript code blocks |
docs/pages/transactions/sponsor-gas/react.mdx | Removed twoslash from TSX and TypeScript code blocks |
docs/pages/transactions/sponsor-gas/client.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/transactions/solana/react-per-transaction.mdx | Removed twoslash from TSX code block |
docs/pages/transactions/solana/react-global.mdx | Removed twoslash from TypeScript code block |
docs/pages/transactions/solana/api-sign.mdx | Removed twoslash from three TypeScript code blocks |
docs/pages/transactions/solana/api-request.mdx | Removed twoslash from three TypeScript code blocks |
docs/pages/transactions/solana/api-prepare.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/transactions/send-transactions/react.mdx | Removed twoslash from TSX code block with focus attribute |
docs/pages/transactions/send-transactions/prepare-calls/react.mdx | Removed twoslash from TSX code block with focus attribute |
docs/pages/transactions/send-transactions/prepare-calls/client.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/transactions/send-transactions/encoding-function-data/react.mdx | Removed twoslash from TSX and TypeScript code blocks |
docs/pages/transactions/send-transactions/encoding-function-data/client.mdx | Removed twoslash from three TypeScript code blocks |
docs/pages/transactions/send-transactions/client.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/transactions/send-parallel-transactions/react.mdx | Removed twoslash from TSX and TypeScript code blocks |
docs/pages/transactions/send-parallel-transactions/client.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/transactions/send-batch-transactions/react.mdx | Removed twoslash from TSX and TypeScript code blocks |
docs/pages/transactions/send-batch-transactions/client.mdx | Removed twoslash from three TypeScript code blocks |
docs/pages/transactions/retry-transactions/react.mdx | Removed twoslash from TSX and TypeScript code blocks |
docs/pages/transactions/retry-transactions/client.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/transactions/pay-gas-with-any-token/react.mdx | Removed twoslash from TSX and TypeScript code blocks |
docs/pages/transactions/pay-gas-with-any-token/client.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/third-party/smart-contracts.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/smart-contracts/other-accounts/modular-account/upgrading-to-modular-account.mdx | Removed twoslash from four TypeScript code blocks |
docs/pages/smart-contracts/other-accounts/modular-account/session-keys/getting-started.mdx | Removed twoslash from seven TypeScript code blocks |
docs/pages/smart-contracts/other-accounts/modular-account/multisig-plugin/getting-started.mdx | Removed twoslash from four TypeScript code blocks |
docs/pages/smart-contracts/other-accounts/modular-account/manage-plugins/install-plugins.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/smart-contracts/other-accounts/modular-account/manage-plugins/get-installed-plugins.mdx | Removed twoslash from TypeScript code block |
docs/pages/smart-contracts/other-accounts/modular-account/manage-ownership-mav1.mdx | Removed twoslash from three TypeScript code blocks |
docs/pages/smart-contracts/other-accounts/light-account/transfer-ownership-light-account.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/smart-contracts/other-accounts/light-account/multi-owner-light-account.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/smart-contracts/modular-account-v2/using-7702.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/signer/user-sessions.mdx | Removed twoslash from TypeScript code block |
docs/pages/signer/solana-wallets/solana-signer-package.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/signer/quickstart.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/signer/export-private-key.mdx | Removed twoslash from TSX code block |
docs/pages/signer/authentication/social-login.mdx | Removed twoslash from TypeScript code block |
docs/pages/signer/authentication/passkey-signup.mdx | Removed twoslash from TypeScript code block |
docs/pages/signer/authentication/passkey-login.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/signer/authentication/email-otp.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/signer/authentication/email-magic-link.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/signer/authentication/auth0.mdx | Removed twoslash from TypeScript code block |
docs/pages/signer/authentication/add-passkey.mdx | Removed twoslash from TypeScript code block |
docs/pages/signer/as-an-eoa.mdx | Removed twoslash from TypeScript code block |
docs/pages/recipes/multi-chain-setup.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/react/mfa/setup-mfa.mdx | Removed twoslash from nine TypeScript code blocks |
docs/pages/low-level-infra/quickstart.mdx | Removed twoslash from TypeScript code block |
docs/pages/low-level-infra/bundler/sdk.mdx | Removed twoslash from three TypeScript code blocks |
docs/pages/infra/quickstart.mdx | Removed twoslash from TypeScript code block |
docs/pages/core/quickstart.mdx | Removed twoslash from two TypeScript code blocks |
docs/pages/authentication/login-methods/email-otp.mdx | Removed twoslash from two TSX code blocks with filenames |
); | ||
}; | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the Smart Wallets documentation guidelines, all TypeScript code examples must apply twoslash
to TypeScript code snippets. This code block is missing the twoslash
directive that should be included for proper TypeScript validation and type checking.
Copilot generated this review using guidance from repository custom instructions.
|
||
</Tab> | ||
<Tab title="Other Javascript"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the Smart Wallets documentation guidelines, all TypeScript code examples must apply twoslash
to TypeScript code snippets. This code block is missing the twoslash
directive that should be included for proper TypeScript validation and type checking.
Copilot generated this review using guidance from repository custom instructions.
Now that you've set up your config for SSR, you will have to manually hydrate the state on the client. This can be done by calling the `hydrate` method exported by Smart Wallets core. | ||
|
||
<CodeBlocks> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the Smart Wallets documentation guidelines, all TypeScript code examples must apply twoslash
to TypeScript code snippets. This code block is missing the twoslash
directive that should be included for proper TypeScript validation and type checking.
Copilot generated this review using guidance from repository custom instructions.
onMount(); | ||
} | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the Smart Wallets documentation guidelines, all TypeScript code examples must apply twoslash
to TypeScript code snippets. This code block is missing the twoslash
directive that should be included for proper TypeScript validation and type checking.
Copilot generated this review using guidance from repository custom instructions.
Now you can get the initial state from cookies and pass it to the `hydrate` method to hydrate the account state on the client or on the server. | ||
|
||
<CodeBlocks> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the Smart Wallets documentation guidelines, all TypeScript code examples must apply twoslash
to TypeScript code snippets. This code block is missing the twoslash
directive that should be included for proper TypeScript validation and type checking.
Copilot generated this review using guidance from repository custom instructions.
onMount(); | ||
} | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the Smart Wallets documentation guidelines, all TypeScript code examples must apply twoslash
to TypeScript code snippets. This code block is missing the twoslash
directive that should be included for proper TypeScript validation and type checking.
Copilot generated this review using guidance from repository custom instructions.
<CodeBlocks> | ||
|
||
```tsx sign-in-with-otp.tsx twoslash filename="sign-in-with-otp.tsx" | ||
```tsx sign-in-with-otp.tsx filename="sign-in-with-otp.tsx" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we certain that this positional title works and we don't need to use the title
prop when it's within a CodeBlocks
? i.e.
```tsx sign-in-with-otp.tsx filename="sign-in-with-otp.tsx" | |
```tsx title=sign-in-with-otp.tsx filename="sign-in-with-otp.tsx" |
i think that's prob testable locally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
caad575
to
b69a159
Compare
Fern doesn't correctly support twoslash, so it breaks the rendering of a
<CodeBlocks>
tag by making tabs inaccessible and disabling the code focus/highlighting and the max code block height.Removing twoslash from these docs for now until Fern adds support for twoslash.
Cases found with the regex
<CodeBlocks>[\s\S]*?twoslash[\s\S]*?</CodeBlocks>
, which had 1 false positive due to non-<CodeBlocks>
section in between two<CodeBlocks>
sections.. Also had to remove from nested<Markdown ...
inclusions.Pull Request Checklist
yarn test
)site
folder, and guidelines for updating/adding docs can be found in the contribution guide)feat!: breaking change
)yarn lint:check
) and fix any issues? (yarn lint:write
)PR-Codex overview
This PR primarily updates the documentation files, changing code block annotations from
twoslash
to standard code block formatting. This enhances clarity and consistency across various documentation pages.Detailed summary
twoslash
annotations to standard code block formatting in multiple.mdx
files.signer
,client
, and configuration files.