adobe / aio-theme

The Adobe I/O theme for building markdown powered sites
Apache License 2.0
72 stars 43 forks source link

Minicard component issues and features fixes #1528

Open timkim opened 1 year ago

timkim commented 1 year ago

Minicard component has some css issues (errors and needs some features), adding text content as optional and also make the whole card as a link.

No semi-colon here: https://github.com/adobe/aio-theme/blob/c293c01ac7340e498dacb6cb0716f8406638fb83/packages/gatsby-theme-aio/src/components/MiniResourceCard/index.js#L67

Results in the height not being set properly.

Text content should be option-able. This check will fail and throw an error if no text content is present: https://github.com/adobe/aio-theme/blob/c293c01ac7340e498dacb6cb0716f8406638fb83/packages/gatsby-theme-aio/src/components/MiniResourceCard/index.js#L103C9-L103C9

The https://github.com/AdobeDocs/express-for-developers/ has a use-case of using the Minicard component without text body: https://github.com/AdobeDocs/express-for-developers/blob/main/src/pages/index.md?plain=1#L80

The whole card should act as a link. May need another variant to support this as only the image is clickable.

BaskarMitrah commented 1 year ago

Hi @timkim I've fixed the issue on the Minicard component. I checked with/without text now it's working fine. This is the PR for that.