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

Internal: use multiline comments to enable flow docs #2383

Conversation

christianvuerings
Copy link
Contributor

Summary

What changed?

Use multiline comments to enable flow docs

Why?

Makes the comments visible to where the props are being used, not just where they are defined.

Screen Shot 2022-09-11 at 4 57 00 AM

Screen Shot 2022-09-11 at 4 56 49 AM

@christianvuerings christianvuerings added the patch release Patch release label Sep 11, 2022
@christianvuerings christianvuerings requested a review from a team as a code owner September 11, 2022 12:05
@netlify
Copy link

netlify bot commented Sep 11, 2022

Deploy Preview for gestalt ready!

Name Link
🔨 Latest commit 57dec79
🔍 Latest deploy log https://app.netlify.com/sites/gestalt/deploys/631dcf0265363a0008f0c9f6
😎 Deploy Preview https://deploy-preview-2383--gestalt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@@ -18,11 +18,19 @@ const buildSourceLinkUrl = (componentName) =>

type Props = {|
badge?: 'pilot' | 'deprecated',
// DEPRECATED: Use `children` instead of `defaultCode`
/**
* @deprecated : Use `children` instead of `defaultCode`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since flow out of the box doesn't yet support deprecated types, we use JSDoc comments instead:

Note that in TypeScript, the JSDoc format is also recommended: microsoft/TypeScript#390

Copy link
Contributor

Choose a reason for hiding this comment

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

Neat! 😍

@@ -18,11 +18,19 @@ const buildSourceLinkUrl = (componentName) =>

type Props = {|
badge?: 'pilot' | 'deprecated',
// DEPRECATED: Use `children` instead of `defaultCode`
/**
* @deprecated : Use `children` instead of `defaultCode`
Copy link
Contributor

Choose a reason for hiding this comment

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

Neat! 😍

@dangerismycat dangerismycat merged commit 0881e35 into pinterest:master Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch release Patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants