-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
Grants round 6 integration branch #6819
Merged
Merged
Changes from all commits
Commits
Show all changes
202 commits
Select commit
Hold shift + click to select a range
1ebd037
updating r6 calculations, ripping out stuff, adding in last round com…
frankchen07 d9d20c7
removed unused code
frankchen07 ea13ec8
add pulling the correct current and previous CLR data
frankchen07 f2b0fb8
clr.py
frankchen07 0b47e18
Wire up an Add To Cart button on the grant page
apbendi 8f14c72
Pass various grant details to frontend via hidden form inputs
apbendi 423d285
Add grant data to local storage button is pressed
apbendi 29847de
Add /grants/cart route
mds1 08918ee
Working vue component that shows value of a variable
mds1 da46c3b
Setup heading section
mds1 5c8e3c4
Initial setup of grants cart layout
mds1 5457fd4
Various tweaks and additions to the cart page
mds1 f2fef8d
Update cart header/footer content
mds1 8565fb9
Cart now reads data from local storage
mds1 3ff9575
Add input fields that user can adjust
mds1 6f71f6e
Add total and summary sections
mds1 30af51d
Add button to fund grants in cart
mds1 71eae51
Change default amount to 1 DAI
mds1 0439044
Change how recurring donations are handled/displayed, fix UI bug
mds1 8d6580a
Add ability to clear cart or remove one item
mds1 cc43f58
Add watcher to sync Vue state with localStorage, small fixes/cleanup
mds1 610d8f1
Initial Changes to Grant Details UI
apbendi feb506b
Move Grant info to right of logo on detail screen
apbendi 6c345d8
Responsive tweaks for the updated grant detail screen
apbendi b4cbc84
Implement Side Cart UI mechanics with dummy data
apbendi 82cb676
Render side cart rows based on data actually in cart
apbendi b68f831
Implement delete from side cart functionality
apbendi 65b54ef
Update donation amount when edited in side cart
apbendi 65ed8ab
Update currency when changed in side cart
apbendi 28f15ef
Add checkout button to side cart
apbendi 45fccc1
Capitlize butotn text; widen amount input
apbendi 165b422
Fix minor display bug on grant details
apbendi 9345988
add sidebar_search.html
sebastiantf 6cd1f59
modify search field
sebastiantf b61f48a
get and pass all subcategories to template
sebastiantf 6415c28
create filter: get_categories_from_list
sebastiantf 2cce0e1
replace old with new nav in sidebar_search.html
sebastiantf 0e7b55c
create, use updateMultipleParams for sidebar nav
sebastiantf 96d1ce7
misc style changes for sidebar
sebastiantf b120812
z-index for sidebar search cancel button
sebastiantf 5e18894
expand, minimize for sidebar on mobile
sebastiantf cdbd60a
remove border-bottom for sidebar nav, a.selected
sebastiantf 5538e8b
hide original navbar and subnav:
sebastiantf 0b0a8ea
style changes for Sort By:
sebastiantf 61518ab
modify landing_clr design
sebastiantf fc15228
add info-box
sebastiantf ce12944
add cart-btn to info-box
sebastiantf 81d9ab6
add cart-btn in Grant card
sebastiantf 1e1cc38
add Do You Know info-box in sidebar
sebastiantf 9c93d3e
misc style changes
sebastiantf 221afc0
remove filter-tags
sebastiantf 557403f
add TODOs
sebastiantf e380e21
Minor style adjustments on grant details page
apbendi 8eb38fc
Implement Responsive 'Side Cart'
apbendi d2ff306
Improved responsiveness on Grant Details page w/ side cart open
apbendi c210579
add extra links to sidebar
sebastiantf a63c018
Prepare and send transaction data
mds1 a5222ca
Setup placeholder for token-selection dropdown
mds1 2a6876d
Add token approvals, use estimateGas on donate() call
mds1 06f3e7e
Get ETH donations working with test donation address
mds1 008bf15
Update Rinkeby DAI address to use the official Maker address
mds1 fdaa852
Working initial version of the full checkout flow
mds1 66b39f5
Add comments, remove redundant code
mds1 618f14a
Small changes and improvements
mds1 fc3fae4
Update tokens to use global token_abi instead of local version
mds1 e5fb631
Update dev grant address to recycle rinkeby ETH/DAI
mds1 5c1cbfc
Use economy token model for token dropdown
mds1 03a14e0
Add error handling during checkout
mds1 06ab31c
Use BN for math, fix destination address, cleanup comments
mds1 7d13344
Fix indentation of grants index template
apbendi 0eeec9f
Add to cart functionality for Grant Details cards
apbendi 18490ca
Implement the side cart on Grant List page
apbendi a070d71
Populate tokens in side cart from global list of tokens
apbendi 371ed3c
Filter side cart token options by what the grantee accepts
apbendi 0f34580
Defensive check for invalid data stored in grants_cart localStorage
apbendi 14e431e
Don't show Add To Cart for team grants on list page
apbendi d8306c6
Uncomment kudos CSS and avoid unneeded classes on grants list
apbendi 8176b25
Remove unneeded div tag
apbendi 9c62474
Make gitcoin donation subtractive (was additive)
mds1 87b3021
Allow gitcoin donation factor to be adjusted
mds1 98fd75c
Modularize cart logic
mds1 f46411e
Add gas estimate heuristic and setup for improved tx flow
mds1 68f1327
Only show grant-approved tokens in cart token dropdown
mds1 363f029
Change approvals from max uint to only the required amount
mds1 08c0a95
Improve UX of MetaMask checkout flow
mds1 86b8c12
Update cart to display max possible number of transactions
mds1 f2328b7
add /3 calculation, add proper var names, add separate db call and po…
frankchen07 ffe3986
Remove type column
mds1 a53ea06
Require GitHub login to checkout
mds1 1f7fde7
Support hide_wallet_address
mds1 ce8a4ce
Merge remote-tracking branch 'upstream/master' into frank-stable
thelostone-mc e741ec5
chore: cleanup
thelostone-mc b3d2ce8
Workable Scrolling Mechanics For Side Cart
apbendi 6d2ae22
Add Link To Old Fund Page For Recurring
apbendi 54eebfa
Refactor cart data access and add cart navigation item
apbendi db7b118
Use static cart methods when interacting with the side cart
apbendi 95ba25b
Use static cart methods when interacting with the cart page
apbendi 74a5dd8
Improve mobile formatting
mds1 cd25aaf
Add support for comments
mds1 90865f4
Add sms verification process
zoek1 d57981b
inverted logic
owocki 5feb545
Merge branch 'ScopeLift/bulk-grants' into grants-round-6-integration
owocki fb424e0
FIx logic error on phone type validation
zoek1 d5c3af1
crypto for change categories
owocki 693c470
cart title
owocki 393fc4d
grants stuff
owocki 99f2374
do not track
owocki 7fe70e8
adds ability to re-contribute to all the grants ive contributed to in…
owocki 7497a2b
renames media to community
owocki 407556e
make community round media round, remove negative voting, move recurr…
owocki 0d39a10
Add validation avoid duplicated phone numbers
zoek1 0bf2d57
Delete unused module
zoek1 11205f7
Ensure header cart shows regardless of trailing slash in path
apbendi 772689c
Use a delegated event handler to ensure add to cart works on infinite…
apbendi 22005ea
Configure working POST requests
mds1 34a6355
Update cart header section formatting
mds1 22ba880
Add success alert and redirect after checkout
mds1 e533f91
Remove donations of zero value
mds1 628183f
Update grant image on header
mds1 85bcaaa
Block donations if user has insufficient ETH/token balances
mds1 d7d8a88
Clear cart after checkout
mds1 46c00c0
Remove console.logs, auto-format html, small CSS updates
mds1 22b94d7
Checkout bot now updates based on gitcoin donation percentage
mds1 73013c9
UX tweaks
mds1 f1e32cf
Ensure post-grant banner has right number of grants + redirect to Rin…
apbendi 45afc3a
modal after checkout
owocki 09be68d
adds ability to bulk add to cart a bunch of grants
owocki bffc696
https://github.com/gitcoinco/web/issues/6318
owocki e333d06
setup web preview url
sebastiantf 74e5fc1
implement render_grant_recontribute
sebastiantf 972104b
build template for grant_recontribute_email
sebastiantf 6e1ed3b
management command for grant_recontribute_email
sebastiantf 7a4ef6c
change #preferred_payout a color to blue
sebastiantf b794c2d
change match_pool to 175k
sebastiantf d387cfb
add bulk_add_url
sebastiantf daef9d8
updates from thursday standup
owocki d8af62e
Final working POST request implementation
mds1 65564b1
Remove unused scripts from cart-vue.html
mds1 beb70c0
Configure hyperlink for cart 'Read how this works' text
mds1 06e18e2
Remove link to recurring funding page
apbendi bcbd187
Expand width of activity feed on grant detail page
apbendi 2b901b6
Merge remote-tracking branch 'ScopeLift/bulk-grants' into grants-roun…
owocki 0918870
Merge remote-tracking branch 'upstream/grants-round-6-integration' in…
mds1 91806f9
fixes bugs with merging master into integration-to-master
owocki 57c3c3c
a handful of small tweaks, fund.js/fund.html removed, added esc bindi…
owocki 15d85f5
re-add cart
owocki 9ad9cba
make fix, cart login fix
owocki ded7bfa
allows anyone to post a grant without having to pay gas fees
owocki e76f9b4
method that says iff recurring funding is supported
owocki 48ee68d
Update GRANTS.md for round 6
mds1 6368cfd
Dynamic gitcoin contribution value, center header img, fix syntax error
mds1 1fab057
Various small cart improvements:
mds1 91b8180
Fix image height for Safari, cart now defaults to mainnet
mds1 0c5eca7
Prompt user to login with web3 at checkout if necessary
mds1 ddce902
Fix syntax
mds1 41193f8
resolve conflicts
thelostone-mc 629bdc8
Add salt for passwords and fix display modal
zoek1 6d42848
Remove logs
zoek1 3c9431c
fix error
thelostone-mc 9aa4c98
create merge migration
thelostone-mc 735bd5e
add in changes for change + matic grants
thelostone-mc 22be481
Clean migration for sms
zoek1 1a616ee
fix broken CLR
thelostone-mc 561cc2f
remove -ve contribution text
thelostone-mc c2c469d
fix up indentation
thelostone-mc 4be022b
indent side-cart.html
thelostone-mc 0fe0e8e
Update clr.py
thelostone-mc bc6a823
Update crontab
thelostone-mc e470cdf
fix lint
thelostone-mc 86fe35e
syntax
owocki ce5a194
fixes the bulk checkout gbug
owocki 33875a9
Initial working implementation of showing CLR match in cart
mds1 0a33a2e
Fix bool comparation and add verification link
zoek1 da90d05
Merge pull request #6839 from zoek1/fix/grants-salt-and-modal
owocki fbce992
Merge remote-tracking branch 'ScopeLift/various-updates' into grants-…
owocki 197dae4
Merge branch 'kevin/validate_grants_txns' into grants-round-6-integra…
owocki 0e84b30
Merge remote-tracking branch 'sebastianf/recontribute-grants-email' i…
owocki 76deabb
Cart CLR estimate now accounts for token selection
mds1 d514693
Merge pull request #6843 from ScopeLift/cart-clr-estimate
owocki d62104e
Merge remote-tracking branch 'origin/frank-stable' into grants-round-…
owocki e817fbc
Merge branch 'grants-round-6-integration' of github.com:gitcoinco/web…
owocki 4be7578
template issue
owocki 69c9071
template issue
owocki a7c3cc9
validation issues
owocki 329702b
make fix
owocki d25a82c
Merge branch 'kevin/privacy' into grants-round-6-integration
owocki 83a3810
missing migration
owocki 5823d76
Fix display modal when use click the link
zoek1 cb15559
offline verification
owocki 2796833
clr DRY + bugfix
owocki 317faa4
Merge pull request #6844 from zoek1/fix/verif-modal
owocki a06538a
fixes https://github.com/ScopeLift/gitcoin-web/issues/81
owocki 0abb49c
fix for cart
owocki 0bff1b9
linter
owocki 6c3ac72
Fix computations for small numbers, show 0 CLR if not verified
mds1 cd5576f
Merge pull request #6845 from ScopeLift/cart-fixes
owocki 982711e
fix for https://github.com/ScopeLift/gitcoin-web/issues/76 + adds plu…
owocki cc6831c
make phone number contributiosn optionaL
owocki 7e2a725
copy updates
owocki 84c480e
make fix
owocki ccc8286
make fix"
owocki dafb4e0
Merge branch 'master' into grants-round-6-integration
owocki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import random | ||
|
||
from django.conf import settings | ||
|
||
from app.settings import account_sid, auth_token | ||
from redis import Redis | ||
from twilio.rest import Client | ||
|
||
|
||
class RedisService: | ||
__redis = None | ||
|
||
def __new__(cls): | ||
if not hasattr(cls, 'instance'): | ||
cls.instance = super().__new__(cls) | ||
return cls.instance | ||
|
||
def __init__(self): | ||
if not RedisService.__redis: | ||
redis_url = settings.CELERY_BROKER_URL | ||
RedisService.__redis = Redis.from_url(redis_url) | ||
|
||
@property | ||
def redis(self): | ||
return RedisService.__redis | ||
|
||
|
||
class TwilioService: | ||
_client = None | ||
_service = None | ||
|
||
def __new__(cls): | ||
if not hasattr(cls, 'instance'): | ||
cls.instance = super().__new__(cls) | ||
return cls.instance | ||
|
||
def __create_connection(self): | ||
redis = RedisService().redis | ||
|
||
if not TwilioService._client: | ||
TwilioService._client = Client(account_sid, auth_token) | ||
friendly_names = settings.TWILIO_FRIENDLY_NAMES | ||
friendly_name = random.choice(friendly_names) | ||
TwilioService._service = TwilioService._client.verify.services.create(friendly_name=friendly_name) | ||
redis.set(f"validation:twilio:sid", TwilioService._service.sid) | ||
|
||
def __init__(self): | ||
self.__create_connection() | ||
|
||
@property | ||
def lookups(self): | ||
return TwilioService._client.lookups | ||
|
||
@property | ||
def verify(self): | ||
redis = RedisService().redis | ||
sid = redis.get(f"validation:twilio:sid") | ||
return TwilioService._client.verify.services(sid.decode('utf-8')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
.container { | ||
display: flex; | ||
align-items: center; | ||
flex-direction: column; | ||
justify-content: center; | ||
max-width: 800px; | ||
} | ||
|
||
.separator { | ||
border-top-color: var(--text-light); | ||
border-top-style: solid; | ||
border-top-width: 1px; | ||
display: block; | ||
margin: 1rem 0 2rem; | ||
} | ||
|
||
.flex-container { | ||
width: 100%; | ||
display: -webkit-flex; | ||
display: flex; | ||
justify-content: space-between; | ||
-webkit-justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
.flex-container-left { | ||
width: 100%; | ||
display: -webkit-flex; | ||
display: flex; | ||
justify-content: start; | ||
-webkit-justify-content: start; | ||
align-items: left; | ||
} | ||
|
||
.grant-header-row { | ||
padding: 1rem 0rem; | ||
width: 100%; | ||
} | ||
|
||
.grant-row { | ||
width: 100%; | ||
} | ||
|
||
.grant-row-style { | ||
background-color: var(--gc-grey); | ||
border-color: var(--text-light); | ||
border-radius: 5px; | ||
border-style: solid; | ||
border-width: 1px; | ||
margin-bottom: 1rem; | ||
padding: 1rem; | ||
} | ||
|
||
.cart-section { | ||
padding: 0rem 1rem; | ||
} | ||
|
||
.grant-name { | ||
font-weight: bold; | ||
/* margin-left: 0.5rem; */ | ||
} | ||
|
||
.clr-match-box { | ||
background-color: rgba(15, 206, 124, 0.1); | ||
border: 1px rgba(15, 206, 124, 0.1) solid; | ||
border-radius: 5px; | ||
padding: 0.5rem 1rem; | ||
} | ||
|
||
.black { | ||
color: black; | ||
} | ||
|
||
.medium-dark-gray { | ||
color: var(--gc-medium-dark-gray); | ||
} | ||
|
||
.darker-grey { | ||
color: var(--gc-darker-grey); | ||
} | ||
|
||
.hyperlink { | ||
color: var(--link-color); | ||
cursor: pointer; | ||
} | ||
|
||
.modal-backdrop { | ||
background-color: rgba(0, 0, 0, 0.8); | ||
} | ||
|
||
.vti__dropdown-item { | ||
height: 50px; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.vti__dropdown { | ||
height: 50px; | ||
outline: none; | ||
} | ||
|
||
.vue-tel-input input { | ||
height: 50px; | ||
} | ||
|
||
.vti__dropdown-list.below { | ||
top: 50px !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 is for like caller id type info, right? Should we put something about Gitcoin here? And why are we randomly choosing one?
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.
people were worreid about having "GItcoin" go through the SMS towers connected totheir KYC'd phone numbers, especially in authoritarian countries. so im shuffling the friendly call name in case that helps us obfuscate any pattern that an authoritarian would be trying to pick up. its not perfe[t, but its what we can do