From 09dcaaedf9468773f25965cc02c795e9a8ed02ae Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Mon, 5 Aug 2019 23:19:07 +0530 Subject: [PATCH] feat: update funder guide --- app/assets/v2/css/quickstart.css | 96 +++++---- .../quickstart-icons/acceptance-icon.svg | 1 + .../images/quickstart-icons/access-icon.svg | 1 + .../quickstart-icons/architecture-icon.svg | 1 + .../images/quickstart-icons/awarness-icon.svg | 1 + .../v2/images/quickstart-icons/bug-icon.svg | 2 +- .../images/quickstart-icons/design-icon.svg | 2 +- .../v2/images/quickstart-icons/doc-icon.svg | 1 + .../quickstart-icons/documentation-icon.svg | 2 +- .../images/quickstart-icons/feature-icon.svg | 2 +- .../quickstart-icons/iteration-icon.svg | 1 + .../v2/images/quickstart-icons/list-icon.svg | 2 +- .../quickstart-icons/newproduct-icon.svg | 2 +- .../v2/images/quickstart-icons/other-icon.svg | 2 +- .../quickstart-icons/performance-icon.svg | 1 + .../v2/images/quickstart-icons/price-icon.svg | 1 + .../images/quickstart-icons/review-icon.svg | 2 +- .../images/quickstart-icons/security-icon.svg | 1 + .../quickstart-icons/startsmall-icon.svg | 1 + .../images/quickstart-icons/testing-icon.svg | 1 + .../quickstart-icons/timeframe-icon.svg | 1 + .../images/quickstart-icons/upgrade-icon.svg | 2 +- app/dashboard/context/quickstart.py | 134 ++++++++++++ app/dashboard/templates/quickstart.html | 203 +++++++++--------- app/dashboard/views.py | 10 +- 25 files changed, 317 insertions(+), 156 deletions(-) create mode 100644 app/assets/v2/images/quickstart-icons/acceptance-icon.svg create mode 100644 app/assets/v2/images/quickstart-icons/access-icon.svg create mode 100644 app/assets/v2/images/quickstart-icons/architecture-icon.svg create mode 100644 app/assets/v2/images/quickstart-icons/awarness-icon.svg create mode 100644 app/assets/v2/images/quickstart-icons/doc-icon.svg create mode 100644 app/assets/v2/images/quickstart-icons/iteration-icon.svg create mode 100644 app/assets/v2/images/quickstart-icons/performance-icon.svg create mode 100644 app/assets/v2/images/quickstart-icons/price-icon.svg create mode 100644 app/assets/v2/images/quickstart-icons/security-icon.svg create mode 100644 app/assets/v2/images/quickstart-icons/startsmall-icon.svg create mode 100644 app/assets/v2/images/quickstart-icons/testing-icon.svg create mode 100644 app/assets/v2/images/quickstart-icons/timeframe-icon.svg create mode 100644 app/dashboard/context/quickstart.py diff --git a/app/assets/v2/css/quickstart.css b/app/assets/v2/css/quickstart.css index d1663cd98f8..8fa2ab88d08 100644 --- a/app/assets/v2/css/quickstart.css +++ b/app/assets/v2/css/quickstart.css @@ -11,10 +11,6 @@ color: #4a4a4a; } -.quickstart .dont-show .checkbox_container .filter-label { - display: inline; -} - .quickstart ol, .quickstart ul { padding: 0; @@ -55,33 +51,7 @@ color: #3d3d46; list-style-type: none; line-height: 2.5rem; -} - -.steps-list .action-footer { - justify-content: space-between; -} - -.action-footer .video-link { - width: 40%; -} - -.action-footer .btn { - border-radius: 3px; - background-color: #0c0763; - border-color: #0c0763; -} - -.tips-list { - border-left: #d7d7d7 2px solid; - padding-right: 0 !important; -} - -.tips-list ul li { - line-height: 2rem !important; -} - -.issuetypes-container { - background-color: #fafafa; + font-weight: 600; } .issuetypes-container .subheading { @@ -92,33 +62,54 @@ } .issuetypes-container h5 { - font-size: 1.1rem; - margin-top: 1rem; + font-size: 1.2rem; + margin-top: 0.5rem; flex: 1; letter-spacing: 0; } .issuetypes-container p { - font-size: 0.9rem; line-height: 0.9rem; } -.notsuggested-container ol { - padding: 1rem 9rem; +.bounty-tips { + background: #0D0764; +} + +.bounty-tips h4 { + color: #fff; } -.notsuggested-container ol li { - list-style: none; - display: flex; - padding: 1rem 0; +.red-text { + color: #D0021B; } -.notsuggested-container ol li span { - padding: 0rem 1rem; +.first-bounty { + background: #D6FBEB; + border-radius: 4px; + color: #00A55E; + padding: 5px 10px; } -.notsuggested-container .orange-text { - color: #ff7200; +.bounty-tips .card { + height: 7.5rem; +} + +.bounty-tips .card .title { + margin-top: 1rem; +} + +.bounty-activity { + border-top: 1px solid #D8D8D8; + border-bottom: 1px solid #D8D8D8; +} + +.bounty-activity .box { + border-bottom: none; +} + +#dontshow { + width: 10rem; } @media screen and (max-width: 500px) { @@ -132,6 +123,23 @@ } +@media (max-width: 767.98px) { + .bounty-tips .card { + height: auto; + } + + .steps-list ol li { + line-height: 2rem; + } +} + + +@media (min-width: 992px) and (max-width: 1199.98px) { + .bounty-tips .card { + height: 9rem; + } +} + .flex-column img { margin: auto; } diff --git a/app/assets/v2/images/quickstart-icons/acceptance-icon.svg b/app/assets/v2/images/quickstart-icons/acceptance-icon.svg new file mode 100644 index 00000000000..e22aa3da94b --- /dev/null +++ b/app/assets/v2/images/quickstart-icons/acceptance-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/access-icon.svg b/app/assets/v2/images/quickstart-icons/access-icon.svg new file mode 100644 index 00000000000..68e1a1c982b --- /dev/null +++ b/app/assets/v2/images/quickstart-icons/access-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/architecture-icon.svg b/app/assets/v2/images/quickstart-icons/architecture-icon.svg new file mode 100644 index 00000000000..42407ecac70 --- /dev/null +++ b/app/assets/v2/images/quickstart-icons/architecture-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/awarness-icon.svg b/app/assets/v2/images/quickstart-icons/awarness-icon.svg new file mode 100644 index 00000000000..0a584f17905 --- /dev/null +++ b/app/assets/v2/images/quickstart-icons/awarness-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/bug-icon.svg b/app/assets/v2/images/quickstart-icons/bug-icon.svg index f5df39b2de3..6275487f5c5 100644 --- a/app/assets/v2/images/quickstart-icons/bug-icon.svg +++ b/app/assets/v2/images/quickstart-icons/bug-icon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/design-icon.svg b/app/assets/v2/images/quickstart-icons/design-icon.svg index de25430b6ca..e8c7736ed2e 100644 --- a/app/assets/v2/images/quickstart-icons/design-icon.svg +++ b/app/assets/v2/images/quickstart-icons/design-icon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/doc-icon.svg b/app/assets/v2/images/quickstart-icons/doc-icon.svg new file mode 100644 index 00000000000..3cae2cb0639 --- /dev/null +++ b/app/assets/v2/images/quickstart-icons/doc-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/documentation-icon.svg b/app/assets/v2/images/quickstart-icons/documentation-icon.svg index 7f454c653d3..4a5aaaf4124 100644 --- a/app/assets/v2/images/quickstart-icons/documentation-icon.svg +++ b/app/assets/v2/images/quickstart-icons/documentation-icon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/feature-icon.svg b/app/assets/v2/images/quickstart-icons/feature-icon.svg index 105a6037603..4319b7d1358 100644 --- a/app/assets/v2/images/quickstart-icons/feature-icon.svg +++ b/app/assets/v2/images/quickstart-icons/feature-icon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/iteration-icon.svg b/app/assets/v2/images/quickstart-icons/iteration-icon.svg new file mode 100644 index 00000000000..14da550531c --- /dev/null +++ b/app/assets/v2/images/quickstart-icons/iteration-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/list-icon.svg b/app/assets/v2/images/quickstart-icons/list-icon.svg index a966fae4b85..6fe6708f25f 100644 --- a/app/assets/v2/images/quickstart-icons/list-icon.svg +++ b/app/assets/v2/images/quickstart-icons/list-icon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/newproduct-icon.svg b/app/assets/v2/images/quickstart-icons/newproduct-icon.svg index cf8042a22a8..dab5566fc10 100644 --- a/app/assets/v2/images/quickstart-icons/newproduct-icon.svg +++ b/app/assets/v2/images/quickstart-icons/newproduct-icon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/other-icon.svg b/app/assets/v2/images/quickstart-icons/other-icon.svg index 9e282eea52c..f1fc8dd7282 100644 --- a/app/assets/v2/images/quickstart-icons/other-icon.svg +++ b/app/assets/v2/images/quickstart-icons/other-icon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/performance-icon.svg b/app/assets/v2/images/quickstart-icons/performance-icon.svg new file mode 100644 index 00000000000..92abfc4f2af --- /dev/null +++ b/app/assets/v2/images/quickstart-icons/performance-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/price-icon.svg b/app/assets/v2/images/quickstart-icons/price-icon.svg new file mode 100644 index 00000000000..5c8e0211c1c --- /dev/null +++ b/app/assets/v2/images/quickstart-icons/price-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/review-icon.svg b/app/assets/v2/images/quickstart-icons/review-icon.svg index 8bae2741b75..2ddabad140f 100644 --- a/app/assets/v2/images/quickstart-icons/review-icon.svg +++ b/app/assets/v2/images/quickstart-icons/review-icon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/security-icon.svg b/app/assets/v2/images/quickstart-icons/security-icon.svg new file mode 100644 index 00000000000..34ddef99fbc --- /dev/null +++ b/app/assets/v2/images/quickstart-icons/security-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/startsmall-icon.svg b/app/assets/v2/images/quickstart-icons/startsmall-icon.svg new file mode 100644 index 00000000000..d9edd3bdb17 --- /dev/null +++ b/app/assets/v2/images/quickstart-icons/startsmall-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/testing-icon.svg b/app/assets/v2/images/quickstart-icons/testing-icon.svg new file mode 100644 index 00000000000..ecc7af3c716 --- /dev/null +++ b/app/assets/v2/images/quickstart-icons/testing-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/timeframe-icon.svg b/app/assets/v2/images/quickstart-icons/timeframe-icon.svg new file mode 100644 index 00000000000..fb858a1d8b6 --- /dev/null +++ b/app/assets/v2/images/quickstart-icons/timeframe-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/quickstart-icons/upgrade-icon.svg b/app/assets/v2/images/quickstart-icons/upgrade-icon.svg index b532faf2f09..636245372c8 100644 --- a/app/assets/v2/images/quickstart-icons/upgrade-icon.svg +++ b/app/assets/v2/images/quickstart-icons/upgrade-icon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/dashboard/context/quickstart.py b/app/dashboard/context/quickstart.py new file mode 100644 index 00000000000..ac42eb369d8 --- /dev/null +++ b/app/dashboard/context/quickstart.py @@ -0,0 +1,134 @@ +# -*- coding: utf-8 -*- +''' + Copyright (C) 2019 Gitcoin Core + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +''' + +from django.templatetags.static import static +from django.utils.translation import gettext_lazy as _ + +quickstart = { + 'good_issue_types': [ + { + 'title': 'Performance', + 'description': 'Performance improvement.', + 'img': static('v2/images/quickstart-icons/performance-icon.svg'), + 'good_first_bounty': True + }, + { + 'title': 'Security', + 'description': 'Find vulnerabilities', + 'img': static('v2/images/quickstart-icons/security-icon.svg'), + 'good_first_bounty': True + }, + { + 'title': 'Testing', + 'description': 'Test your code', + 'img': static('v2/images/quickstart-icons/testing-icon.svg'), + 'good_first_bounty': True + }, + { + 'title': 'New Product or Feature', + 'description': 'Build new product ideas or new features', + 'img': static('v2/images/quickstart-icons/newproduct-icon.svg') + }, + { + 'title': 'Feature Improvement', + 'description': 'Iterate on the next set of features', + 'img': static('v2/images/quickstart-icons/feature-icon.svg') + }, + { + 'title': 'Bug Fix', + 'description': 'Find and fix bugs in your product', + 'img': static('v2/images/quickstart-icons/bug-icon.svg') + }, + { + 'title': 'Tech Upgrade', + 'description': 'Framework, migration, batches', + 'img': static('v2/images/quickstart-icons/upgrade-icon.svg') + }, + { + 'title': 'Design', + 'description': 'Architecture, flows, wireframes, designs', + 'img': static('v2/images/quickstart-icons/design-icon.svg') + }, + { + 'title': 'Code Review', + 'description': 'Get help reviewing code', + 'img': static('v2/images/quickstart-icons/review-icon.svg') + }, + { + 'title': 'Documentation', + 'description': 'Product documentation, set up instructions', + 'img': static('v2/images/quickstart-icons/documentation-icon.svg') + }, + { + 'title': 'Other', + 'description': 'Ideas, discussions, contests, consulting', + 'img': static('v2/images/quickstart-icons/other-icon.svg') + } + ], + 'bad_issue_types': [ + { + 'title': _('Core Architecture'), + 'description': _('Building your app from ground up.'), + 'img': static('v2/images/quickstart-icons/architecture-icon.svg') + }, + { + 'title': _('Requires Awarness of Product Market fit'), + 'description': _('unless there is well documented materials.'), + 'img': static('v2/images/quickstart-icons/awarness-icon.svg') + }, + { + 'title': _('Requires Privileged Access'), + 'description': _('SSH access, prod private API key, etc.'), + 'img': static('v2/images/quickstart-icons/access-icon.svg') + } + ], + 'bounty_tips': [ + { + 'title': _('Price Correctly'), + 'description': _('Make sure the Pricing of your bounty matches the work requirement.'), + 'img': static('v2/images/quickstart-icons/price-icon.svg') + }, + { + 'title': _('Start Small'), + 'description': _('Focus on verifiable tasks and small tasks.'), + 'img': static('v2/images/quickstart-icons/startsmall-icon.svg') + }, + { + 'title': _('Set Clear Acceptance Criteria'), + 'description': _('Have clear checklist on the Bounty Details on the definition of done.'), + 'img': static('v2/images/quickstart-icons/acceptance-icon.svg') + }, + { + 'title': _('Focus on Iteration'), + 'description': _('Keep budget in your back pocket and keep a tight iteration loop. Leave no room for error.'), + 'img': static('v2/images/quickstart-icons/iteration-icon.svg') + }, + { + 'title': _('Set A Reasonable Time Frame'), + 'description': _('Put a reasonable time frame on the Time Commitment field.'), + 'img': static('v2/images/quickstart-icons/timeframe-icon.svg') + }, + { + 'title': _('Documentation is Key'), + 'description': _('Clear readmes and contributing guidelines on your GitHub repo are important.'), + 'img': static('v2/images/quickstart-icons/doc-icon.svg') + } + ], + 'title': _('Quickstart'), +} diff --git a/app/dashboard/templates/quickstart.html b/app/dashboard/templates/quickstart.html index 78f78487e75..cf414836952 100644 --- a/app/dashboard/templates/quickstart.html +++ b/app/dashboard/templates/quickstart.html @@ -22,8 +22,9 @@ {% include 'shared/head.html' %} {% include 'shared/cards.html' %} - + + {% include 'shared/tag_manager_2.html' %} @@ -32,123 +33,123 @@ {% include 'shared/nav.html' %}
-
-
-

