-
-
Notifications
You must be signed in to change notification settings - Fork 776
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
Add hooks and add new question type #6778
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6778 +/- ##
==========================================
+ Coverage 26.93% 26.94% +0.01%
==========================================
Files 297 297
Lines 28373 28434 +61
Branches 4153 4168 +15
==========================================
+ Hits 7641 7662 +21
- Misses 20458 20497 +39
- Partials 274 275 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lookin good!
Could we add the background color and circular design around the avatar for these cards?
Should T's&C's be on it's own. question @frankchen07 ?
I'll add the styles in another PR, i just want validate with @frankchen07 that the questions and the card works as expected, is that ok @PixelantDesign ? |
app/dashboard/views.py
Outdated
hackathon=hackathon_event) | ||
answer.open_response = entry['value'] | ||
hackathon=hackathon_event, | ||
open_response=entry['value']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we fix up the indentation ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the videos. It looks good to me. Just one question/comment @zoek1:
what's the "on" entry for the terms and conditions (single choice) question?
It was an error of duplication, but now it's fixed. The "on" should not appear anymore @frankchen07 |
sounds good! so the styling will be in another PR? |
@zoek1 - one more, the X to exit the survey doesn't work, you can only exit if you click outside the survey. Can we get the X to work properly? Hopefully it's not a huge fix. If they exit prematurely, they also don't finish their registration, they'll click register again and it will drop them off at the same question they left off on. I think we can leave this as is. |
new hooks for the townsquare team formation/intro experiments look great! also thanks for fixing single choice and single options @zoek1! LGTM from the loom video |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great @zoek1!
The last thing I see is the image behind the profile icon on the townsquare registration card.
After that we can request engineering review!
@PixelantDesign + @frankchen07 Approve the PR so that we know when it's good for engineering review 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good Zoek, is this working fine with the others flows?
Example, when you find a hackathon bounty on normal explorer and click start work you are redirected to hackathon register page and then moved back into the bounty.
Or when you are not logged in, ask first to login?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved in general but I do worry about the image upload handling w/ S3
def img(self, instance): | ||
header = instance.header | ||
if not header or not header.image: | ||
return 'n/a' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why return n/a here instead of just None
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zoek1 could you fix this up in a follow up PR please ?
header = instance.header | ||
if not header or not header.image: | ||
return 'n/a' | ||
img_html = format_html('<img src={} style="max-width:30px; max-height: 30px">', mark_safe(header.image.url)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to other reviewers - generally we probably wouldn't allow this with the mark_save
tag but in this case its probably ok since only Admins should have the ability to set and add an image
@@ -5026,17 +5029,39 @@ class Poll(SuperModel): | |||
hackathon = models.ManyToManyField(HackathonEvent) | |||
|
|||
|
|||
class PollMedia(SuperModel): | |||
name = models.CharField(max_length=350) | |||
image = models.ImageField( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a feeling this won't work in prod because of the way static files are handled - @thelostone-mc @octavioamu what do y'all think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm it's done like that for a few other image fields in our model 🤔
yay thanks! |
awesome, excited to get this up and going |
Description
https://www.loom.com/share/2cc38958f2e747e8973b248f0a1f3272
https://www.loom.com/share/df3d0cc3b3ad42bc8721df86d21c76a9
Refers/Fixes
#6443
#6818 (comment)
Testing
Full demo
https://www.loom.com/share/09491d01b0aa488f9e470bc55cba3cdd
Add images to forms
https://www.loom.com/share/96e866f704934c3187bcca800c2e0f4d