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: first draft for the v4 sdk tech reference, overview tbd #858

Merged
merged 7 commits into from
Jan 27, 2025

Conversation

0xdevant
Copy link
Contributor

@0xdevant 0xdevant commented Jan 17, 2025

First draft for the v4 SDK's Overview + Technical Reference

  • typescript docgen based on v4 sdk repo
  • I want to follow the format of v3 sdk docs as close as possible so I fixed some formatting issues e.g. extra title and texts, broken links in breadcrumbs, broken links to md for type-aliases etc
  • updated wordings and fixed links in Overview

TBD: type aliases, variables and functions could be moved back to Tech Reference Overview like what v3 sdk did

Copy link

vercel bot commented Jan 17, 2025

@0xdevant is attempting to deploy a commit to the Uniswap Team on Vercel.

A member of the Team first needs to authorize it.

@saucepoint
Copy link
Collaborator

can we add the script & submodule so its reproducible

i.e.

https://github.com/Uniswap/docs/blob/main/scripts/v4-forge-doc.sh

https://github.com/Uniswap/docs/tree/main/submodules

@seeyijie
Copy link
Contributor

seeyijie commented Jan 18, 2025

Added script to generate docs!

There are still some links that needs to be manually edited (fixed manually by @0xdevant) because the copy and paste may have messed things up. The docs are complete but every time the script needs to be run, just need to manually check which link needs to be updated.

Copy link
Collaborator

@saucepoint saucepoint left a comment

Choose a reason for hiding this comment

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

so....

I think we should look for a different doc-gen tool; this is really hard for me to read

image


parameter tables are a lot nicer
image


##### trade

`Trade`\<`Currency`, `Currency`, `TradeType`\>
Copy link
Collaborator

Choose a reason for hiding this comment

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

grr this is kind of weird, so on the localhost:3000 its not escaping

the unfortunate thing is, when we upgrade to docusaurus 3 we DO want these characters escaped...

image

Copy link
Contributor

@seeyijie seeyijie Jan 23, 2025

Choose a reason for hiding this comment

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

Are there any plans to upgrade to 3?
We could work on an overhaul of the tech docs from docusaurus v2 to v3.

There may be dependencies conflicts too to upgrade to v3. I can remove the escape characters for now if you want.

Copy link
Collaborator

Choose a reason for hiding this comment

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

here's the PR for docusaurus3; i would imagine its going in semi soon..

#826


i wonder if the best plan rn is to strip the escape character in the script (with sed), and then we can easily remove it so the script produces docs with escaped characters

Copy link
Contributor

Choose a reason for hiding this comment

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

Will explore it tonight 👍🏻

Copy link
Contributor

Choose a reason for hiding this comment

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

@0xdevant @saucepoint Added step 4 to the script to remove escape characters. To be removed when docusaurus 3 is in.

docs/sdk/v4/_category_.json Outdated Show resolved Hide resolved
scripts/v4-sdk-docs-gen.sh Show resolved Hide resolved
scripts/v4-sdk-docs-gen.sh Outdated Show resolved Hide resolved
@0xdevant
Copy link
Contributor Author

0xdevant commented Jan 27, 2025

Some option flags are added to make the generation match to how the v3 sdk docs' formatting look e.g.

  • no extra page header and title
  • only Class, Enum and Interface will have its own category
  • params are displayed in table format
  • no renaming needed for the inner overview.md

The escape character update also looks good to me. So no manual edit needs to be done after the generation except the 2 category.json(s) we need to configure inside sdk/v4 and sdk/v4/reference/.

@saucepoint could you help us review again?

Copy link
Collaborator

@saucepoint saucepoint left a comment

Choose a reason for hiding this comment

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

YEEE TY TY

@saucepoint saucepoint merged commit fdf1302 into Uniswap:main Jan 27, 2025
2 of 3 checks passed
@0xdevant 0xdevant deleted the docs/v4-sdk branch January 28, 2025 02:35
smblee added a commit to smblee/uniswap-docs that referenced this pull request Jan 29, 2025
…s_v3' into bryan-01-14-redesign

* smblee/bryan-12-04-upgrade_to_docusaurus_v3: (22 commits)
  update v4 docs to be compliant with v3 styling, update margin
  docs: add Soneium and Ink v4 deployments (Uniswap#876)
  docs: update home index links for v4 (Uniswap#874)
  docs: update protocol intro with v4 references (Uniswap#872)
  docs: clean up unused imports and update v4 whitepaper link (Uniswap#868)
  docs: update READ.ME with v4 references (Uniswap#871)
  docs: update homepage guides for v4 (Uniswap#870)
  docs: add v4 updates to Uniswap Protocol Overview and Hooks to Protocol Concepts (Uniswap#869)
  docs: first draft for the v4 sdk tech reference, overview tbd (Uniswap#858)
  docs: update avalanche explorer (Uniswap#866)
  Update gas-optimization.md (Uniswap#860)
  docs: add all mainnet deployments for v4 (Uniswap#864)
  Update 05-range-orders.md (Uniswap#861)
  Update Celo-Deployments.md (Uniswap#862)
  v4 docs: UI enhancements, broken links, lowercase letters fixes and content updates (Uniswap#854)
  Fix Guide on Minting Position (Uniswap#859)
  Update 01-overview.md (Uniswap#852)
  docs: v4 hooks guides optimizations (Uniswap#844)
  StateView & Flash Accounting guides added (Uniswap#848)
  Update `decrease-liquidity.md` to fix a bug in the demo code (Uniswap#856)
  ...
smblee added a commit to smblee/uniswap-docs that referenced this pull request Jan 29, 2025
…s_v3' into bryan-01-14-redesign

* smblee/bryan-12-04-upgrade_to_docusaurus_v3: (22 commits)
  update v4 docs to be compliant with v3 styling, update margin
  docs: add Soneium and Ink v4 deployments (Uniswap#876)
  docs: update home index links for v4 (Uniswap#874)
  docs: update protocol intro with v4 references (Uniswap#872)
  docs: clean up unused imports and update v4 whitepaper link (Uniswap#868)
  docs: update READ.ME with v4 references (Uniswap#871)
  docs: update homepage guides for v4 (Uniswap#870)
  docs: add v4 updates to Uniswap Protocol Overview and Hooks to Protocol Concepts (Uniswap#869)
  docs: first draft for the v4 sdk tech reference, overview tbd (Uniswap#858)
  docs: update avalanche explorer (Uniswap#866)
  Update gas-optimization.md (Uniswap#860)
  docs: add all mainnet deployments for v4 (Uniswap#864)
  Update 05-range-orders.md (Uniswap#861)
  Update Celo-Deployments.md (Uniswap#862)
  v4 docs: UI enhancements, broken links, lowercase letters fixes and content updates (Uniswap#854)
  Fix Guide on Minting Position (Uniswap#859)
  Update 01-overview.md (Uniswap#852)
  docs: v4 hooks guides optimizations (Uniswap#844)
  StateView & Flash Accounting guides added (Uniswap#848)
  Update `decrease-liquidity.md` to fix a bug in the demo code (Uniswap#856)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants