Rotating Composer Placeholder adds dynamic, rotating placeholder text to the Discourse composer, showing a different prompt each time the composer is opened.
I think the examples do a good job demonstrating the use case. There are lots of things to consider when composing a message. If you put just one, it’ll soon be ignored. If you put all of those, no one would read any of them. Having a different one each time increases the likelihood that someone might read and consider one of them.
Thanks! One nice bonus I found is that the component works cleanly with the rich text composer as well - the placeholder still rotates correctly there.
Since it hooks into the composer lifecycle rather than editor-specific internals, it doesn’t rely on Markdown-only selectors, which helps keep it compatible across composer modes.
If Discourse refactors the editor again in future, this should hopefully keep the surface area for breakage fairly small.
Perhaps category specific placeholders could be a useful addition? (although I sort of recall there may be a component somewhere that already does that feature)
I actually want to use this to make them ALL funny on one of my forums…
“WHAT IS WRONG WITH YOU? CAN’T YOU READ???” “What’s the difference between someone who doesn’t search before posting and a lazy arse?” "If you are reporting a bug, please first make sure it is not an arachnid. " “What is the airspeed velocity of an unladen swallow?”
Category-specific placeholders is a really nice idea - I can see it being especially useful for “Support / Bug” vs “General chat” categories, where the prompts you want users to see are completely different.
Implementation-wise, the composer context usually provides enough signal to do this cleanly:
• New topic: key off the selected categoryId in the composer model
• Reply: derive the category from the topic context
So a possible v1 could look like:
• a theme setting mapping category_id → placeholder list
• fallback to the global rotating_placeholders if no category match is found
If you remember the existing component you’re thinking of, I’d love a link - otherwise I’m happy to add this here as a feature request and gauge interest (and avoid duplicating work if it already exists).
Also - your “ALL funny” list is exactly the kind of chaotic good I had in mind
(I’d probably still mix in a few serious ones, so the occasional useful reminder sneaks through!)
That component (“Topic Template Placeholder Text”) is slightly different to what this one is doing: it uses the category topic template as the placeholder (so the placeholder is category-specific, but it’s essentially the template content).
This theme component rotates through a list of short prompts each time the composer opens (and it applies to replies as well as new topics). So “category-specific placeholders” could still be a useful addition here if we want rotating per-category lists with a fallback to the global list - especially for “Support/Bug” vs “General chat”.
But if someone’s goal is specifically “show my category template as placeholder”, that other TC already solves it nicely.