-
Notifications
You must be signed in to change notification settings - Fork 927
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
Modify the way "Friends" are added #5261
base: master
Are you sure you want to change the base?
Modify the way "Friends" are added #5261
Conversation
e1a1b87
to
8393857
Compare
Thank you for the review. This PR was updated according to recommendations. |
8393857
to
02bede7
Compare
Generated by 🚫 Danger |
PR was updated. Now friendship controller and model are refactored to be named as "follow" and also implement standard CRUD architecture using |
02bede7
to
36fba94
Compare
36fba94
to
5c9c7b8
Compare
5c9c7b8
to
a153faf
Compare
<%= link_to t(".remove as friend"), remove_friend_path(:display_name => @user.display_name), :method => :post %> | ||
<%= link_to t(".unfollow"), follow_path(:display_name => @user.display_name), :method => :delete %> | ||
<% else %> | ||
<%= link_to t(".add as friend"), make_friend_path(:display_name => @user.display_name), :method => :post %> | ||
<%= link_to t(".follow"), follow_path(:display_name => @user.display_name), :method => :post %> |
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.
This doesn't quite work. There's a link that points to /user/.../follow
. I can try to open it in a new tab and it won't work because the page doesn't exist. The page is at .../edit
but you can't change the link to .../edit
because you can't post/delete it. Looks like that out of options in #5261 (comment) :show
would have worked the best, especially if you agree with #5449 (comment).
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.
My thought was to use :edit
as the functionality was focused on editing but not showing information about follows
. But as #5449 (comment) suggests, if we use :show
also as edit page where it is possible, I will change it accordingly. I thought your comment meant to use standard Singular Resource
routes in general, not :show
in particular.
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.
I wanted to say that singular resources don't have :index
.
follow: | ||
heading: "Do you want to follow %{user}?" | ||
button: "Follow User" | ||
unfollow: | ||
heading: "Do you want to unfollow %{user}?" | ||
button: "Unfollow" |
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.
Why one of the buttons is "Follow User" but another one is just "Unfollow"?
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.
I tried to stick to the formulations from the friendship
and as they were button: "Add as friend"
and button: "Unfriend"
, I changed them to button: "Follow User"
and button: "Unfollow"
accordingly.
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.
Of course you wouldn't write "Unfriend as friend" (as opposed to "Add as friend"), but you can write "Unfollow User".
This PR addresses "Modify the way 'Friends' are added" issue mentioned in #3310
This PR replaces all occurrences of "friends" to "followers", including texts, tests and URLs.
This PR was not broken down to smaller pieces to maintain consistency and avoid different names of the same functionality.