{% trans "Funder Guide" %}

-
-
-
-
-
- - -
- -
+

{% trans "Funder Guide" %}

+
+
+ + +
+
-
-
+
+
-
+
  1. {% trans "1) Create a Github Issue, you'll need the issue URL" %}
  2. {% trans "2) Select the type of issue to fund" %}
  3. {% trans '3) Complete the form and press "Fund Issue"' %}
  4. -
  5. {% trans "4) Confirm the transaction in metamask" %}
  6. +
  7. {% trans "4) Confirm the transaction in MetaMask" %}
-

+

{% trans "Once confirmed on blockchain, your bounty is posted to Gitcoin! Wait for developers across the world to discover your bounty and start working on your issue." %}

- + + + {% trans "Watch 90 second video" %} +
-
-
{% trans "Tips & Tricks" %}
-
    -
  • {% trans "Know what you're looking for." %}
  • -
  • {% trans "Set clear acceptance criteria." %}
  • -
  • {% trans "Set a reasonable timeframe." %}
  • -
  • {% trans "Pick a fair price." %}
  • -
  • {% trans "Documentation is Key." %}
  • -
  • {% trans "Leave Room for Error." %}
  • -
-

{% trans "Have fun! Meet new people!" %}

- {% trans "See Developer Guide" %} +
-
-

