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

Add auto-generated social images for users #20193

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

benhalpern
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

This adds a generated social image for users, re-using some functionality from what we made for articles.

Related Tickets & Documents

QA Instructions, Screenshots, Recordings

Check if Uffizzi gets this right

Added/updated tests?

We encourage you to keep the code coverage percentage at 80% and above.

  • Yes
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests

@benhalpern benhalpern requested review from a team as code owners October 1, 2023 02:13
@benhalpern benhalpern requested review from maestromac and lightalloy and removed request for a team October 1, 2023 02:13
@codecov
Copy link

codecov bot commented Oct 1, 2023

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Files Coverage Δ
app/helpers/users_helper.rb 100.00% <100.00%> (ø)
app/workers/images/social_image_worker.rb 100.00% <100.00%> (ø)
...ervices/images/generate_social_image_magickally.rb 85.60% <85.71%> (ø)
...images/generate_profile_social_image_magickally.rb 58.62% <58.62%> (ø)

... and 8 files with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2023

Uffizzi Ephemeral Environment deployment-37273

☁️ https://app.uffizzi.com/github.com/forem/forem/pull/20193

📄 View Application Logs etc.

What is Uffizzi? Learn more!

Copy link
Contributor

@klardotsh klardotsh left a comment

Choose a reason for hiding this comment

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

Couple of comments I'm uncertain about. It also seems the net-new lines that aren't currently covered by tests are pretty important ones; how difficult would tests for those cases be to add here?

it "displays social image if present" do
user.profile.update(social_image: "https://socialimage.com/image.png")
get "/#{user.username}"
# Does not include the word, but does include the SVG
Copy link
Contributor

Choose a reason for hiding this comment

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

Misleading comment: This isn't an SVG. I'm also not sure what word isn't being included...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@klardotsh sorry I think these are copy/pasted comments 🙃


it "displays fallback image if social image not set" do
get "/#{user.username}"
# Does not include the word, but does include the SVG
Copy link
Contributor

Choose a reason for hiding this comment

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

What word isn't being included?

Copy link
Contributor

@klardotsh klardotsh left a comment

Choose a reason for hiding this comment

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

GitHub bot on Slack still thinks this is pending my review - my remarks about needing to update comments still stand.

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.

None yet

2 participants