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

CardMedia: Improve docs #50074

Merged
merged 1 commit into from
Apr 28, 2023
Merged

CardMedia: Improve docs #50074

merged 1 commit into from
Apr 28, 2023

Conversation

mirka
Copy link
Member

@mirka mirka commented Apr 25, 2023

Closes #39830

What?

Improve the docs/stories for the CardMedia component so it's clearer that it's more of a generic full-bleed container, rather than a container for "media".

Why?

It's hard to discover that this component can be used for this purpose.

Testing Instructions

npm run storybook:dev and see the new story (?path=/docs/components-card--full-bleed-content) for the Card component. Check that it is understandable.

@mirka mirka added [Type] Developer Documentation Documentation for developers [Package] Components /packages/components Storybook Storybook and its stories for components labels Apr 25, 2023
@mirka mirka requested a review from ajitbohra as a code owner April 25, 2023 19:06
@mirka mirka self-assigned this Apr 25, 2023
@mirka mirka requested review from chad1008 and mburridge April 25, 2023 19:07
@mburridge
Copy link
Contributor

Hi @mirka, thanks for this PR. I've tried testing it with npm run storybook:dev and I get an error:

[rest of local path]/node_modules doesn't exist or is not a directory

Even though the directory is most definitely there. Any idea what gives? Is there something I'm missing?

@mburridge
Copy link
Contributor

mburridge commented Apr 26, 2023

Here's some additional output from the command in case it helps:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gutenberg@15.6.2 storybook:dev: `concurrently "npm run dev:packages" "start-storybook -c ./storybook -p 50240"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gutenberg@15.6.2 storybook:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@mburridge
Copy link
Contributor

When I visit http://localhost:50240/?path=/docs/components-card--full-bleed-content I get this:

image

@mirka
Copy link
Member Author

mirka commented Apr 26, 2023

@mburridge Thanks for testing! Does it work on trunk for you? You might want to try running npm ci since it seems like your node_modules is borked.

@mburridge
Copy link
Contributor

Does it work on trunk for you?

No, I get the same problem on trunk.

You might want to try running npm ci since it seems like your node_modules is borked.

I used a fresh clone of the repo, but tried running npm ci anyway. No difference 😢

Copy link
Contributor

@mburridge mburridge left a comment

Choose a reason for hiding this comment

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

Finally got it working 🙌! LGTM.

@mirka mirka merged commit de44e44 into trunk Apr 28, 2023
@mirka mirka deleted the card-media-docs branch April 28, 2023 10:37
@github-actions github-actions bot added this to the Gutenberg 15.8 milestone Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components Storybook Storybook and its stories for components [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Card: Add story and description to highlight CardMedia usage
2 participants