-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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/3676 Conduct Polls #4861
Feature/3676 Conduct Polls #4861
Conversation
Nice design! I think there is no debate about where to display the creation step, but what about the result? |
Oh, please do not commit the db/schema.rb file. |
This PR includes a migration. |
i will create a mock for that as well |
Another thing you might want to consider early in your work is that diaspora is a distributed network, and as such you need to ensure that polls are correctly serialized and deserialized on both ends, as well that poll answers are spread to all recipients of the post. |
Nice start! Thanks for doing this. On the design front, just some minor points: I'd like to see a radius for the corners of the boxes to match that on the Publisher window. I'd suggest changing the text as follows:
It would also be great if the poll creation pane only appeared when a user selected to add a poll, so perhaps a 'Poll' button underneath the publisher (although we have to be careful that space isn't going to fill up with too many buttons...). But a really promising start. I guess the federation aspects might be the most difficult challenges you face. Look forward to seeing your mock-up of how a user can select an option once the poll has been published, and how results will be displayed. |
I guess that's why there is a poll icon ;) |
Oh, I didn't see that (oops). Nice design. |
Awesome - looking forward to this maturing :) |
Hm, it looks quite nice though we don't have that speechbubble design anywhere else, also I think I'd prefer keep the post footer at the bottom. What about something that goes in line with the OpenGraph attachment? |
def not_already_participated | ||
if self.poll == nil | ||
return | ||
end |
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.
You can simply make this one line: return if poll.nil?
Nice progress so far! Keep up that great work :) |
poll_answers = params[:poll_answers] | ||
if params[:poll_answers].instance_of? String | ||
poll_answers = [params[:poll_answers]] | ||
end |
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.
A little trick here is doing poll_answers = [*params[:poll_answers]]
, which can also save the local if you chain the each right to it.
Alright I think we're getting into the final phase here. My open points would be:
|
I'd agree with this. If you can make it so that the input area extends downwards when text wraps over a line, it would be good to have all the inputs the same width. One suggestion (I think I might prefer this) would be to replace 'Remove answer' with a small grey 'x', and extending the input areas to the right. I'd suggest changing the colour of the bars in the results graph to something paler/less strong colour, perhaps $background-grey. But that's a nitpick according to taste. @MrZyx, what do you think about having something (a title, for e.g.) above the results to indicate that what is below is a poll in Diaspora and not an OpenGraph preview? At the moment, because the design is so similar to OG previews, it doesn't (to me) stand out as something different. I like the streamlining of the designs, that'll look good in the stream, but something to distinguish a Diaspora poll would be good. How about using a slightly larger version of the poll icon from the publisher, placing that to the left of the title (and possibly in $blue)? |
I don't think we need to differentiate, I would even go as far as removing the "hide poll" link. As a user I shouldn't care whether this comes via OpenGraph or via Diaspora, if both are available they just stack. That I can interact is clear through the button in our button design. I'd might consider making the radio boxes a bit bigger. |
I agree we can remove the 'hide poll' link. Which reminds me of something I meant to suggest earlier: should we (at least by default) hide the poll results until someone has voted? This would help avoid people's votes being biased by the current results (I can't remember the name of this statistical/psychological effect). One possibility, if we want in some cases for people to be able to see the results, would be to introduce an option in the poll creation form, 'Allow people to see the results before voting'. Current results would be hidden by default, but if this option was selected on creation, there would be a 'show results' link available to people viewing the poll. I think it needs to be more immediately obvious how to vote in the poll. I hasn't realised the circles on the left were radio buttons. Hiding the results graph by default would, I think, make it more obvious that these are buttons and that's how you vote. |
@JannikStreek, I've just pulled this into my local copy of Diaspora, and have a few comments. I hope they're useful.
|
@goobertron thanks for testing! The version you just checked out contained some bugs and glitches, so some of your remarks are already fixed, I guess. The correct icon will follow soon. By the way: I think the word you were looking for is "suggestive questions" ;) You are right that some people might get influenced. However, I dislike polls where I can't see the result until I voted. Also, I guess most poll questions are not that critical...so if some people are influenced I don't think that's a big issue. But we can discuss that, I just chose here usability over better results. @MrZyx poll creation in the bookmarklets is not working right now, I will have a look at that. Can you point me to the icon you are referring ? |
About the show / hide results, I think a setting to allow / disallow readers to be able to see the results if they didn't vote is too complicated. In my opinion, simply hide the results and add a link "Show the results" even if the person didn't vote should be enough. |
I've just pulled the latest code. The post is now made successfully, but the poll still doesn't appear. The poll icon is still a much lighter grey than the other icons in the publisher. One thing I forgot to mention before: I think there should be two options available by default. In fact, I think it shouldn't be possible to publish a poll with fewer than two options. That's totalitarianism! ;) Maybe we could allow polls with one option just for fun, but the default should be a minimum of two options so that one doesn't have to add an option just to give people two options to choose from. |
Actually its already not possible to submit a poll with only 1 option..but i guess you are right with the 2 standard options, i will fix that. |
Thanks. I really like your work! |
And not just because you obey me... ;) |
:P Thanks |
|
ok fixed, I guess I pulled in the wrong moment ;) |
Okay, great, let's just wait for Travis one last time. |
Thank you very much, looking forward to the follow up PRs :) |
@@ -65,3 +65,6 @@ dump.rdb | |||
|
|||
#Rubinius's JIT | |||
*.rbc | |||
|
|||
#IDE | |||
diaspora.iml |
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.
Oh and I accepted this but as a little tip for the future: You can have a clone local ignore file by editing .git/info/exclude
Awesome to see this merged in - nice to have new big features land to users! :) Thanks! |
Really nice contribution! I hope we are still going to see great work like that coming from you :) |
I'm going to pull that in diaspora-fr.org, if you want to test it in production, you can log in using testaccount / testaccount. Do podmins need to do something special or a simple pull / asset precompile / database migration / bundle is enough? If something is needed, it has to be add to the changelog. |
Yes, thanks a lot @JannikStreek. Hope you've got the Diaspora bug now and will be contributing more in the future. |
@JannikStreek Awesome! Thank you for your work. I agree with @Flaburgan and hope that you will continue contributing. :) |
@Flaburgan, pulling into my test setup it was the normal procedure you've listed. Hopefully the same for production setups. |
thanks, I'll try to contribute more in the future :-) |
Just a little idea here, I want your opinion before opening an issue. Should at least the question of the polls be added to the notification email when someone comment on the post? |
Hm, no I think that's not useful. |
It might be if somebody asks a question in the comments referring to the poll, but you are unaware that the post included a poll. But in that case you could check that on diaspora directly, i guess. |
And I guess you'd recognize your own post that had a poll. |
Oh, another point: the poll is not present in the single post view. |
Damn :D I will create a new PR for that in the next couple of days. |
@JannikStreek The SPV uses Bootstrap so these progress bars might help: http://getbootstrap.com/2.3.2/components.html#progress |
@JannikStreek sorry I didn't find another way to contact you, we have our IRC monthly meeting today at 19h30 UTC on #diaspora-meeting on freenode, if you wanna join us :) |
refs #3676
Still in progress, but I would like to get some feedback. So far I thought the best place to create polls would be directly at the post creation (see screens), so you can add a poll to a post by clicking the poll icon. Any thoughts?