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

New bounty creation flow #10409

Merged
merged 5 commits into from
May 23, 2022
Merged

New bounty creation flow #10409

merged 5 commits into from
May 23, 2022

Conversation

nutrina
Copy link
Contributor

@nutrina nutrina commented Mar 23, 2022

Description

This implements the new bounty creation flow.

Refers/Fixes

Se this board for the issue that this PR fixes:
https://github.com/orgs/gitcoinco/projects/4/views/1?filterQuery=epic%2Finitiative%3A%22Bounty+Creation%22

Testing
  • has partial test coverage with cypress
  • manual testing

@github-actions
Copy link

The new docker image for has been pushed to: gitcoin/web:bb261f23f2

@nutrina nutrina temporarily deployed to review March 25, 2022 11:34 Inactive
@github-actions
Copy link

@github-actions
Copy link

The new docker image for has been pushed to: gitcoin/web:58011b84c6

@nutrina nutrina temporarily deployed to review March 28, 2022 09:00 Inactive
@github-actions
Copy link

@github-actions
Copy link

The new docker image for has been pushed to: gitcoin/web:53d95c08ad

@nutrina nutrina temporarily deployed to review March 28, 2022 14:46 Inactive
@github-actions
Copy link

@nutrina nutrina force-pushed the bounty_creation_flow branch 4 times, most recently from fd3d6b3 to bbc94be Compare April 7, 2022 09:21
@github-actions
Copy link

github-actions bot commented Apr 7, 2022

The new docker image for has been pushed to: gitcoin/web:fe654f7112

@nutrina nutrina temporarily deployed to review April 7, 2022 11:08 Inactive
@github-actions
Copy link

github-actions bot commented Apr 7, 2022

@github-actions
Copy link

github-actions bot commented Apr 8, 2022

The new docker image for has been pushed to: gitcoin/web:77123aff1b

@nutrina nutrina temporarily deployed to review April 8, 2022 07:41 Inactive
@github-actions
Copy link

github-actions bot commented Apr 8, 2022

@github-actions
Copy link

github-actions bot commented Apr 8, 2022

The new docker image for has been pushed to: gitcoin/web:29d94c6686

@nutrina nutrina force-pushed the bounty_creation_flow branch from 910a614 to dd5bec5 Compare May 10, 2022 19:19
@github-actions
Copy link

The new docker image for has been pushed to: gitcoin/web:93b26c3a78

@nutrina nutrina temporarily deployed to review May 10, 2022 19:40 Inactive
@github-actions
Copy link

@github-actions
Copy link

The new docker image for has been pushed to: gitcoin/web:69be47fbd7

@github-actions
Copy link

The new docker image for has been pushed to: gitcoin/web:54b5d741ab

@nutrina nutrina temporarily deployed to review May 11, 2022 13:06 Inactive
@github-actions
Copy link

@github-actions
Copy link

The new docker image for has been pushed to: gitcoin/web:3b4d587b9a

@nutrina nutrina temporarily deployed to review May 11, 2022 16:08 Inactive
@github-actions
Copy link

@nutrina nutrina force-pushed the bounty_creation_flow branch from f07cead to 74853f7 Compare May 17, 2022 08:51
@nutrina nutrina force-pushed the bounty_creation_flow branch from 035a188 to 849c2df Compare May 18, 2022 06:20
Copy link
Member

@thelostone-mc thelostone-mc left a comment

Choose a reason for hiding this comment

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

left a couple of comments.
Will review the rest later today as this quite a big PR :P

app/app/urls.py Outdated
@@ -443,6 +443,7 @@
),

# View Bounty
# TODO geri: should we drop the 2 URL patterns below???
Copy link
Member

Choose a reason for hiding this comment

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

Is this something which needs to be addressed now ?
would it make more sense to track this in a ticket as opposed to the code ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was reluctant to remove this to avoid breaking the links that users have ....
I will write a proper comment here.

@@ -454,6 +455,7 @@
name='issue_details_new2'
),
re_path(r'^funding/details/?', dashboard.views.bounty_details, name='funding_details'),
re_path(r'^issue/(?P<bounty_id>\d+)', dashboard.views.bounty_details, name='issue_details_new4'),
Copy link
Member

Choose a reason for hiding this comment

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

couldn't we remove the old ones issue_details_new2 / is that still needed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would not remove this now, see my comment above.

let vm = this;
let ret = false;
Copy link
Member

Choose a reason for hiding this comment

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

rename this to something more meaningful ?

for (let i = 0; i < vm.bounty.owners.length; i++) {
let additionalOwner = vm.bounty.owners[i];

console.log('geri: additionalOwner', additionalOwner.handle);
Copy link
Member

Choose a reason for hiding this comment

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

do we need the log ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I will remove this

@@ -19,6 +19,7 @@
'''
import json
import logging
from pprint import pformat
Copy link
Member

Choose a reason for hiding this comment

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

Is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I will remove this

@@ -7,6 +7,7 @@ <h4>[[heading]]</h4>
</template>
<slot></slot>
</div>
<slot name="footer"></slot>
Copy link
Member

Choose a reason for hiding this comment

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

what's this for ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is for additional content that we display below the wizard, if it is the case.
We have a use case where we display fee information for bounty payments in the payment step only.

usd_pegged_value_in_token_now = models.DecimalField(default=0, decimal_places=2, max_digits=50, blank=True, null=True) # The calculated amount in token, corresponding to value_true_usd
usd_pegged_value_in_token = models.DecimalField(default=0, decimal_places=2, max_digits=50, blank=True, null=True) # The calculated amount in token, corresponding to value_true_usd
value_true_usd = models.DecimalField(default=0, decimal_places=2, max_digits=50, blank=True, null=True) # The value the user wants to pay in USD
peg_to_usd = models.BooleanField(default=False) # True if the amount to pay should be pegged to USD
Copy link
Member

Choose a reason for hiding this comment

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

^ can none of the above fields like value_in_usdt etc be resued ? Just curious

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is probably possible, but I think having this additional variables makes following the logic flow much easier:

  • if the user does not peg to USD -> we use the old vars, and conversions are made from token amount -> usd amount
  • if the user does peg to USD -> we use the new vars, and conversions are made from usd amount -> token amount

I think this helps understand better which value the user entered: value_true respectively value_true_usd.

@@ -379,7 +379,7 @@ class BountyAdmin(admin.ModelAdmin):
raw_id_fields = ['interested', 'coupon_code', 'org', 'event', 'bounty_owner_profile', 'bounty_reserved_for_user']
ordering = ['-id']

search_fields = ['raw_data', 'title', 'bounty_owner_github_username', 'token_name']
search_fields = ['raw_data', 'title', 'bounty_owner_github_username', 'token_name', 'cusom_title', 'custom_description']
Copy link
Member

Choose a reason for hiding this comment

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

cusom_title -> custom_title

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will fix this.

Gerald Iakobinyi-Pich added 2 commits May 19, 2022 07:20
    - redirect to new url format from bounty invitation
    - fix failure loading details page due to invalid JSON in acceptance criteria and ressources
    - ®emved hardcoded URLs for network icons
@nutrina nutrina force-pushed the bounty_creation_flow branch from fd9c29f to b537b20 Compare May 22, 2022 20:37
@nutrina nutrina force-pushed the bounty_creation_flow branch from b537b20 to 7e25aee Compare May 22, 2022 20:43
@nutrina nutrina merged commit ec10b93 into master May 23, 2022
chibie added a commit that referenced this pull request May 27, 2022
thelostone-mc pushed a commit that referenced this pull request May 31, 2022
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.

2 participants