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

[BD-46] feat: Added fallback props to Card component #1682

Conversation

PKulkoRaccoonGang
Copy link
Contributor

@PKulkoRaccoonGang PKulkoRaccoonGang commented Oct 11, 2022

Description

  • add fallbackSrc prop to the Card.ImageCap component, use this url for image if image from the src prop does not load;
  • add fallbackLogoSrc prop to Card.ImageCap component, use this url for logo if image from the logoSrc prop does not load;
  • add tests for these changes and examples on the component's page;
  • fixed key error in ExamplePropsForm.jsx.

Deploy Preview

Cards component

Merge Checklist

  • If your update includes visual changes, have they been reviewed by a designer? Send them a link to the Netlify deploy preview, if applicable.
  • Does your change adhere to the documented style conventions?
  • Do any prop types have missing descriptions in the Props API tables in the documentation site (check deploy preview)?
  • Were your changes tested using all available themes (see theme switcher in the header of the deploy preview, under the "Settings" icon)?
  • Were your changes tested in the example app?
  • Is there adequate test coverage for your changes?
  • Consider whether this change needs to reviewed/QA'ed for accessibility (a11y). If so, please add wittjeff and adamstankiewicz as reviewers on this PR.

Post-merge Checklist

  • Verify your changes were released to NPM at the expected version.
  • If you'd like, share your contribution in #show-and-tell.
  • 🎉 🙌 Celebrate! Thanks for your contribution.

@openedx-webhooks openedx-webhooks added the blended PR is managed through 2U's blended developmnt program label Oct 11, 2022
@openedx-webhooks
Copy link

Thanks for the pull request, @PKulkoRaccoonGang!

When this pull request is ready, tag your edX technical lead.

@netlify
Copy link

netlify bot commented Oct 11, 2022

Deploy Preview for paragon-openedx ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b4fa0a9
🔍 Latest deploy log https://app.netlify.com/sites/paragon-openedx/deploys/634bfe3507e345000871276f
😎 Deploy Preview https://deploy-preview-1682--paragon-openedx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@viktorrusakov viktorrusakov linked an issue Oct 11, 2022 that may be closed by this pull request
@PKulkoRaccoonGang PKulkoRaccoonGang force-pushed the Peter_Kulko/add-fallback-props-to-Card-component branch 2 times, most recently from cf74c50 to 6382680 Compare October 11, 2022 20:23
@codecov
Copy link

codecov bot commented Oct 11, 2022

Codecov Report

Base: 90.36% // Head: 90.40% // Increases project coverage by +0.04% 🎉

Coverage data is based on head (b4fa0a9) compared to base (5013f9a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1682      +/-   ##
==========================================
+ Coverage   90.36%   90.40%   +0.04%     
==========================================
  Files         208      208              
  Lines        3580     3587       +7     
  Branches      838      840       +2     
==========================================
+ Hits         3235     3243       +8     
+ Misses        330      329       -1     
  Partials       15       15              
Impacted Files Coverage Δ
src/Card/CardImageCap.jsx 100.00% <100.00%> (+7.14%) ⬆️
src/utils/propTypes/greaterThan.js 83.33% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@PKulkoRaccoonGang PKulkoRaccoonGang force-pushed the Peter_Kulko/add-fallback-props-to-Card-component branch 3 times, most recently from 548dc07 to e9185bd Compare October 11, 2022 22:47
@PKulkoRaccoonGang PKulkoRaccoonGang force-pushed the Peter_Kulko/add-fallback-props-to-Card-component branch from e9185bd to 4ec127e Compare October 11, 2022 22:57
@viktorrusakov viktorrusakov force-pushed the Peter_Kulko/add-fallback-props-to-Card-component branch from 183d444 to 8750277 Compare October 14, 2022 07:59
Copy link
Member

@adamstankiewicz adamstankiewicz left a comment

Choose a reason for hiding this comment

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

Nice! LGTM.

@adamstankiewicz
Copy link
Member

@PKulkoRaccoonGang D'oh, I spoke too soon. I just realized the CI is failing on linting. Code changes look good though! That said, are these additional props something we can add tests for, too?

@viktorrusakov
Copy link
Contributor

@adamstankiewicz true, added new tests and fixed linting issues, should be good to go now!

@adamstankiewicz
Copy link
Member

@adamstankiewicz true, added new tests and fixed linting issues, should be good to go now!

Thanks @viktorrusakov!

@adamstankiewicz adamstankiewicz merged commit c0a1f6c into openedx:master Oct 19, 2022
edx-semantic-release pushed a commit that referenced this pull request Oct 19, 2022
# [20.14.0](v20.13.0...v20.14.0) (2022-10-19)

### Features

* Added fallback image src props to Card component ([#1682](#1682)) ([c0a1f6c](c0a1f6c))
@edx-semantic-release
Copy link
Contributor

🎉 This PR is included in version 20.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blended PR is managed through 2U's blended developmnt program released
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add "fallbackImg" prop to Card
5 participants