Skip to content

Conversation

gnclmorais
Copy link
Contributor

@gnclmorais gnclmorais commented Oct 15, 2025

Stemming from #2371, this pull request addresses the poor previews we get when sharing workshop links. Here’s a before and after on virtual workshops:

before after
Screenshot 2025-10-15 at 12 11 49 Screenshot 2025-10-15 at 21 42 19

I’m happy to take suggestions, let me know if you have ideas on how to improve this!

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request improves social media sharing previews for workshop links by enhancing OpenGraph meta tags and consolidating meta tag handling across the application.

  • Replaces basic workshop descriptions with more detailed content for better social previews
  • Consolidates meta tag rendering logic into reusable partials to reduce duplication
  • Updates localization keys for virtual workshops to be more consistent

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
config/locales/en.yml Updated localization keys and descriptions for workshop sharing previews
app/views/workshops/_meta_tags.html.haml Enhanced OpenGraph meta tags with better titles, descriptions, and event-specific metadata
app/views/virtual_workshops/show.html.haml Updated to use consolidated meta tags partial and corrected localization keys
app/views/virtual_workshops/_meta_tags.html.haml Removed duplicate meta tags partial in favor of consolidated version
app/views/layouts/application.html.haml Refactored to use conditional meta tag rendering with fallback to default tags
app/views/layouts/_meta_tags.html.haml Added default meta tags partial for pages without specific workshop context
app/views/errors/not_found.html.haml Updated to use consolidated meta tags partial
app/views/errors/error.html.haml Updated to use consolidated meta tags partial
app/mailers/virtual_workshop_invitation_mailer.rb Fixed localization key reference to match updated structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@gnclmorais gnclmorais force-pushed the improve-open-graph-meta branch from 1418402 to 0153554 Compare October 15, 2025 12:28
@gnclmorais gnclmorais requested a review from Copilot October 15, 2025 12:29
Copilot

This comment was marked as outdated.

@gnclmorais gnclmorais force-pushed the improve-open-graph-meta branch from 0153554 to 407b24e Compare October 15, 2025 12:29
@codebar codebar deleted a comment from Copilot AI Oct 15, 2025
@codebar codebar deleted a comment from Copilot AI Oct 15, 2025
@codebar codebar deleted a comment from Copilot AI Oct 15, 2025
@gnclmorais gnclmorais force-pushed the improve-open-graph-meta branch from 407b24e to d1170de Compare October 15, 2025 12:32
@codebar codebar deleted a comment from Copilot AI Oct 15, 2025
@gnclmorais gnclmorais requested a review from Copilot October 15, 2025 12:32
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

title = if workshop.virtual?
t('workshops.virtual.title_with_date', chapter: workshop.chapter.name, date: humanize_date(workshop.date_and_time))
else
t('workshop.title', host: workshop.host.name, date: humanize_date(workshop.date_and_time))
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

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

Translation key 'workshop.title' should be 'workshops.title' to match the locale file structure. The locale file shows the key under 'workshops:' not 'workshop:'.

Suggested change
t('workshop.title', host: workshop.host.name, date: humanize_date(workshop.date_and_time))
t('workshops.title', host: workshop.host.name, date: humanize_date(workshop.date_and_time))

Copilot uses AI. Check for mistakes.

end
url = request.original_url
image = workshop.host.try(:image_url).presence || image_url('codebar-social.jpg')
description = (workshop.virtual? ? t('workshops.virtual.lead') : t('workshops.lead'))
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

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

Translation key 'workshops.lead' should be 'workshop.lead' to match the locale file structure. The locale file shows 'lead' under 'workshop:' not 'workshops:'.

Suggested change
description = (workshop.virtual? ? t('workshops.virtual.lead') : t('workshops.lead'))
description = (workshop.virtual? ? t('workshops.virtual.lead') : t('workshop.lead'))

Copilot uses AI. Check for mistakes.

@gnclmorais gnclmorais force-pushed the improve-open-graph-meta branch 3 times, most recently from 1996cde to 225c2c9 Compare October 15, 2025 19:41
@codebar codebar deleted a comment from Copilot AI Oct 15, 2025
@gnclmorais gnclmorais force-pushed the improve-open-graph-meta branch from 225c2c9 to 10d64cb Compare October 15, 2025 19:59
This will improve how codebar.io links look like when shared across
social networks.

Closes codebar#2371 and codebar#2353.
Replaces that with new Open Graph meta tags.
Closes codebar#2335.
@gnclmorais gnclmorais force-pushed the improve-open-graph-meta branch from 10d64cb to 8a67ec6 Compare October 16, 2025 19:03
Copy link
Contributor

@KimberleyCook KimberleyCook left a comment

Choose a reason for hiding this comment

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

It looks so much better, thank you so much 🎉

@gnclmorais gnclmorais merged commit e8ff0e2 into codebar:master Oct 17, 2025
2 checks passed
@gnclmorais gnclmorais deleted the improve-open-graph-meta branch October 17, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants