DEV Community

Ben Halpern for The DEV Team

Posted on • Updated on

Feedback on this new DEV feature?

🚨 Polls are not a functional feature on DEV/Forem. This post purely represents a proof of concept.


Here is a thread I made earlier today:

And before getting into what I've been up to this weekend:

My other answer:

I've been using this weekend to ship some ideas which haven't found their way into the weekday priority bin for me or the rest of the team. Low pressure time to hack on anything I want is my favorite part of the job.

One such feature I just pushed and would love some feedback on:

Polls!

Are polls a good idea for DEV?

Before you get too excited, this feature currently only works for admins, and even for admins, you can't actually create a poll outside of the console.

I'm a stickler for maintaining usefulness and accuracy with polls and surveys, even if these aren't necessarily for scientific use. As such, I think we'll want to collectively come up with good rules around whether articles that contain polls are allowed to be edited after they are published (probably not, right?) and things like that.

We will also want to come up with a good interface for including polls in posts. Two approaches come to mind.

First create the poll in separate UI and then drop in to a post like this:

{% poll e41 %}
Enter fullscreen mode Exit fullscreen mode

Define the poll entirely inline:

{% poll %}
How do you pronounce dev.to?
- dev dot tee oh
- dev dot too
- dev dot toe
- dev toodilydoo
- dev too
{% endpoll %}
Enter fullscreen mode Exit fullscreen mode

How should polls be created?

The poll functionality should be extensible for creation of surveys and other neat things. I think it could be fun and very useful for the industry if we get this right. I also think it would be cool if we created some aggregate data analysis of polling trends as folks use the feature which could be anonymized and released for analysis. It could be a fluid way to help people make better choices about the software they build. Before doing that we'd want to be very clear about how the data would be used and offer simple opt-out options for having your votes included in this kind of aggregation.

I'm not sure when this will ship for general use, but feel free to hop into our repo and improve on anything here. Since this was mostly a weekends feature I'm releasing it as a bit of a surprise, so the rest of the DEV team may be finding out about it via this post. πŸ˜„

Polls currently accept up to 15 options and allow for use of some inline markdown tags like the code element. Option count is pretty arbitrary but maybe we can hammer out all the little details while it is in closed beta. Multi-option polls also seem like a good idea. I left the schema flexible enough to build towards that idea but did not implement it in this push.

Here is a poll that could have been included in the above-mentioned thread about coding on the weekend:

How often do you code on the weekend?

P.S.

Speaking of new things... If you check out the "three dots" menu in the post "reactions" area, you can see new notification settings which allow you to subscribe to comment threads. This will be useful for keeping up to date with interesting discussions, AMAs, etc. depending on the post.

We think folks will find a lot of value in that usage pattern. We want to ship some additional tooling for providing more context within the notification page before we make a big announcement/push about this feature. But as long as you're reading this little weekend announcement I felt like I'd let you in on that as well.

If you follow along in the repo, you might have already known about all of this stuff already.

Happy coding!

Latest comments (41)

Collapse
 
peledzohar profile image
Zohar Peled

What if I want to see the results and only then cast my vote? That's usually a valid option in most online polls I've seen...

Collapse
 
akhiljp_dev profile image
Akhil Jay

is the polling functionality live? I wish to use it for my new post dev.to/akhiljp_dev/would-you-pay-f...

Collapse
 
k_penguin_sato profile image
K-Sato

Very cool

Collapse
 
glennmen profile image
Glenn Carremans

I love this! ❀️
I understand to keep it for admins only for now but hope to see it available for everyone soon.

If I knew that DEV was already working/planning on something like this I wouldn't have made my blog post a couple weeks ago πŸ˜‰

Collapse
 
healeycodes profile image
Andrew Healey

I probably wouldn't use a poll if it meant that the article couldn't be edited.

I'm always going back to make minor revisions (e.g. commas, fixing code typos, adding things people mentioned in the comments and tagging them).

Collapse
 
jsn1nj4 profile image
Elliot Derhay

I wondered about that too, though I do see why Ben is concerned with editing after a poll is published.

It looks like a couple of people have suggested allowing editing and letting users see post revisions to compensate for this concern. That would definitely promote good behavior.

Collapse
 
healeycodes profile image
Andrew Healey

That sounds like a perfect solution. I would feel more comfortable editing my articles if readers could see the history πŸ‘

Collapse
 
moopet profile image
Ben Sinclair

I think polls would be better as surveys with more questions.

Other platforms have polls and people tend to either just use them for fun or use them to get unhelpful stats.

"Do you use Photoshop Yes/No" isn't helpful unless you know the demographic, so having other questions like "are you a graphic designer" in the mix would be really cool. You could either do this as a single object or by linking all the polls in a single post as if they were related.
We could pull out some really nice stats and a little graph or something. That would be such a cute feature compared to, say, Twitter surveys.

Collapse
 
ben profile image
Ben Halpern

