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

feat: Added correct image for FB sharing (master) #33784

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vladislavkeblysh
Copy link

@vladislavkeblysh vladislavkeblysh commented Nov 23, 2023

Issue

This pull request addresses the issue related to missing Open Graph (OG) image metadata in the HTML.

Context

The absence of the <meta property="og:image" /> tag was causing issues with social media sharing and previewing content. This addition ensures that the correct OG image is associated with the page for improved sharing capabilities.

Related Pull Requests

@openedx-webhooks
Copy link

openedx-webhooks commented Nov 23, 2023

Thanks for the pull request, @vladislavkeblysh!

What's next?

Please work through the following steps to get your changes ready for engineering review:

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @openedx/wg-maintenance-edx-platform. Tag them in a comment and let them know that your changes are ready for review.

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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 23, 2023
@vladislavkeblysh vladislavkeblysh marked this pull request as draft November 23, 2023 10:46
@vladislavkeblysh vladislavkeblysh marked this pull request as ready for review November 23, 2023 10:48
@vladislavkeblysh vladislavkeblysh changed the title feat: [RGOeX-26106] added correct image for FB sharing (master) feat: Added correct image for FB sharing (master) Nov 23, 2023
@vladislavkeblysh vladislavkeblysh marked this pull request as draft November 23, 2023 10:54
@mphilbrick211
Copy link

Hi @vladislavkeblysh! Just checking in to see if you plan to pursue this pull request?

@vladislavkeblysh
Copy link
Author

@mphilbrick211 Of course. Thanks for the reminder

@vladislavkeblysh
Copy link
Author

@mphilbrick211 Hi! PR ready for review

@mphilbrick211
Copy link

@mphilbrick211 Hi! PR ready for review

Thanks, @vladislavkeblysh!

@mariajgrimaldi
Copy link
Member

Hi there, @vladislavkeblysh! Thanks for the fix. Could you add testing instructions to the PR cover letter so it's easier for reviewers?

@cmltaWt0 cmltaWt0 added the product review PR requires product review before merging label Feb 8, 2024
og_img_url = "{protocol}://{domain}{path}".format(
protocol=site_protocol,
domain=site_domain,
path=course_image_urls['large']
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this handle the case where the course doesn't have an image set?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @pdpinch
If the course doesn't have the image set - then it falls back to the default (copied from common.py lms's settings):

DEFAULT_COURSE_ABOUT_IMAGE_URL = 'images/pencils.jpg'

You can check the def image_urls(self) property from the CourseOverview model for details on how the course_image_urls dict is populated.

In other words - the handling is the same as for the course image on the course about page.

@jmakowski1123 jmakowski1123 added the bug Report of or fix for something that isn't working as intended label Mar 11, 2024
@jmakowski1123
Copy link

This is fine from a product pov

@dyudyunov
Copy link
Contributor

Hi there, @vladislavkeblysh! Thanks for the fix. Could you add testing instructions to the PR cover letter so it's easier for reviewers?

Hi @mariajgrimaldi
Sorry for the delayed response, I found this PR just 15 minutes ago 😔

This fix was developed a long time ago and I might miss some details, but here is how I believe it could be tested:

On the course about page click on the "share" button:
image

Check the result with/without the fix:
before (the favicon is used for the image or no image at all)
image

after (course image is presented)
image

Note: it could take some time for FB crawlers to update the sharing info

@mphilbrick211 mphilbrick211 added product review complete PR has gone through product review and removed product review PR requires product review before merging labels May 10, 2024
@mphilbrick211 mphilbrick211 added product review PR requires product review before merging product review complete PR has gone through product review and removed product review complete PR has gone through product review product review PR requires product review before merging labels Jul 31, 2024
@ihor-romaniuk ihor-romaniuk force-pushed the keblysh/feat/correct-image-for-fb-sharing branch from 4fc3445 to 21d30a8 Compare August 13, 2024 13:13
@mphilbrick211 mphilbrick211 added needs reviewer assigned PR needs to be (re-)assigned a new reviewer and removed needs reviewer assigned PR needs to be (re-)assigned a new reviewer labels Aug 23, 2024
@ihor-romaniuk ihor-romaniuk force-pushed the keblysh/feat/correct-image-for-fb-sharing branch from 21d30a8 to 735024b Compare September 3, 2024 15:17
@ihor-romaniuk ihor-romaniuk force-pushed the keblysh/feat/correct-image-for-fb-sharing branch from 735024b to 11ea04b Compare December 3, 2024 09:14
@ihor-romaniuk
Copy link
Contributor

Hello everyone,
It seems our pull request for the fix might be a bit stuck in the review process. Would someone be able to take a look at it when they have a moment?
Thank you so much for your time and help!

@mphilbrick211 mphilbrick211 added the needs reviewer assigned PR needs to be (re-)assigned a new reviewer label Dec 3, 2024
@ihor-romaniuk ihor-romaniuk force-pushed the keblysh/feat/correct-image-for-fb-sharing branch from 11ea04b to 7f0692d Compare December 11, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of or fix for something that isn't working as intended needs reviewer assigned PR needs to be (re-)assigned a new reviewer open-source-contribution PR author is not from Axim or 2U product review complete PR has gone through product review
Projects
Status: Ready for Review
Development

Successfully merging this pull request may close these issues.

9 participants