-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: create api docs #9
Conversation
Visit the preview URL for this PR (updated for commit 2ba2688): https://zksync-docs-staging-5eb09--pr9-sf-create-api-docs-jybyg3t4.web.app (expires Thu, 18 Apr 2024 14:46:51 GMT) π₯ via Firebase Hosting GitHub Action π Sign: bfaafba5fa82d4f63473aaa76a21fabf1fbb3a11 |
@dutterbutter For the feedback about the highlight in the Table of Contents, that's a NuxtUI feature. It's designed so that it highlights all the headers that are visible on the screen as you scroll. It does not seem like there's a way to modify that at the moment so that only the uppermost header is highlighted. |
fef5786
to
45718af
Compare
@dutterbutter I like the cards design! I did add in some custom icons you could use, like |
@itsacoyote I think this good to be reviewed. The |
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.
Thanks for the help on the API docs. Got a few comments here and there.
Don't know if this was on your mind, but I know the code blocks can get pretty large since they don't have a scroll feature. I'm looking into a way to set a min-height on them so that we can have scrollable code blocks that don't get too tall.
591c068
to
dbe1b5e
Compare
|
||
1. **DATA, 32 bytes** - hash defining the L2 block. | ||
1. **TracerConfig** - Optional configuration for tracing. Refer to the | ||
[TraceConfig documentation](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#traceconfig) for more details. |
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.
Perhaps make this _blank?
|
||
Array of objects, each representing a traced call made from the specified block. | ||
|
||
:display-partial{path="api-reference/_partials/_trace-object"} |
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.
Any particular reason this in tabular format and the other response objects are in a bulleted list?
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.
I actually like the tabular format as its displayed here but just my own preference.
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.
I'm a little torn on choosing between the two. On one hand, tabular format is good for structuring visually but it is also what can break visually with responsive and smaller screen presentations. Bulleted has less structure which makes it more flexible. I leaned towards emulating what Ethereum uses on its API docs. I also noticed it's easier to "fit" more data in a bulleted list if you want sub-lists under an entry.
Another choice with going with bulleted is that it is much easier to edit versus a markdown table. At some point when I've got time, I'm tempted to just convert this all to a yml format and dynamically generate the page layout. That should make it much easier to adjust the formatting, styling, tabular vs bulleted, etc without compromising the data.
Also to answer your original question, I simply forgot to edit this file and convert from tabular to bulleted.
- **logsBloom**: DATA, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs. | ||
- **type**: QUANTITY - integer of the transaction type, 0x0 for legacy transactions, 0x1 for access list types, 0x2 for dynamic fees. | ||
|
||
It also returns either : |
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.
It also returns either : | |
It also returns either: |
#### Parameters | ||
|
||
| **Parameter** | **Type** | **Description** | | ||
|----------------------|-------------|----------------------| | ||
| `subscriptionName` | `String` | Name of the subscription. Valid names include "newHeads" for new block headers, "logs" for new log entries, and others depending on the client's capabilities. | | ||
| `options` | `Object` | Optional filter conditions for the subscription, applicable for subscriptions like "logs" where specific event criteria can be set. | | ||
|
||
#### Returns | ||
|
||
| **Field** | **Type** | **Description** | | ||
|-----------|----------|------------------------------------------------------| | ||
| `result` | `DATA` | A subscription ID used to identify and manage the subscription. | |
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.
Let's be consistent with the formatting. Can we change this to reflect the parameter list format being used elsewhere.
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.
Oh no, I totally missed this file. π’
399b5eb
to
2ba2688
Compare
What π»
Why β
Evidence π·
Include screenshots, screen recordings, or
console
output here demonstrating that your changes work as intended