{% trans "Other Repo Maintainers are funding these types of issues" %}

-
- -
{% trans "NEW PRODUCT OR FEATURE" %}
-

{% trans "Build new product ideas or new features" %}

-
-
- -
{% trans "FEATURE IMPROVEMENT" %}
-

{% trans "Iterate on the next set of features" %}

-
-
- -
{% trans "BUG FIX" %}
-

{% trans "Find and fix bugs in your product" %}

-
-
- -
{% trans "CODE REVIEW" %}
-

{% trans "Get help reviewing code" %}

-
-
- -
{% trans "TECH UPGRADE" %}
-

{% trans "Frameworks, migrations, batches" %}

-
-
- -
{% trans "DOCUMENTATION" %}
-

{% trans "Product documentation, set up instructions" %}

-
-
- -
{% trans "DESIGN" %}
-

{% trans "Architecture, flows, wireframes, designs" %}

-
-
- -
{% trans "OTHER" %}
-

{% trans "Ideas, discussions, contests, consulting" %}

-
-
-

{% blocktrans %}In our experience, the following are not good candidates for bounties:{% endblocktrans %}

-
    -
  1. - - {% trans "Core Architecture" %} -
  2. -
  3. - - {% blocktrans %}Anything that requires a high degree of situational awareness - of the product/market fit (unless there is well documented material on the same){% endblocktrans %} -
  4. -
  5. - - {% blocktrans %}Anything that requires privileged access (like SSH access, - prod private API key){% endblocktrans %} -
  6. -
