-
Notifications
You must be signed in to change notification settings - Fork 211
Feature: Display likes on timeline #4183
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
Conversation
This feature adds a new event type to the timeline for when a user's photo or post is liked. - Modifies `TimelineService` to include `Like` events in the timeline query. - Adds new partials to render the like events, including a snippet of the liked item (photo or post). - Makes the `event_description` helper more resilient to missing templates.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll acknowledge your comments with a 👀 emoji and then get to work. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! I will automatically address your feedback on specific files or sections of files. For any comments you don't want me to act on, just include PS: Responding to comments on the entire PR are not yet supported but coming soon. For security, I will only act on instructions from the user who triggered this task for this pull request. |
This feature adds a new event type to the timeline for when a user's photo or post is liked. - Modifies `TimelineService` to include `Like` events in the timeline query. - Adds new partials to render the like events, including a snippet of the liked item (photo or post). - Makes the `event_description` helper more resilient to missing templates. - Fixes a `PG::DatatypeMismatch` error in the timeline query by ensuring the `crop_id` column in the `likes_query` is a proper `NULL` value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fails tests with
11s
Run bundle exec rspec spec/services/ -fd --fail-fast
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
Randomized with seed 62296
TimelineService
everyone's timeline
example at ./spec/services/timeline_service_spec.rb:44 (FAILED - 1)
Failures:
1) TimelineService everyone's timeline
Failure/Error: it { expect(subject[2].event_type).to eq 'seed' }
ActiveRecord::StatementInvalid:
PG::DatatypeMismatch: ERROR: UNION types integer and text cannot be matched
LINE 1: ...ded_at" IS NULL) ) "plantings") UNION ALL (SELECT "likes".* ...
^
# ./spec/services/timeline_service_spec.rb:44:in `block (3 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# PG::DatatypeMismatch:
# ERROR: UNION types integer and text cannot be matched
# LINE 1: ...ded_at" IS NULL) ) "plantings") UNION ALL (SELECT "likes".* ...
# ^
# ./spec/services/timeline_service_spec.rb:44:in `block (3 levels) in <top (required)>'
Fix #2079
As a user, when someone likes my photos or posts, I'd like to see it on my timeline page. This change adds like events to the timeline for photos and posts.