Current topic icons represent a topic status: closed, unlisted, solved, pinned, etc. Not the first post content. Doing this would completely break the pattern hurting Discourse consistency and learnability.
A very simple work around that would only require a theme component would be to keep all your polls in one category. Once you do that it is straight forward to add an override that will add a poll icon to the topic lists cause it will require no backend server changes.
Or maybe even simpler … tag all your poll topics with the poll tag, then you can use the tag icon component and give it a nice visual cue. Would also make it super simple to find all the polls.
Nice idea Sam, thought unfortunately that would only really work if the forum was about a single topic, otherwise you start taking things out of their natural section/category. For example if you had a forum about web frameworks (with sections for Rails, Phoenix, Django, Express, Laravel, etc) and people are using the categories for discovery of those topics (ie content that interests them) having related topics (in this case polls) moved out of the section would make that harder.
On this new forum we are categorising things by type, so Backend Dev, Frontend Dev, Game Dev, Mobile Dev etc with each then having their sub categories (chat, questions, jobs, etc) and I had actually put a polls sub-cat in each, but we end up with too many sections so have removed them.
I’ll have to have a play with that but my first thought is that you’ll end up with a tag that is different to the others (although it could also come in handy for language logos etc). We’ll definitely be encouraging use of the polls tag though.
This makes me wonder whether…
Could it be time to expand these to now act more like topic icons (rather than just about topic status)? I think topic icons can make a forum feel more dynamic and interesting (/less visually boring). So there could be an icon for polls, and another for an attached image or file. The latter would help those on mobiles with limited bandwidth too - so they can avoid anything requiring a download.
In a way the current icons are already beginning to do this, we have a bookmarks icon (which I love!) an icon that suggests an answer has been posted in it and, I’m not 100% sure as I don’t use them, but an icon when a link is posted as the topic too? So we’re already on that path it seems?
The way this could be done (in my mind at least) would be to use a conditional to check if a Topic includes a poll, then display the icon, otherwise display what it normally would. At least that’s how I would do it in other forum software. The only issue I am finding with Discourse customisation at the moment, is that a lot of the things I’ve wanted to modify are in a template that is too big - I think we need a lot more separate smaller templates that we can override without it impacting maintainability too much. I’d love to see this and I think more people would customise more too.