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

Favorite a post on town square #6181

Merged
merged 9 commits into from
Apr 1, 2020
Merged

Conversation

zoek1
Copy link
Contributor

@zoek1 zoek1 commented Mar 9, 2020

Description

Expected Behavior

  • click a star to toggle favorite post.
  • Adds to my favorites on filters (left side)

Definition of Done

  • Extend and use this favorite api PR Favorite backend #4751
  • add ability to favorite on townsquare (see location at bottom screenshot)
  • add ability to filter and see all the favorited post
  • add ability to unfavorite posts
  • post a video for core team review
Refers/Fixes

#6121

Testing

https://www.dropbox.com/s/rc7g19lk1t0wptw/2020-03-09%2005-09-33.flv?dl=0

@zoek1
Copy link
Contributor Author

zoek1 commented Mar 9, 2020

Ready for review 😃

@codecov
Copy link

codecov bot commented Mar 12, 2020

Codecov Report

Merging #6181 into master will increase coverage by 0.01%.
The diff coverage is 28.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6181      +/-   ##
==========================================
+ Coverage   27.63%   27.65%   +0.01%     
==========================================
  Files         281      281              
  Lines       26012    26037      +25     
  Branches     3831     3837       +6     
==========================================
+ Hits         7189     7201      +12     
- Misses      18559    18572      +13     
  Partials      264      264              
Impacted Files Coverage Δ
app/dashboard/models.py 49.80% <0.00%> (-0.02%) ⬇️
app/townsquare/views.py 10.37% <6.25%> (-0.38%) ⬇️
app/retail/views.py 21.22% <25.00%> (-0.14%) ⬇️
app/townsquare/models.py 57.60% <85.71%> (+0.93%) ⬆️
app/dashboard/embed.py 31.60% <0.00%> (+3.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 60c9caa...b63feac. Read the comment docs.

@octavioamu
Copy link
Contributor

Hey Zoek how is this using #4751 ?

@zoek1
Copy link
Contributor Author

zoek1 commented Mar 17, 2020

Hey @octavioamu, i looked at #4751 but it has some unnecessary things and others are already superseded by the Townsquare development.

Unnecessary:

  • All code related to adding one app only for favorite functionality

Superseded:

  • Actually the activity model has links to bounties, grants, users, kudos, etc. So linking the activity object and one user performs the same task and is more general.

Made on both PR:

  • Create a favorite model
  • Add option to add or delete favorite
  • List of favorites

@zoek1
Copy link
Contributor Author

zoek1 commented Mar 26, 2020

@danlipert @octavioamu @thelostone-mc is it possible to integrate this into the next release? @PixelantDesign

already_likes = Favorite.objects.filter(activity=activity, user=request.user).exists()
if not already_likes:
Favorite.objects.create(user=request.user, activity=activity)
if request.POST['direction'] == 'unfavorite':
Copy link
Contributor

Choose a reason for hiding this comment

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

should be else if here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done! :)

@danlipert danlipert merged commit 6b4e7f8 into gitcoinco:master Apr 1, 2020
wizzfile added a commit to wizzfile/freenet that referenced this pull request Apr 8, 2020
* Add base template for request money

* Fill tip based on request fund

* Fix update of requests

* avatar text injection opacity

* filter out new github profiles

* allow redemptions of same kudos for diff quests gitcoinco#6300 (comment)

* allow redemptions of same kudos for diff quests gitcoinco#6300 (comment)

* less sleep time between iteratings

* enables visibility filter on /hackathons

* updates stats view

* cache for an hour, make stats GA

* walle and chappie

* active subscriptoins link

* robots.txt for kudos redemptoin links

* fix for wall posts

* raw ids on phantom funds

* better caching architecture for the grants stats page

* fix for extremely strange stats page bug where chrome renders the iframe over top of the rest of the page, by inserting the iframe 100ms after page load

* fixes the caching scheme, and does a quick responsive design fix

* fixes the CLR contribution pks to be passed into a queryst

* troubleshooting docker and mac high cpu usage

Updates with one troubleshooting tip for problems with high CPU usage on mac while installing with docker and links to issues on this topic from docker's for mac repo.

* Add prizes header and hero

* fix bounty details with old cross-chain bounties 0 stdbounties id

* use redirect for 0 std bounties id

* Adds twitter handle support on gitcoin profile handles
Fixes an issue with grants contract owner address
Fixes a grant gas price issue.
fixes an issue with payout of mini clrs where some users were duplciated

* stats for clr

* handles condition in which no txid is broadcast in mini clr payout

* combines activity and description tabs

* fixes gitcoinco#6322 (comment)

* Change layout for hackathon projects

* bug: show categories even when grant has none

* fix/disable tests (ddt)

* - adds a admin comment field on actions for connnor
- updates format of dead grant mail
- adds script to check for grant contribution IP addresses to check for sybil attack

* ability to copy + schedule offer

* schedule offer copy

