Closed
Bug 1011295
Opened 11 years ago
Closed 11 years ago
Makes view heart/like display in profile-2
Categories
(Webmaker Graveyard :: Profile, defect)
Webmaker Graveyard
Profile
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: akirose, Assigned: Tanay, Mentored)
References
Details
Attachments
(1 file)
(per cassie at https://projects.invisionapp.com/d/main#/console/1049631/23348262/comments/12414827)
- If a make has no likes, heart should be empty and not have a zero by it
- If a user has liked it, it should be full.
- If user has not liked it but other people have, the heart should be empty but there should be a count displayed next to it.
Assignee | ||
Comment 1•11 years ago
|
||
Hi Aki, from where are the images (heart) imported, makerstrap? Could you please give me a link?
Flags: needinfo?(aki)
Assignee | ||
Comment 2•11 years ago
|
||
Changes have to be made here: app/_less/views/makes.less and here: app/_partials/makes-list.html
Would it be something like:
<span class="make-likes" ng-if="make.likes.length">{{ make.likes.length }}</span>
<span class="make-likes-empty" ng-if="{{ make.likes.length === 0 }}"></span>
And in makes.less:
.make-likes-empty {
margin-right: 1rem;
&::before {
.fa-mixin();
color: @brand-primary;
content: @fa-var-heart-0;
font-weight: 300;
margin-right: 0.5rem;
&:hover {
font-weight: 700;
}
}
}
Reporter | ||
Comment 3•11 years ago
|
||
The complication here is that we need to check if the user has liked it. (In retrospect, can a user like their own makes?)
If the user-liking-their-own-make-part isn’t an issue, I think actually something like this would work (but you should test to be sure)
<span class="make-likes" ng-if="make.likes.length">{{ make.likes.length }}</span>
<span class="make-likes-empty" ng-if="!make.likes.length"></span>
Flags: needinfo?(aki) → needinfo?(gavin)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8467683 -
Flags: review?(aki)
Assignee | ||
Updated•11 years ago
|
Attachment #8467683 -
Flags: review?(gavin)
Comment 5•11 years ago
|
||
I can't see anything following the Invision link. Can we put what was there on Redpen?
Flags: needinfo?(cassie)
Reporter | ||
Comment 6•11 years ago
|
||
I un-archived the Invision project so I could find the comment: http://snaps.akibraun.com/vphxl.png
Flags: needinfo?(cassie)
Reporter | ||
Updated•11 years ago
|
Assignee: nobody → tanay1337
Mentor: aki
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: [profile2]
Assignee | ||
Comment 7•11 years ago
|
||
I think the previous pull request achieves half of what was required, as Aki said, "The complication here is that we need to check if the user has liked it. (In retrospect, can a user like their own makes?)".
Dont know how to implement to check if a user had liked a make, other than this feature, other points stated in the bug have been taken care of.
Flags: needinfo?(aki)
Reporter | ||
Comment 8•11 years ago
|
||
Comment on attachment 8467683 [details] [review]
https://github.com/mozilla/webmaker-profile-2/pull/67
Just a couple of small changes, left some notes on your pull request!
Attachment #8467683 -
Flags: review?(gavin)
Attachment #8467683 -
Flags: review?(aki)
Attachment #8467683 -
Flags: review-
Flags: needinfo?(aki)
Reporter | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•11 years ago
|
Attachment #8467683 -
Flags: review- → review?(aki)
Reporter | ||
Updated•11 years ago
|
Attachment #8467683 -
Flags: review?(aki) → review+
Comment 9•11 years ago
|
||
Commits pushed to master at https://github.com/mozilla/webmaker-profile-2
https://github.com/mozilla/webmaker-profile-2/commit/e53385691bf69a205832efd596f43cf1ade22faf
For Bug 1011295
For Bug 1011295
For Bug 1011295
https://github.com/mozilla/webmaker-profile-2/commit/5d2f527a5fbbdac8239ddab41c7542a8c1f3e50d
Merge pull request #67 from tanay1337/master
Bug 1011295 - Makes view heart/like display in profile-2
Reporter | ||
Comment 10•11 years ago
|
||
Tanay: While this is a perfect interim solution, I think I answered my own question. We need to grab the user object and figure out the current user's likes, then match them up with the makes on the profile they are viewing at any given moment. From there, the flow should be…
: While logged in to webmaker
1. I visit someone's profile other than my own, such as https://webmaker.org/user/keyboardkat
2. Any Make that I have not liked should have an empty heart, even if it has been liked by others
-> caveat: the number "0" should never render
3. The heart should be a link, triggering the like/unlike method for myself
4. Upon clicking the heart to like, the number next to it should increment and the heart should fill
-> to click a filled heart to unlike, the number next to it should decrement and the heart should toggle to open (@fa-var-heart-o)
Assignee | ||
Comment 11•11 years ago
|
||
Sorry, but I don't think that I would be able to complete the next phase of this bug, since I am not a JS programmer. Assigning it to you.
Assignee | ||
Updated•11 years ago
|
Assignee: tanay1337 → aki
Comment 12•11 years ago
|
||
Not sure if you still needinfo? Clearing this flag, but feel free to re-flag.
Flags: needinfo?(gavin)
Reporter | ||
Comment 13•11 years ago
|
||
Reassigning to default for now. Comment #10 has the general instructions for solving this bug, but I won't be able to get to it for a while.
Assignee: aki → nobody
Status: ASSIGNED → NEW
Reporter | ||
Updated•11 years ago
|
Assignee: nobody → tanay1337
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•