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

very basic article inline card #608

Closed
wants to merge 3 commits into from
Closed

very basic article inline card #608

wants to merge 3 commits into from

Conversation

joelhooks
Copy link
Contributor

I hacked on this a bit.

The main problem currently is that prose is totally ruining the card.

image

Using the rfc tag so this won't commit until we figure that out. Probably several approaches that could work, none of them seem great to me. Ideas welcome!

@vercel
Copy link

vercel bot commented May 3, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

egghead-io-nextjs – ./

🔍 Inspect: https://vercel.com/eggheadio/egghead-io-nextjs/DQPYp87h9Ex8Q6WQVQk8cxG5Rpzr
✅ Preview: https://egghead-io-nextjs-git-jh-article-card-eggheadio1.vercel.app

egghead-next-storybook – ./

🔍 Inspect: https://vercel.com/eggheadio/egghead-next-storybook/AhGr7QGpNP9A2HHXzYTeeEFKiB29
✅ Preview: https://egghead-next-storybook-git-jh-article-card-eggheadio1.vercel.app

@MaggieAppleton
Copy link
Contributor

MaggieAppleton commented May 4, 2021

I can't help much with the component composition / card architecture but I have a fairly tight mockup for inline article cards in the Figma "Design patterns" file:

image

Feels like using our current <Card /> component is trying to fit a round peg into a square hole.
If we're going to rebuild the Card components anyway, this feels like a chance to either a) build the new architecture and then use it here, or b) build a temporary article card component that doesn't use the existing <Card />, with the assurance it'll be replaced later.

@vojtaholik
Copy link
Member

I went through several discussions regarding prose here and here and nothing really worked. tough one.

@ltclmbdev
Copy link
Contributor

ltclmbdev commented May 4, 2021

As one of the possible solutions we can set up some noProse prop to the <Card /> and conditionally apply prose classes.
And then we can do <Card className={className} noProse> inside <CardHorizontal /> that is used inside <ArticleCourseCard />. Not so elegant also though.

@joelhooks
Copy link
Contributor Author

joelhooks commented May 4, 2021 via email

@joelhooks
Copy link
Contributor Author

Feels like using our current component is trying to fit a round peg into a square hole.
If we're going to rebuild the Card components anyway, this feels like a chance to either a) build the new architecture and then use it here, or b) build a temporary article card component that doesn't use the existing , with the assurance it'll be replaced later.

I'm not addressing card architecture here at all. I'm promoting our paid product with relevant links that stand out visually with minimal effort.

Definitely not interested in dropping in YATCCC (yet another temporary content card component) implementation and would prefer reuse. The only thing holding this card back is prose. It would look great if that wasn't the case.

It's a square peg and square hole situation.

Excited to see cards get an upgrade globally though!

@joelhooks
Copy link
Contributor Author

As a temp solution I'm going to use the social share image to get these inline and close this PR.

I don't think it matters which card we use in this scenario until we figure out how to get them styled without it being a nightmare.

@Creeland can you see if there are other spots where linking to a course inline makes sense in the context of an article?

I suspect we could use the image approach pretty effectively though 🤔

Create an eCommerce Store with Next.js and Stripe Checkout

[![Create an eCommerce Store with Next.js and Stripe Checkout](https://res.cloudinary.com/dg3gyk0gu/image/upload/v1613387847/next.egghead.io/resources/create-an-ecommerce-store-with-next-js-and-stripe-checkout/card_2x.png)](https://egghead.io/courses/create-an-ecommerce-store-with-next-js-and-stripe-checkout-562c)

@joelhooks joelhooks closed this May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants