Skip to content

Commit

Permalink
feat: GR11 (#9421)
Browse files Browse the repository at this point in the history
* Clean up verbiage (#9309)

Clean up verbiage on footer

* Bump moment from 2.17.1 to 2.19.3 (#9307)

Bumps [moment](https://github.com/moment/moment) from 2.17.1 to 2.19.3.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](moment/moment@2.17.1...2.19.3)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* GITC-223: ignore squelched profiles in clr (#9312)

* chore: improve grants search using vector_column

* add custom migration

* tags/1: add new model + port data

* tags/2: remove GrantCategory

* fix alert css

* add /v1/api/tags endpoint

* feat: tweak get_grants to support chain and tagv

* re-introduce removed fields

* ensure filters work as expected

* chore : update old API

* add grants layout structure

* add clr router

* chore: wire in grant tags in create + edit

* introduce old filter

* backend query applied and basic query

* fix tenant query

* add filters and parameters logic changes

* sort

* add grant_region filter

* fix broken sort

* filters ux

* tags router search and filters

* collections backend and cache

* tab system and collections

* chore: move me=true

* filter by collection

* collections paginatination

* remove extra request

* update styles

* GITC-239: Introduces global nav-cart to replace grants side-cart (#9418)

* fix get_hackathons4

* GITC-321: Sets featured grant to 'grant_id = 1' (#9367)

* feat: introduce steward endpoint (#9377)

* GITC-276 purge: gitcoin faucet (#9333)

* fixes bounty fulfillment data (#9368)

* GITC-245: Implements the CLR calc in SQL (#9348)

* GITC-245: Implements the CLR calc in SQL

* GITC-245: Adds trust_bonus to profiles as_dict to optimise clr query

* GITC-245: Inner joins

* GITC-245: Fixes update_trust_bonus

* GITC-245: Adds prints to clr to enable comparisons

* GITC-245: Refactors --call-now version of update to happen inline

* GITC-245: Refactors clr2 to avoid checking grants with no contribs and to account for grant.defer_clr_to

* GITC-245: Adds a hybrid sql/python version of the calc (need to check both in production setting)

* GITC-245: Adds 'defer_clr_to' to grants admin page

* GITC-245: Adds to print statement to maintain consistency

* Moves the id clause outside of the right join

* feat: trust-bonus api (#9349)

* chore: made defer_clr_to readonly

* stale nav (#9382)

* GITC-294: show clear cart on loading screen (#9369)

* DoingGud interview

* Update API.md

* GITC-315: Fixes sms verify (#9390)

* GITC-368: Adds skip_cleanup to retain build artefacts (#9409)

* Fix small bug when click to slack link (#9416)

* Updates db.py to always read from replicas (#9403)

* GITC-239: Introduces gc-cart-content component

Co-authored-by: octavioamu <octavioamuchastegui@gmail.com>
Co-authored-by: Aditya Anand M C <aditya.anandmc@gmail.com>
Co-authored-by: Kevin Owocki <ksowocki@gmail.com>
Co-authored-by: Kyle Weiss <Kweiss@users.noreply.github.com>
Co-authored-by: Thien Tran <fcduythien@gmail.com>

* feat: polygon l2 checkout (#9372)

* fix get_hackathons4

* GITC-321: Sets featured grant to 'grant_id = 1' (#9367)

* rough commit

* setup polygon: connect/switch/add chain

* feat: introduce steward endpoint (#9377)

* GITC-276 purge: gitcoin faucet (#9333)

* fixes bounty fulfillment data (#9368)

* GITC-245: Implements the CLR calc in SQL (#9348)

* GITC-245: Implements the CLR calc in SQL

* GITC-245: Adds trust_bonus to profiles as_dict to optimise clr query

* GITC-245: Inner joins

* GITC-245: Fixes update_trust_bonus

* GITC-245: Adds prints to clr to enable comparisons

* GITC-245: Refactors --call-now version of update to happen inline

* GITC-245: Refactors clr2 to avoid checking grants with no contribs and to account for grant.defer_clr_to

* GITC-245: Adds a hybrid sql/python version of the calc (need to check both in production setting)

* GITC-245: Adds 'defer_clr_to' to grants admin page

* GITC-245: Adds to print statement to maintain consistency

* Moves the id clause outside of the right join

* feat: trust-bonus api (#9349)

* chore: made defer_clr_to readonly

* more utils

* upload svg

* stale nav (#9382)

* GITC-294: show clear cart on loading screen (#9369)

* DoingGud interview

* Update API.md

* implement modal design

* checkout recommendation, estimate gas, rootToChildToken

* finish checkout + handle unsupported tokens etc.

* handle balance check + amount to deposit

* GITC-315: Fixes sms verify (#9390)

* GITC-368: Adds skip_cleanup to retain build artefacts (#9409)

* gas cost estimation

* bug fix checkout recommendation

* some fixes

* Fix small bug when click to slack link (#9416)

* Updates db.py to always read from replicas (#9403)

* address review comments @thelostone-mc

* Add test env to bundle (#9374)

* Allow test environment to upload assets to hosted space

* Updating pip requirements to deconflict

* Fixing issues from PR comments

* Fixing issues from PR comments

* Changing environment for travis testing to 'travis'

* Updating the variable references to be easier to understand.

* more review fixes @PixelantDesign

* review fix @willsputra

* indicate metamask popup

* no metamask popup with insufficient balance

Co-authored-by: octavioamu <octavioamuchastegui@gmail.com>
Co-authored-by: Graham Dixon <graham@gitcoin.co>
Co-authored-by: Graham Dixon <graham@gdixon.co.uk>
Co-authored-by: Aditya Anand M C <aditya.anandmc@gmail.com>
Co-authored-by: Kevin Owocki <ksowocki@gmail.com>
Co-authored-by: Kyle Weiss <Kweiss@users.noreply.github.com>
Co-authored-by: Thien Tran <fcduythien@gmail.com>
Co-authored-by: Zack Schiller <81022539+zacheryschiller@users.noreply.github.com>

* GITC-131: Adds Discover Grants section to grants landing (#9386)

* GITC-131: Adds Discover Grants section to grants landing

* GITC-131: Replaces svgs

* lint fixes + URL

* fix default value

* Fixes border mixin

* Corrects discover section query strings

* Adds count to checkout button

* reset page when filtering

* fix following not removing filter

* reset pagination on clr filter

* filters dropdown  styles

* me filter

* tweak more filter font-size

* disable auto-flip based on viewport

* chore: reset page on changing filter + fix pre-filling vue store from URL

* show idle grants in collections

* merge conflict

* change clr banner to black

* Purges sidecart and ensures interactions with nav-cart are reflected everywhere

* introduce my_collections=true

* Switches categories for tags on grant details page

* update text color to blak

* Adds validation for provided eth address on create grant form

* fix filters and load tab by url

* Adds nav-cart to sticky filter bar, fixes some filtering behaviour and links/layout

* Wrap intersection observer to ensure the ref is present

* Ensures static url appending is clean

* changing sort change page to 1

* remove add all to cart

* fix navbar css

* Center align the number of grants

* move filters to top

* add label to tenant

* fix filter styles

* hide cats if not options

* admin bar to top

* fix keyboard navigation filter

* fix clr links

* fix collections links

* collections on landingpage

* fix placeholder urls

* clean dead code

* reset page when switching from collections

* add link polygon support

* GITC-370: polygon gas cost estimation (#9430)

* improve gas cost estimation + add mainnet address
* check use has sufficient matic for gas

* bug fix

* remove log

* show neglible currency values

* fix align on list view

* GITC-358: Reintroduces sort methods

* Enables history navigation on filter change

* Removes random_shuffle from the available sorts

* Ensures params are cleared when filter data is empty

* Fixes back button/text on grant details

* add reverse pagination

* remove blank for grants details

* Fixes back button for after user follows an external link to a grants details page

* fix zksync errors

* polygon behind staff flag

* GITC-247: Fixes the stats tab for team_members

* Fixes button alignment

Co-authored-by: Kyle Weiss <Kweiss@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: octavioamu <octavioamuchastegui@gmail.com>
Co-authored-by: Graham Dixon <graham@gitcoin.co>
Co-authored-by: Kevin Owocki <ksowocki@gmail.com>
Co-authored-by: Thien Tran <fcduythien@gmail.com>
Co-authored-by: Chibuotu Amadi <chibuotu@gmail.com>
Co-authored-by: Graham Dixon <graham@gdixon.co.uk>
Co-authored-by: Zack Schiller <81022539+zacheryschiller@users.noreply.github.com>
  • Loading branch information
10 people committed Sep 7, 2021
1 parent 78667f4 commit cdd7b51
Show file tree
Hide file tree
Showing 58 changed files with 2,655 additions and 2,374 deletions.
9 changes: 9 additions & 0 deletions app/assets/v2/images/grants/polygon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 0 additions & 19 deletions app/assets/v2/js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ document.addEventListener('DOMContentLoaded', function() {
});
}

// TODO: MOVE TO GRANTS shared
if (typeof CartData != 'undefined') {
applyCartMenuStyles();
}

$('body').on('click', '.copy_me', function() {
$(this).focus();
$(this).select();
Expand Down Expand Up @@ -425,20 +420,6 @@ this.gitcoinUpdates = () => {

};

this.applyCartMenuStyles = function() {
let dot = $('#cart-notification-dot');

if (CartData.hasItems()) {
dot.addClass('notification__dot_active');
dot.text(CartData.length());
} else {
dot.removeClass('notification__dot_active');
if (document.location.href.indexOf('/grants') == -1) {
$('#cart-nav').addClass('hidden');
}
}
};

// Turn form data pulled form page into a JS object
this.objectifySerialized = function(data) {
let objectData = {};
Expand Down
37 changes: 26 additions & 11 deletions app/assets/v2/js/cart-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ this.CartData = class CartData {
return bulk_add_cart;
}

static addToCart(grantData, no_report) {
static addToCart(grantData, no_report, skipEmit) {
if (this.cartContainsGrantWithId(grantData.grant_id)) {
return;
}
Expand Down Expand Up @@ -164,7 +164,8 @@ this.CartData = class CartData {
let cartList = this.loadCart();

cartList.push(grantData);
this.setCart(cartList);

this.setCart(cartList, skipEmit);

if (!no_report) {
fetchData(`/grants/${grantData.grant_id}/activity`, 'POST', {
Expand All @@ -174,7 +175,7 @@ this.CartData = class CartData {
}
}

static removeIdFromCart(grantId) {
static removeIdFromCart(grantId, skipEmit) {
grantId = String(grantId);

let cartList = this.loadCart();
Expand All @@ -186,10 +187,10 @@ this.CartData = class CartData {
metadata: JSON.stringify(newList)
}, { 'X-CSRFToken': $("input[name='csrfmiddlewaretoken']").val() });

this.setCart(newList);
this.setCart(newList, skipEmit);
}

static updateCartItem(grantId, field, value) {
static updateCartItem(grantId, field, value, skipEmit) {
let cartList = this.loadCart();

let grant = null;
Expand All @@ -209,20 +210,24 @@ this.CartData = class CartData {

grant[field] = value;

this.setCart(cartList);
this.setCart(cartList, skipEmit);
}

static clearCart() {
static clearCart(skipEmit) {
let cartList = this.loadCart();

if (!skipEmit) {
this.emitDataUpdate([]);
}

fetchData('/grants/0/activity', 'POST', {
action: 'CLEAR_CART',
metadata: JSON.stringify(cartList),
bulk: true
}, { 'X-CSRFToken': $("input[name='csrfmiddlewaretoken']").val() });

localStorage.setItem('grants_cart', JSON.stringify([]));
applyCartMenuStyles();

}

static loadCart() {
Expand All @@ -241,9 +246,19 @@ this.CartData = class CartData {
return parsedCart;
}

static setCart(list) {
static setCart(list, skipEmit) {
if (!skipEmit) {
this.emitDataUpdate(list);
}
localStorage.setItem('grants_cart', JSON.stringify(list));
applyCartMenuStyles();
}

static emitDataUpdate(list) {
window.dispatchEvent(new CustomEvent('cartDataUpdated', {
detail: {
list: list
}
}));
}

static loadCheckedOut() {
Expand Down

0 comments on commit cdd7b51

Please sign in to comment.