Skip to content

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

Merged
rbeckthomas merged 6 commits intoampproject:mainfrom
rbeckthomas:remove-knobs-again
Mar 18, 2022
Merged

♻️Migrate Stories 62..65 to args#37730
rbeckthomas merged 6 commits intoampproject:mainfrom
rbeckthomas:remove-knobs-again

Conversation

@rbeckthomas
Copy link
Copy Markdown
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 amp-owners-bot bot requested a review from samouri February 18, 2022 05:39
@amp-owners-bot
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@rbeckthomas rbeckthomas requested review from dmanek and kvchari March 15, 2022 20:49
@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
layout={layout}
paint={paint}
aria-label={ariaLabel}
{...args}
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 LOADING_OPTIONS = ['auto', 'lazy', 'eager', 'unload'];

export const _default = () => {
Copy link
Copy Markdown
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
Copy Markdown
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