-
Notifications
You must be signed in to change notification settings - Fork 107
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
fix: course image height on IOS Safari #553
fix: course image height on IOS Safari #553
Conversation
Thanks for the pull request, @Cup0fCoffee! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #553 +/- ##
=======================================
Coverage 97.36% 97.36%
=======================================
Files 155 155
Lines 1365 1365
Branches 229 229
=======================================
Hits 1329 1329
Misses 34 34
Partials 2 2 ☔ View full report in Codecov by Sentry. |
@Cup0fCoffee I'm hesitant to bring in more SCSS overrides in this repo, especially when it originates in Paragon and ideally the fix could be made there. However, I know that Learner Dashboard is stuck on v22 due to its dependency on |
@jsnwesson My initial thought process was that this fix is only applicable in this context, and adding it to Paragon would mess up other cases where these styles are used, so adding it as a custom rule made sense to me. I thought this answer is good enough, but they I had another look, and reconsidered. I found three issues and one closed PR related to the same issue:
From them I learned the following things:
So to answer your question:
To fix this issue through Paragon, it would be necessary to:
I don't see an easy solution for #1 and the rest could take quite some time. However, as a compromise, we could keep this fix local for now, to fix this issue early, and at the same time, instead of using custom styles tucked away in a SCSS file where they could get forgotten, we could add a What do you think about that? Does that address your concerns? |
@Cup0fCoffee phew, thanks for doing the digging! I completely agree that the time to make the fix in Paragon could take time, and I know there's already a blocker being experienced with getting the MFEs to v23 anyways, so the alternative fix you suggest sounds like a great compromise. |
@jsnwesson Great, I will change the implementation as soon as the client approves additional budget for the change and testing :) |
Course thumbnails on IOS Safari stretch to the full height of the image, instead of being limited by width and preserving aspect ratio. This seems to be a IOS Safari specific behavior[1]. Learner dashboard MFE uses a custom implementation of CourseCardImage, because the one in Paragon currently doesn't allow the image to be clickable. Because of that, we are fixing this issue in this repo for now, instead of fixing it in Paragon, until Paragon updates their implementation and this repo is updated to use a newer version of Paragon. 1: https://stackoverflow.com/a/44250830
9b40521
to
9a86aba
Compare
@jsnwesson I've updated the PR. |
thanks for this @Cup0fCoffee ! |
Description
Closes #265.
Course thumbnails on IOS Safari stretch to the full height of the image, instead of being limited by width and preserving aspect ratio. This seems to be a IOS Safari specific behavior[1], and can be fixed by setting height to auto, while width is set to 100%.
This issues is specific to the context of the course card, so we are fixing it by setting the height in the course card css, instead of fixing it globally in the Paragon styles, which wouldn't work in all contexts.
1: https://stackoverflow.com/a/44250830
Screenshots
Screenshots taken from an iPhone of the same course on the course dashboard before and after the fix. Course name censored for privacy.
Before
After