- {% trans "If you're unsure, please reach out to a Gitcoin Core Team member on" %} Slack + +
+

+ {% trans "Creating Great Bounties" %} +

+ +
+ {% for bounty_tip in bounty_tips %} +
+
+
+ {{ bounty_tip.title }} +
+
+
{{ bounty_tip.title }}
+

{{ bounty_tip.description |safe }}

+
+
+
+ {% endfor %}
+ +
+

+ {% trans "Other Repo Maintainers are funding these types of issues" %} +

+ + {% for issue_type in good_issue_types %} +
+
+ {{ issue_type.title }} +
+
+
{{ issue_type.title }}
+

{{ issue_type.description }}

+ {% if issue_type.good_first_bounty %} +

+ Good First Bounty +

+ {% endif %} +
+
+ {% endfor %} + + {% if activities|length %} +
+
+

Latest Bounties Created

+
+
+ {% for row in activities %} + {% include 'shared/activity.html' %} + {% endfor %} +
+
+
+
+ {% endif %} + +

+ {% blocktrans %}In our experience, the following are + not good candidates for bounties:{% endblocktrans %} +

+ + {% for issue_type in bad_issue_types %} +
+
+ {{ issue_type.title }} +
+
+
{{ issue_type.title }}
+

{{ issue_type.description }}

+
+
+ {% endfor %} + +

+ {% trans "If you're unsure, please reach out to a Gitcoin Core Team member on" %} + Slack +

+
{% include 'shared/analytics.html' %} diff --git a/app/dashboard/views.py b/app/dashboard/views.py index beb6eb577d6..541557854d0 100644 --- a/app/dashboard/views.py +++ b/app/dashboard/views.py @@ -1737,8 +1737,13 @@ def funder_payout_reminder(request, bounty_network, stdbounties_id): def quickstart(request): - """Display quickstart guide.""" - return TemplateResponse(request, 'quickstart.html', {}) + """Display Quickstart Guide.""" + + from dashboard.context.quickstart import quickstart + activities = Activity.objects.filter(activity_type='new_bounty').order_by('-created')[:5] + quickstart["activities"] = [a.view_props for a in activities] + return TemplateResponse(request, 'quickstart.html', quickstart) + def load_banners(request): """Load profile banners""" @@ -1749,6 +1754,7 @@ def load_banners(request): } return JsonResponse(response, safe=False) + def profile_details(request, handle): """Display profile keywords.