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

♻️Migrate Stories 62..65 to args #37730

Merged
merged 6 commits into from
Mar 18, 2022

Conversation

rbeckthomas
Copy link
Contributor

@rbeckthomas rbeckthomas commented Feb 18, 2022

Partial for #35923.

This PR also removes the allowlist for the usage of @storybook/addon-knobs and references to it.

Remove disabled stories, and all its uses and remove storybook
allowlist.
@amp-owners-bot
Copy link

Hey @alanorozco! These files were changed:

build-system/tasks/storybook/env/amp/main.js
build-system/tasks/storybook/env/disabled-stories.js
build-system/tasks/storybook/env/preact/main.js
build-system/tasks/storybook/env/react/main.js

@rbeckthomas rbeckthomas changed the title ♻️Migrate Stories 62..65 to args:w ♻️Migrate Stories 62..65 to args Feb 18, 2022
@samouri
Copy link
Member

samouri commented Feb 18, 2022

@rebeccanthomas: is this ready for review?

@rbeckthomas rbeckthomas requested review from alanorozco and removed request for alanorozco and samouri February 18, 2022 18:54
@rbeckthomas
Copy link
Contributor Author

Ah, Not yet. This is blocked pending the merges of the other story migration. Sorry about that!

@samouri samouri marked this pull request as draft February 18, 2022 19:28
@rbeckthomas
Copy link
Contributor Author

This PR is blocked pending merge of #37697, #37727 and updates 45..49 (soundcloud, lightbox, and timeago).

@rbeckthomas rbeckthomas marked this pull request as ready for review March 15, 2022 20:50
@amp-owners-bot amp-owners-bot bot requested a review from samouri March 15, 2022 20:50
aria-label={ariaLabel}
{...args}
Copy link
Contributor

Choose a reason for hiding this comment

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

args contains some of the same properties that are passed in. Perhaps you want to do:

<ContainWrapper {...args} as={asProp} class={className} ...

defaultValue: {border: '1px solid', width: 200, height: 50},
control: {type: 'object'},
},
wrapperStyle: {
Copy link
Contributor

Choose a reason for hiding this comment

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

does this need the default value of {padding: 4}?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah yes! thank you :)

};

const IMG_SRC =
"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24px' height='24px' viewBox='0 0 24 24' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E";

const LOADING_OPTIONS = ['auto', 'lazy', 'eager', 'unload'];

export const _default = () => {
Copy link
Member

Choose a reason for hiding this comment

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

FMI: why is this named _default? Does that do something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As a convention we name the first story _default to make it clear its one that gets default selected when you navigate to the story. It doesnt do anything special in the storybook its more just for us

the default on line 9/6 That one does some storybook internal magic and is important to be named that way

@rbeckthomas rbeckthomas merged commit 458d1d5 into ampproject:main Mar 18, 2022
@rbeckthomas rbeckthomas deleted the remove-knobs-again branch March 18, 2022 20:22
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