Yep, had similar thought in mind. I’m thinking that this functionality could sort of be like a progressive enhancement on top of the basic poll functionality.

Collapse
 
jckuhl profile image
Jonathan Kuhl

Polls are fine, so long as those using and reading them understand that these are not scientific and only get a vague sense of how the community feels.

Highly unlikely that any article will get a sufficiently random sample though. But again, it's fine so long as they're not treated as scientific.

Collapse
 
briwa profile image
briwa • Edited

whether articles that contain polls are allowed to be edited after they are published (probably not, right?)

Edited article is a different problem on its own, IMO. Whether or not they contain polls, allowing users to edit articles is tricky. I saw your example with kittens poll down below, but IMO that could be applied to any articles, say, well-received article with dozens of likes about users' pets then the author edited the article's title and description to, "List of animals that poop too much". I'm not saying anyone did/would do this, but it is possible.

If I may, dev.to shouldn't disallow users to edit articles with polls as much as dev.to always allowing users to edit articles on any circumstances. That would make it consistent. What could be improved, though, is telling users that an article has been edited.

Discourse has the entire history of the post changes recorded for the readers to compare versions, which IMO what is lacking in most of the content creating platform. Probably it's there because us devs (at least me) love this style of version comparison. (example, click the pencil icon next to the date Nov '18). And I think we all know other platforms that did this as well: Wikipedia, Google Docs, to name a few.

Sorry for going on a tangent like this, it's always something that bugs me too much, even giants like Medium isn't doing it well IMO. I'm not sure if it's already in the roadmap or if it's going to be implemented, just my two cents. I can also foresee that some people would see this as a nice-to-have, which I'm fine with that.

As for the polls, yes, it looks great. But it's true what others mentioned that polls could 'kill' the conversation, because typically polls can simply stand on its own. People might be discussing more on the results rather than the poll itself. But, as an add-on to what is already a great content creating platform, why not?

Collapse
 
ben profile image
Ben Halpern

This is all really valuable feedback. We've had the idea of displaying past changes to a post as something we'd want to add in general. This could let us implement that feature with polls in mind as a use-case.

Definitely will add a feature to prompt conversation post-vote. I think this can be dealt with through design choices and we'll see if we can split test to make sure we're having a good impact here.

Collapse
 
peledzohar profile image
Zohar Peled

You can do what Stackoverflow does: They have a grace period of 5 minutes where you can edit your post and it will not show in revision history (which is great for fixing typos and stuff like that), but any edit after that period is visible to anyone that clicks the "edited" link.

Collapse
 
juliansoto profile image
Julian Soto

I'd prefer to write polls in like a markdown format to keep it simple and consistent.

Collapse
 
thomasbnt profile image
Thomas Bnt β˜•

woaah greaaat!

Collapse
 
felipperegazio profile image
Felippe Regazio

Nice! Another approach could be: the post card at the timeline has/is the poll, and the post content has/is the text and discussion about it.

Collapse
 
maheshkale profile image
Mahesh K

Loved it! I wonder if we can get option to skin the poll box. Like values for background color of poll and also result section?

Collapse
 
itsasine profile image
ItsASine (Kayla)

The poll results are grey on grey in dark mode, for what it's worth.

I would have thought step one would have been embedding Google forms or some other poll service and then rolling your own, but you do you :P

I prefer the inline way to make it clearer what will be in the finished article, though what would happen to results if I add an option later or completely edit the existing options like:

{% poll %}
Do you like kittens?
- Yes
- Also yes
{% endpoll %}

edited to

{% poll %}
Who is the best ruler ever?
- Pol Pot
- Hitler
- Other
{% endpoll %}
Collapse
 
ben profile image
Ben Halpern

I'll get the dark mode color issues fixed in a next push.

And yeah, I think once a post with a poll is saved, it should not be possible to edit it.

From an implementation details perspective, the poll would be committed as a record in the database upon publication and not before that, and once published the whole post would not be editable (with a big message warning of this fact). This would help keep both the poll consistent but also ensure the context around the poll doesn't change. So you couldn't this scenario where:

Kittens are great.

{% poll %}
Do you agree?
- Yes
- No
{% endpoll %}

Becomes:

Drowning kittens is great.

{% poll %}
Do you agree?
- Yes
- No
{% endpoll %}

(Sorry for the disturbing visual)

Collapse
 
itsasine profile image
ItsASine (Kayla)

Poor kittens 😿

Sounds like the feature's thought out πŸ‘ Looks like a solid idea :)

Thread Thread
 
ben profile image
Ben Halpern

No kittens were harmed in the making of this feature

Collapse
 
cookrdan profile image
Dan

I’ve been meaning to ask about polls. I thought that be a great feature. Thanks for working on it!

Collapse
 
ben profile image
Ben Halpern

Woohoo!

Some comments may only be visible to logged-in visitors. Sign in to view all comments.