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

As a Gitcoin admin, I want an embedded survey for each Gitcoin hackathon so I know the motivations of each hacker #6128

Merged
merged 17 commits into from
Apr 29, 2020

Conversation

zoek1
Copy link
Contributor

@zoek1 zoek1 commented Mar 4, 2020

Description
  • Add models to build dynamic surveys
  • Add flow to build a survey from the admin panel
Refers/Fixes

#6087

Testing

DEMO: https://www.loom.com/share/9d95aa6549e54e779e9124959c0a0bb7

Register views

not_registered

Form to get expectation from the user

Funding The Future! Onboard _ Gitcoin

The user is registered but the hackathon doesn't start yet

register_no_active

The user is registered but the hackathon already started

active

Mobile view

image

image

image

image

@codecov
Copy link

codecov bot commented Mar 4, 2020

Codecov Report

Merging #6128 into master will increase coverage by 0.15%.
The diff coverage is 74.02%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6128      +/-   ##
==========================================
+ Coverage   27.06%   27.21%   +0.15%     
==========================================
  Files         291      291              
  Lines       26702    26778      +76     
  Branches     3951     3956       +5     
==========================================
+ Hits         7226     7288      +62     
- Misses      19209    19223      +14     
  Partials      267      267              
Impacted Files Coverage Δ
app/dashboard/views.py 11.12% <5.26%> (-0.08%) ⬇️
app/dashboard/models.py 50.09% <90.90%> (+0.34%) ⬆️
app/dashboard/admin.py 65.83% <100.00%> (+4.30%) ⬆️
app/dashboard/embed.py 31.60% <0.00%> (+3.44%) ⬆️

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 9e9329f...159fca9. Read the comment docs.

@zoek1 zoek1 changed the title WIP: As a Gitcoin admin, I want an embedded survey for each Gitcoin hackathon so I know the motivations of each hacker As a Gitcoin admin, I want an embedded survey for each Gitcoin hackathon so I know the motivations of each hacker Apr 8, 2020
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.

@zoek1 checked out the video ! Dope stuff ^_^

  • Left a bunch of comments + questions
  • I noticed you had a migration error -> could you rebase with master. -> delete your migration and recreate it. we wanna avoid having merge migration file

app/assets/v2/images/hackathon/heart.svg Outdated Show resolved Hide resolved
app/dashboard/admin.py Show resolved Hide resolved
app/dashboard/models.py Outdated Show resolved Hide resolved
app/dashboard/models.py Outdated Show resolved Hide resolved
app/dashboard/models.py Outdated Show resolved Hide resolved
app/dashboard/models.py Outdated Show resolved Hide resolved
app/dashboard/models.py Outdated Show resolved Hide resolved
app/dashboard/models.py Outdated Show resolved Hide resolved
app/dashboard/models.py Outdated Show resolved Hide resolved
app/dashboard/models.py Outdated Show resolved Hide resolved
@zoek1
Copy link
Contributor Author

zoek1 commented Apr 21, 2020

@thelostone-mc done!

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 comment on the poll type but otherwise lgtm

@zoek1
Copy link
Contributor Author

zoek1 commented Apr 22, 2020

Done @thelostone-mc 👍

@PixelantDesign
Copy link
Contributor

The responsive view is not in this PR, could we roll this out and get responsiv view out next week?

@zoek1
Copy link
Contributor Author

zoek1 commented Apr 22, 2020

I'll work on the responsive view today, I'll notify here when is done.

Copy link
Contributor

@danlipert danlipert left a comment

Choose a reason for hiding this comment

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

Looks pretty good - a couple of small improvements id like to see before we merge it in

</h4>
{% else %}
<h4 class="font-weight-bolder">
Contratulations! <br> Your registration for {{ hackathon.name }} is successful.
Copy link
Contributor

Choose a reason for hiding this comment

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

typo here

Copy link
Contributor

Choose a reason for hiding this comment

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

spelling and spacing as well

{% endif %}
<ul class="list-unstyled">
<li class="mb-3 gc-text-blue font-weight-bold"><a href="/townsquare?tab=hackathon:{{ hackathon.id }}&trending=0&personal=0"><i class="mr-1 fas fa-check-circle gc-text-blue"></i> Introduce yourself on Town Square + what you like to build (and earn your first Kudos!)</a></li>
<li class="mb-3 gc-text-blue font-weight-bold"><i class="mr-1 fas fa-check-circle gc-text-blue"></i> RSVP our 3 workshops</li>
Copy link
Contributor

Choose a reason for hiding this comment

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

should be RSVP to our 3 workshops

option = Option.objects.get(id=int(entry['value']))

try:
Answer.objects.get(user=request.user, question=question, choice=option)
Copy link
Contributor

Choose a reason for hiding this comment

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

set_questions = {}
for entry in poll:
try:
question = Question.objects.get(id=int(entry['name']))
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm guessing that you wrapped this is a try/except to catch if these two querysets fail. Lets use get_object_or_404 instead

@zoek1 zoek1 requested a review from danlipert April 28, 2020 11:06
@PixelantDesign
Copy link
Contributor

Thanks for the updates @zoek1! Responsive views look good to me.

The modal on responsive view has different options than the normal view and design spec....could you double check why that is? See your above screenshots:

Screen Shot 2020-04-28 at 8 21 40 AM

@zoek1
Copy link
Contributor Author

zoek1 commented Apr 28, 2020

@PixelantDesign it's because the questions aren't hardcoded, any of the admins could add, modify, or remove options from the admin panel. In the video demo, I showed how to create options. The question text and the options are dynamics

@thelostone-mc thelostone-mc merged commit 9b48b55 into gitcoinco:master Apr 29, 2020
@danlipert
Copy link
Contributor

Hey @zoek1 - after merging this work I spent some additional time testing it and found a lot of issues, so I'm going to disable the popup and tell our staff not to use this functionality until it is fixed and fully tested. Here are some of the problems I found:

  • Adding multiple questions of each type results in layout issues
  • Open ended questions do not work
  • The modal pops up blank if there is no survey

There may be other problems as well as I feel you did not test this thoroughly. Please submit a followup PR that is well tested and fixes these issues - thanks

@zoek1
Copy link
Contributor Author

zoek1 commented May 1, 2020

@danlipert I mentioned in the video demo that "Open-ended questions" do not work and they don't part of the spec, this is a draft for such type of questions.
Only questions that have multiple options were requested in the bounty, the rest have support only in the backend but not in the frontend that why the issues.
The modal was my error, I thought based on the figma flow all following hackathons should have a survey so don't display the modal wasn't in my flow.
I tested many times the requested flow, and I mentioned what works and what is a draft. have you checked the video before approving the PR? 🤔

@danlipert
Copy link
Contributor

@zoek1 I see - in the future, don't include any half-completed features if they don't work properly. You have to consider the end user of this functionality who will not be aware what features work and which don't.

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