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

Feature/convert2grant #7359

Merged
merged 25 commits into from
Oct 14, 2020
Merged

Feature/convert2grant #7359

merged 25 commits into from
Oct 14, 2020

Conversation

sanchaymittal
Copy link
Contributor

@sanchaymittal sanchaymittal commented Sep 11, 2020

Description

Convert to Grant feature

Video: https://www.loom.com/share/abe0eb4176e34b599442b2fcdd733b11

  1. New Winner Tag before it was a ribbon
  2. New Grant Tag
  3. Filters at sidebar allow the listing of project converted to grants.
  4. The position change of edit button

Screenshot 2020-09-13 at 2 06 27 PM
Screenshot 2020-09-13 at 2 06 53 PM

  1. Owner of the project can convert the project to grant
  2. project-id is passed as an optional param with URL, preloaded the fields in grant page.

Screenshot 2020-09-13 at 2 13 40 PM
Screenshot 2020-09-13 at 2 14 01 PM

  1. The project owner can visit grant page to edit it

Screenshot 2020-09-13 at 2 07 14 PM

  1. The user visiting the project can jump onto the grant page to donate.

Screenshot 2020-09-13 at 2 08 06 PM

  1. Tribe Project tab is also updated to show the filters and tag of winner and grant.

Screenshot 2020-09-13 at 2 21 03 PM

Refers/Fixes

#7098

Testing

@codecov
Copy link

codecov bot commented Sep 11, 2020

Codecov Report

Merging #7359 into master will decrease coverage by 0.00%.
The diff coverage is 28.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7359      +/-   ##
==========================================
- Coverage   26.41%   26.40%   -0.01%     
==========================================
  Files         306      306              
  Lines       30136    30157      +21     
  Branches     4455     4460       +5     
==========================================
+ Hits         7959     7964       +5     
- Misses      21902    21923      +21     
+ Partials      275      270       -5     
Impacted Files Coverage Δ
app/app/context.py 0.00% <0.00%> (ø)
app/grants/urls.py 100.00% <ø> (ø)
app/dashboard/views.py 10.54% <18.18%> (+0.03%) ⬆️
app/grants/views.py 15.50% <27.27%> (+0.06%) ⬆️
app/dashboard/router.py 40.11% <33.33%> (-0.23%) ⬇️
app/dashboard/admin.py 60.92% <100.00%> (ø)
app/dashboard/models.py 49.86% <100.00%> (+0.01%) ⬆️
app/quests/views.py 16.22% <0.00%> (ø)
...rketing/management/commands/no_applicants_email.py 0.00% <0.00%> (ø)
... and 1 more

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 55c416b...799f200. Read the comment docs.

app/grants/views.py Outdated Show resolved Hide resolved
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.

https://user-images.githubusercontent.com/19514207/87412921-2b78f800-c5fc-11ea-9509-91e40793edde.jpg

^ The screenshot don't match the design on the ticket
Padding / text align / button color and so on!

Could we keep the code as close to the design as possible.

Copy link
Contributor

@PixelantDesign PixelantDesign left a comment

Choose a reason for hiding this comment

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

Hi @sanchaymittal lets keep the existing winner banner where it is and move grants image to the left side. What does green Edit button do?

@sanchaymittal
Copy link
Contributor Author

Hi @sanchaymittal lets keep the existing winner banner where it is and move grants image to the left side. What does green Edit button do?

But then it will overlap with the edit button if I move the grant tag to the left side. The green edit button is for the project owner to edit the project.

@PixelantDesign
Copy link
Contributor

Just for context -convo w @sanchaymittal -- we'll keep it like this for now until @zoek1 builds project V2 when we will clean the card up as part of that push. @thelostone-mc @octavioamu

Screen Shot 2020-09-14 at 7 32 50 AM

@PixelantDesign
Copy link
Contributor

PixelantDesign commented Sep 15, 2020

@sanchaymittal could you post a video or an ngrok tunnel so that we can play with the feature?

@frankchen07
Copy link
Contributor

yes, would like a video or live demo - that would be perfect!

@sanchaymittal
Copy link
Contributor Author

sanchaymittal commented Sep 17, 2020

yes, would like a video or live demo - that would be perfect!

Video demo: https://www.loom.com/share/abe0eb4176e34b599442b2fcdd733b11
I also have the ngrok pipeline setup, ping me on slack I will share it with you guys.

cc: @PixelantDesign

@thelostone-mc
Copy link
Member

Additioanlly calling out that
#7487 shifts the current grant creation form to a new form -> so the changes for that would have to be ported over as well ! not sure how we'd want to handle that

cc @sanchaymittal

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 bunch of comments

app/grants/views.py Outdated Show resolved Hide resolved
@frankchen07
Copy link
Contributor

how is a project denoted as a grant in our DB? is there a flag that tell us if it was converted to a grant, and when it occurs?

@sanchaymittal
Copy link
Contributor Author

how is a project denoted as a grant in our DB? is there a flag that tell us if it was converted to a grant, and when it occurs?

A field is created in HackathonProject DB grant_link which is a foreign Key to Grant. Once a grant is created through convert2grant flow then it updates the field with grant object.

@frankchen07
Copy link
Contributor

frankchen07 commented Sep 24, 2020

got it, so when the grant is created via convert2grant flow, that means the created_on field in the grant object is essentially when the project -> grant, and we can find that by just joining the project model to the grants model via the foreign key?

if yes, then LGTM, we can track the outcome of this feature

@sanchaymittal
Copy link
Contributor Author

got it, so when the grant is created via convert2grant flow, that means the created_on field in the grant object is essentially when the project -> grant, and we can find that by just joining the project model to the grants model via the foreign key?

if yes, then LGTM, we can track the outcome of this feature

Yes, when we create the grant we save the project object to the foreign key field.

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 few comments !

app/grants/templates/grants/new.html Show resolved Hide resolved
app/dashboard/views.py Show resolved Hide resolved
app/dashboard/models.py Show resolved Hide resolved
app/dashboard/migrations/0151_auto_20200921_1510.py Outdated Show resolved Hide resolved
@octavioamu
Copy link
Contributor

PR is failing because migrations

- To share the project params with intra view functions
ordering of projects
- winners, grants, created_on, id
- winner ribbon conflicting with grant tag.
- fetch project_pk
- After making change to grant_link
- API call to DB doesn't fetch the updates
- if queried with filter then updated data is fetched only
- revert the changes done in last commit
- change the styling close to the design
- rmv the unwanted logic
- padding change for ribbon tag to make it smaller
- change the position of grant tag to left
@sanchaymittal sanchaymittal force-pushed the feature/convert2grant branch from eb3a787 to e384bc9 Compare October 7, 2020 13:44
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.

Minor comment on indentation, otherwise LGTM
@sanchaymittal this is something I would your help as a follow up PR against zcash branch https://gitcoincore.slack.com/archives/G01CNNGMT3K/p1602241297000100

@sanchaymittal
Copy link
Contributor Author

Minor comment on indentation, otherwise LGTM
@sanchaymittal this is something I would your help as a follow up PR against zcash branch gitcoincore.slack.com/archives/G01CNNGMT3K/p1602241297000100

Noted!

Copy link
Contributor

@octavioamu octavioamu 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 few comments. the rest seems looking good

app/grants/views.py Outdated Show resolved Hide resolved
app/grants/views.py Outdated Show resolved Hide resolved
rnm: rename data to project_data
@thelostone-mc thelostone-mc merged commit 2ccfbc4 into master Oct 14, 2020
@amustapha amustapha mentioned this pull request Dec 18, 2020
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.

5 participants