* hide overlay when you show the tweet modal

* Revert "hide overlay when you show the tweet modal"

This reverts commit 9643fb4.

* Revert "Revert "hide overlay when you show the tweet modal""

This reverts commit 7f1ef93.

* changes the scope of the form_disabled method

* next round start date

* grants round end time now moved to 5pm MST

* escape charset

* Fix serialization of grants for REST API

* Update sidebar_search_hackathon.html

* Favorite a post on town square (gitcoinco#6181)

* Add favorite functionality

* fix eslint

* Update views.py

* fix migrations

Co-authored-by: Dan Lipert <[email protected]>

* Add tribes to townsquare (gitcoinco#6290)

* Add tribes to townsquare

* Fix padding and mergin of buttons

* Change button style to fit CLR style button

Co-authored-by: Dan Lipert <[email protected]>

* fix stylelint

* One Click Fund Issue Link In Townsquare (gitcoinco#6156)

* Allow fund issue from posts with one issue on its content

* Fix lint

Co-authored-by: Aditya Anand M C <[email protected]>
Co-authored-by: Dan Lipert <[email protected]>

* puts searchresults objects in elasticsearch/ makes search GA (gitcoinco#6340)

* POC

* puts documents in elasticsearch

* make fix

* fix typos

Co-authored-by: Dan Lipert <[email protected]>

* fix favorite view props

* new wallee avatar by virtual-face

* better fix for view props

* kudos PKs, removes the lambo one

* respect the mint to address of the token

* fix favorites and sidebar

* fix unfavorite

* Fix serialization of grants for REST API

* adds chappie avatar

* fixes the kudos
1. rendering in frontend
2. allowing URL to be attached to token request
3. now sends an email after that kudos is minted

* fixes the countdown field in all our celery retries

* exponential backoff for kudos redemption

* changes celery multiplier to be smarter

* hotfix that makes kudos celery redemptions actually work reliably

* Typo correction that was breaking instructions.

There was an additional backtick breaking instructions on #### Docker for-mac troubleshooting section, and it has been corrected.

* fix cross chain bounty creation std_bounties_id assignment

* refactor: fixup listen_for_web3_changes

* handle case in which gitcoinbot doesnt exist'

* enable tipping on grants

* Revert "Add hackathon prizes view and projects"

* ads a new avatar

* adds new iamthembot avatar

* Revert "As a user, I would like to be able to request money from someon, so I can get paid and remind a forgetful funder."

* updates avatar

* Add looking for a team option to projects form  (gitcoinco#6348)

* Add option to looking for team members

* Add banner for hackathons

* Restored commented chat functionality on hackathon projects

* Squash migrations on dashboard

* Remove discord from project form

Co-authored-by: Dan Lipert <[email protected]>

* core: base commit for celo + zil + refactor (gitcoinco#6313)

* core: base commit for celo + zil

- update mgmt command to to cater for all cross-chain pending
  fulfillments
- refactor and move all token specific logic to it's own file
  within sync/
- remove un-used url
- update bounty creation to include celo

* set fulfillments > 5 min as expired

* add migration file

* update API wiring for ZIL

* update API wiring for celo

* update bounty creation flow

* bug: rename variable

* celo: update to support cUSD and cGLD

* fixup ZIL backend

* recreate migration

* bug: fix up celo

* Update etc.py

* fix migration

Co-authored-by: Dan Lipert <[email protected]>

* purge: remove private bounties (gitcoinco#6305)

* purge: remove private bounties

- remove BountyDocuments Table
- remove unsigned_nda/signed_nda fields from Bounty + Interest
- remove private repo code in new bounty and bounty detail (vue + jquery)
- updated Bounty serializer to remove BountyDocument and unsigned_nda
- removed images which are not used
- updated email removing private repo code
- remove bounty document upload endpoint used for signd nda upload
- remove private repo specific css
- defaulted repo type to public from frontend

* add migration + UI fixes

* add merge migration

Co-authored-by: Dan Lipert <[email protected]>

* purge: remove pricing + subscibe page (gitcoinco#6397)

Co-authored-by: Dan Lipert <[email protected]>

* bug: https://sentry.io/organizations/gitcoin/issues/1567040592

* chore: add sync_pendinf_fulfillments to cron (gitcoinco#6400)

Co-authored-by: Dan Lipert <[email protected]>

Co-authored-by: Miguel Angel G <[email protected]>
Co-authored-by: owocki <[email protected]>
Co-authored-by: federicosan <[email protected]>
Co-authored-by: Dan Lipert <[email protected]>
Co-authored-by: Aditya Anand M C <[email protected]>
Co-authored-by: octavioamu <[email protected]>
Co-authored-by: Antoine Toulme <[email protected]>
Co-authored-by: Kevin Owocki <[email protected]>
@owocki
Copy link
Contributor

owocki commented Apr 8, 2020

playing with this in prod right now. looking good!

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.

4 participants