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

Refactor data fetching API docs #30615

Merged
merged 78 commits into from Jan 12, 2022
Merged

Conversation

molebox
Copy link
Contributor

@molebox molebox commented Oct 29, 2021

New PR, same content. Refactor the Data fetching APIs so that they are logically split between API reference and concept info.

Depends on hash redirects PR: https://github.com/vercel/front/pull/11298

Bug

  • Related issues linked using
  • Integration tests added
  • Errors have helpful link attached, see contributing.md

Feature

  • Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using Fixes Refactor Data fetching guide #29603
  • Integration tests added
  • Documentation added
  • Telemetry added. In case of a feature if it's used or not.
  • Errors have helpful link attached, see contributing.md

Documentation / Examples

  • Make sure the linting passes by running yarn lint

docs/api-reference/data-fetching/getInitialProps.md Outdated Show resolved Hide resolved
docs/basic-features/data-fetching/data-fetching.md Outdated Show resolved Hide resolved
docs/basic-features/data-fetching/data-fetching.md Outdated Show resolved Hide resolved
docs/manifest.json Outdated Show resolved Hide resolved
docs/api-reference/data-fetching/getServerSideProps.md Outdated Show resolved Hide resolved
@molebox molebox requested a review from leerob November 2, 2021 13:07
@styfle
Copy link
Member

styfle commented Nov 11, 2021

Lint is failing because the manifest file needs to be updated

No missing paths in errors/manifest.json
No missing paths in docs/manifest.json
Could not find path: /docs/basic-features/data-fetching.md
Error: missing/incorrect manifest items detected see above
    at main (/home/runner/work/next.js/next.js/scripts/check-manifests.js:61:11)

@molebox
Copy link
Contributor Author

molebox commented Nov 12, 2021

Lint is failing because the manifest file needs to be updated

No missing paths in errors/manifest.json
No missing paths in docs/manifest.json
Could not find path: /docs/basic-features/data-fetching.md
Error: missing/incorrect manifest items detected see above
    at main (/home/runner/work/next.js/next.js/scripts/check-manifests.js:61:11)

Should be a'ok now @styfle

Copy link
Member

@leerob leerob left a comment

Choose a reason for hiding this comment

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

Looking good!

docs/api-reference/data-fetching/getInitialProps.md Outdated Show resolved Hide resolved
docs/api-reference/data-fetching/getServerSideProps.md Outdated Show resolved Hide resolved
docs/api-reference/data-fetching/getStaticPaths.md Outdated Show resolved Hide resolved
docs/api-reference/data-fetching/getStaticPaths.md Outdated Show resolved Hide resolved
docs/api-reference/data-fetching/getStaticPaths.md Outdated Show resolved Hide resolved
docs/basic-features/data-fetching/getStaticProps.md Outdated Show resolved Hide resolved
docs/basic-features/data-fetching/getStaticProps.md Outdated Show resolved Hide resolved
docs/basic-features/data-fetching/getStaticProps.md Outdated Show resolved Hide resolved
docs/basic-features/data-fetching/getStaticProps.md Outdated Show resolved Hide resolved
docs/basic-features/data-fetching/swr.md Outdated Show resolved Hide resolved
@molebox
Copy link
Contributor Author

molebox commented Nov 22, 2021

Im pretty sure I got all your comments @leerob, please let me know if I missed something 🙏

@molebox molebox requested a review from Nutlope November 22, 2021 14:25
@molebox
Copy link
Contributor Author

molebox commented Nov 29, 2021

@leerob coudl you take another look at this please 🙏

docs/api-reference/data-fetching/getServerSideProps.md Outdated Show resolved Hide resolved
docs/api-reference/data-fetching/getServerSideProps.md Outdated Show resolved Hide resolved
docs/api-reference/data-fetching/getServerSideProps.md Outdated Show resolved Hide resolved
docs/api-reference/data-fetching/getStaticPaths.md Outdated Show resolved Hide resolved
docs/api-reference/data-fetching/getStaticPaths.md Outdated Show resolved Hide resolved
docs/api-reference/data-fetching/getStaticProps.md Outdated Show resolved Hide resolved
docs/api-reference/data-fetching/getStaticProps.md Outdated Show resolved Hide resolved
docs/api-reference/data-fetching/getStaticProps.md Outdated Show resolved Hide resolved
docs/api-reference/data-fetching/getStaticProps.md Outdated Show resolved Hide resolved
docs/api-reference/data-fetching/getStaticProps.md Outdated Show resolved Hide resolved
@molebox
Copy link
Contributor Author

molebox commented Nov 30, 2021

Ok, ive made soem improvements to copy, and added your suggestions (thank you!) Good for another round @leerob 🙏 54th times a charm!

@leerob
Copy link
Member

leerob commented Nov 30, 2021

I think it's key-value, but we should pick one and add it to the style guide (I'm fine with either).

@molebox
Copy link
Contributor Author

molebox commented Nov 30, 2021

Updated heading and the redirect on front @leerob 🚢

leerob
leerob previously approved these changes Nov 30, 2021
Copy link
Member

@leerob leerob left a comment

Choose a reason for hiding this comment

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

I believe all my feedback has been addressed. I would love a second or third +1 on this one due to:

  1. The size of the PR
  2. The importance of these docs (They are arguably some of the most important and most used!)

@molebox
Copy link
Contributor Author

molebox commented Nov 30, 2021

I believe all my feedback has been addressed. I would love a second or third +1 on this one due to:

  1. The size of the PR

  2. The importance of these docs (They are arguably some of the most important and most used!)

Agreed! Thank you for taking the time to review it all!

@timneutkens timneutkens merged commit d291aa9 into vercel:canary Jan 12, 2022
teleaziz added a commit to teleaziz/next.js that referenced this pull request Jan 12, 2022
…o-example

* 'canary' of github.com:vercel/next.js:
  Added links to data fetching api refs, fixed title (vercel#33221)
  Removed backticks on data fetching api titles (vercel#33216)
  middlewares: limit `process.env` to inferred usage (vercel#33186)
  Fixed broken link (vercel#33209)
  v12.0.8
  v12.0.8-canary.22
  Refactor data fetching API docs (vercel#30615)
  Docs: correct ignorance pattern for .env.local (vercel#32647)
  Fixes vercel#33153: Updating cross-references from master to main + canary (vercel#33198)
  v12.0.8-canary.21
  Add util for normalizing errors (vercel#33159)
  Fix broken yarn pnp (vercel#32867)
@vercel vercel locked as resolved and limited conversation to collaborators Feb 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
created-by: Next.js docs team PRs by the Next.js docs team examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Data fetching guide
8 participants