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

Add documentation for $Shape on flow.org #6692

Closed
rickyp-uber opened this issue Aug 3, 2018 · 5 comments
Closed

Add documentation for $Shape on flow.org #6692

rickyp-uber opened this issue Aug 3, 2018 · 5 comments

Comments

@rickyp-uber
Copy link

rickyp-uber commented Aug 3, 2018

To save others time please update your documentation to match current feature sets. Locating the $Shape utility is currently very difficult

@vicapow
Copy link
Contributor

vicapow commented Aug 3, 2018

looks like it was documented in the past? https://github.com/facebook/flow/pull/5251/files

It may be that this is deprecated but this is unclear.

@vicapow
Copy link
Contributor

vicapow commented Aug 3, 2018

Oh, I missread the previous thread. It looks like it just never got merged.

@vicapow
Copy link
Contributor

vicapow commented Aug 3, 2018

@rickyp-uber I would imagine if you updated pull/5251 it would get merged. previous edits to docs have gotten merged https://github.com/facebook/flow/commits/master/website/en/docs/types/utilities.md

@wchargin
Copy link
Contributor

wchargin commented Aug 4, 2018

Strong +1. This isn't documented anywhere as far as I can tell, the
linked PR excepted. When a type constructor appears in critical position
in the React public API (notably setState), it absolutely must be
documented. Type errors in React code involving $Shape are completely
inscrutable to me.

@vicapow
Copy link
Contributor

vicapow commented Aug 4, 2018

here you go #6694

wchargin added a commit to wchargin/flow that referenced this issue Aug 8, 2018
Summary:
Docs for `$Shape` were introduced in facebook#6694, but that PR had three major
errors:

  - the section was not linked from the table of contents
  - the type `$Shape<T>` was misspelled as `Shape<T>` in the header
  - the code block was not terminated, so the entirety of the rest of
    the page was marked as code, [like this][1]—clearly no one previewed
    the page before deploying!

[1]: https://archive.fo/CqH7D#87%

Closes facebook#6692.

Test Plan:
After much effort, managed to get the website to build locally. Visited
<http://localhost:8080/en/docs/types/utilities/#toc-shape> and checked
that the three issues mentioned above are all fixed.

(For posterity, steps taken to get the build working are listed here:
<facebook#6708 (comment)>.)

wchargin-branch: fix-shape-docs
wchargin added a commit to wchargin/flow that referenced this issue Aug 8, 2018
Summary:
Docs for `$Shape` were introduced in facebook#6694, but that PR had four major
errors:

  - the section was not linked from the table of contents;
  - the type `$Shape<T>` was misspelled as `Shape<T>` in the header;
  - the code block did not have `// @flow`, so lacked error annotations;
  - the code block was not terminated, so the entirety of the rest of
    the page was marked as code, [like this][1]—clearly no one previewed
    the page before deploying!

[1]: https://archive.fo/CqH7D#87%

This patch fixes those errors. While in the area, we clean up the
comments reading "Error" and "OK" to (a) eliminate the horizontal
scrollbar and (b) match the style elsewhere on the page.

Closes facebook#6692.

Test Plan:
After much effort, managed to get the website to build locally. Visited
<http://localhost:8080/en/docs/types/utilities/#toc-shape> and checked
that the four issues mentioned above are all fixed.

(For posterity, steps taken to get the build working are listed here:
<facebook#6708 (comment)>.)

wchargin-branch: fix-shape-docs
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 a pull request may close this issue.

3 participants