Could you include a brief summary of the issue you’re facing/why this user preference would be beneficial here in the OP as well. It makes for a much more well-rounded feature request (and saves people hunting the info down in links )
As french, I sometimes type <space>:<return>. (<return> wants to make a new line, not validate a suggested emoji.)
I also often type smileys, notably “:-)”, and still at the end of a line. It is converted in ":slight_smile: ". I don’t like that, because, even if it gives the same result, it makes it harder to review the message before posting it.
I’m a discourse.gnome.org user, and they tell that they can’t help me because it’s a site-wide setting. That’s why I would like you to make it an user-wide setting, please.
Alternative: You could find an other way to validate a suggested emoji in the auto-complete feature (maybe <tab>?), so <return> will be considered as continue typing, ignoring suggestions, like <space>.
Sorry, does that mean I should edit the 1st post instead of put it below it?
As a dev, I hate to let lost spaces where they are useless. I find it’s dirty work.
So I have the habit to type <space>:<return>, and I wouldn’t very much like to acquire the reflex of <space>:<space><return>.
<space>:<space><backspace><return> doesn’t work, too, since it opens the auto-complete box again.
The point is: I have the habit to type <space>:<return> in any plain text editor, and I would like very much it gives the same result in Discourse. That is, all these keys would be considered as typing flow / text flow (not only <space>), so auto-complete suggestions would have to be ignored.
Why not use <enter> instead of <return> (the one on the numeric part of the keyboard)?
Since it uses <arrow-up> / <arrow-down> to choose the emoji, it could also use <arrow-right> to validate it, given that <arrow-left><arrow-right> does not open the auto-complete box again.
hmmm, sorry, I am not following your argument. Just to clarify - I gave you a simple solution, but you are saying it is not good enough because you have habit of using :return; so you feel that we should introduce a new functionality to user preferences for this? FWIW, I don’t believe I’ve seen this particular feature request yet.
and :<space><backspace><return> is not a workaround,
and I wouldn’t like to acquire the reflex of :<space><return> and type it in any plain text editor, because it would make dirty work, particularly in code and official doc.
What’s the new functionality?
What I understood is: There is already a site-wide setting, and I suggest to make this setting user-wide.
I just discovered that GitLab also has an auto-complete feature, similar to Discourse one, except that there is no selected emoji when it opens the auto-complete box, so the user has to type <arrow-down> to choose the 1st suggested emoji.
Then, :<return> is considered as typing flow / text flow, and auto-complete suggestions are ignored.
It opens the auto-complete box even when : is typed after letters, and I don’t think it bothers anyone.
Users have to type <arrow-down><return> instead of <return> to get the 1st suggested emoji.
I’d like to +1 on this request, I’ve had users request that smilies are disabled for them because they want to type the old fashioned ones instead like : )
Do your users want Discourse to display :-) instead of ?
In that case, if you are an admin, you can already disable smileys for the whole server (site-wide disabling).
if you want a user-wide disabling, could you precise if you want for a given user to have smileys disabled for all posts he reads, or only for his own posts?
In the 1st case, be careful, I don’t think Discourse would translate :slight_smile: in :-) when it has been written by an user who didn’t disable smileys.
For me, I asked for disabling only emoji auto-complete, because it bothers me only while writing posts, seeing :slight_smile: instead of :-). But it doesn’t bother me to see either in the preview pane or while reading posts.
If someone wants logic to disable the emoji recommender in a theme component, something like the below will work. (I started a proof of concept, but this still allows emoji to be rendered, just not recommended in the composer).
You’d need to code up the conditions for when it bypassed the recommender. It turns off only the recommender, though. Emoji are still rendered if they type in something like :persevering_face:
import { withPluginApi } from "discourse/lib/plugin-api";
export default {
name: "disable-emoji-autocomplete-non-staff",
initialize() {
withPluginApi("0.8.12", (api) => {
api.modifyClass("component:d-editor", {
_applyEmojiAutocomplete() {
let isGroupMember = ...logic to get members...
});
// Only apply emoji autocomplete for staff
if (!isGroupMember) {
// or maybe you want to make it not suggest emoji for members of the hate_emoji group
return; // disables autocompletion for non-staff
}
// Fallback to the original behavior otherwise
this._super(...arguments);
},
});
});
},
};
If you want a proper working theme component that disables/allows the emoji recommender by group (or maybe something else?) you could point to this in your Marketplace topic.