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

Chore add workflows snippets for 6.0 docs #11872

Merged
merged 3 commits into from
Aug 11, 2020
Merged

Conversation

jonniebigodes
Copy link
Contributor

@jonniebigodes jonniebigodes commented Aug 10, 2020

This pull request adds the code snippets for the workflows section.

What was done:

  • Added the snippets (react and react ts). I know that there's a lot of them, but i was aiming for consistency.
  • The markdown files are now referencing the files.

Feel free to provide feedback

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

Looks good, I wonder about the TS snippets. I suppose depending on your TS settings you may or may not have to type your stories--is this right @shilman / @jonniebigodes?

What do we want to do in our snippets?


import MyComponentThatHasAQuery, { MyQuery} from '../component-that-has-a-query';

export const LoggedOut = () => <MyComponentThatHasAQuery />;
Copy link
Member

Choose a reason for hiding this comment

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

Let's use a template.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed the snippet to include a template with the latest commit.

Let me know if you need anything else.

import { ListItem, ListItemProps} from './ListItem';
import { Unchecked } from './ListItem.stories';

const ListTemplate = ({ items, ...args }) => (
Copy link
Member

Choose a reason for hiding this comment

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

Do we need types here?

@shilman
Copy link
Member

shilman commented Aug 11, 2020

@tmeasday @jonniebigodes i don't really understand the different levels of type strictness in TS. i think given that a lot of TS people like their types strict, we should do our best to provide strictly typed TS snippets. people who want to be loose are welcome to omit whatever their settings allow them to.

@jonniebigodes
Copy link
Contributor Author

@shilman exactly why i did it here. Also as a added bonus, involuntarily we're adding good practices.

@jonniebigodes
Copy link
Contributor Author

conflicts are solved, let me know if you need anything else.

@shilman shilman merged commit 7096da8 into next Aug 11, 2020
@stof stof deleted the chore_add_workflow_snippets branch May 25, 2022 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants