-
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
Add poll for single post view #4894
Conversation
Nice. How do the results look like? |
I render the poll view in SPV subviews and add poll styles to new-template.scss witch is used in that place. |
@hpetru Like I said in #4861 the SPV uses Bootstrap so these progress bars might help: http://getbootstrap.com/2.3.2/components.html#progress |
@svbergerem Ok, I update later my commit for use Bootstrap progress bar |
Please not in default bootstrap colours, though! If you can use the light grey of the bars in the original PR (I think it's $background-gray) that would be good. |
I like it! |
It looks good in that example. Keep in mind, though, that some polls will have options with longer text. I suggest having the bars start at the left, with the text overlaid on the bars. The percentage can be placed at the right. This would help when there is longer text in the options. You may have a more elegant solution for these cases, of course! |
I'd try a darker progress bar and I am not sure about the usage of the ".label" class for the percentage. Apart from that I think it's great! @goobertron What would you suggest if the text is too long for the bar? |
I don't think it's a problem if the text exceeds the right-hand margin of the bar. It's more important to fit the text and bar on the one line. (If someone makes an option with ridiculously long text, then that's their own silly fault. We could possibly look at limiting the length of text for poll question and options in future to avoid that...) |
I'd also look into designs that put the text above the bar. |
Wow that is indeed much better! The percentages just seem to be far away. I think they should be next to the answer, perhaps on the left. Let's see what the others think of that. |
I like it, maybe increase the height of the bars a little bit. I think the percentages are fine there, I like them all on the same vertical line and imagine having them left would look weird. We can always think about reducing the overall width to make them closer to the text. Do you have some examples with extraordinary long answers? Possibly ones that would need to go over multiple lines? |
Ooh, I like that too. I agree that it's good to have the percentages aligned vertically (and preferably ranged right on the % sign, as in your latest screenshot). You could experiment with making the bar slightly thicker/taller, to see how it looks, but I like the compactness of the overall results presentation here, and would be wary of making it too much expanded vertically, which could make it look less well presented and less coherent. (Apologies if this is not easy to understand.) ps: I'm impressed you managed to split 1 vote into 20%, 40%, 25% and 15%! ;-) |
I'll just throw in the question whether we really need both the bars and the percentages, as the bars express the percentages in graphical form, although one can't easily tell the exact percentages from looking at them. I suppose the individual percentages could be displayed when hovering over text or bar for the relevant option. How about that? Obviously that wouldn't work on mobile, but the mobile version will need to be created separately in any case and I guess a small number of people use the desktop version on touchscreen devices. |
@goobertron I think both bars and percentages are important and should be visible without any hovering. |
Looks good! I also like the percentages on the right side. Because the bars are scaled 100% it's also easy to follow which figure goes with which bar. |
@goobertron I support the opinion of @svbergerem about the visibility of percentage. |
Just pulled into my dev pod. I think you made the bars a bit thicker which looks nice. @MrZyx Answers that need multiple lines: |
I think that looks really good. And I don't think we need to worry too much about options in which the text is too long for one line, as that's likely to be an uncommon use case. |
Yeah, I agree that looks good. And I also think it even still looks good if the answer spans multiple lines. Do you consider this done? |
Yes, if are not corrections or suggestions ) |
Thank you! Would you be willing to bring the stream version in line with that design? |
@MrZyx yes, of course |
Thanks a lot @hpetru. |
@goobertron With pleasure ) |
fix: #4893