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.
테마 컴포넌트에서 이모지 추천 기능을 비활성화하는 로직이 필요하다면, 아래와 같은 코드가 작동합니다. (개념 증명을 시작했지만, 이 경우에도 이모지는 렌더링되지만 컴포저에서 추천만 되지 않습니다.)
추천기를 우회하는 조건을 직접 코드로 구현해야 합니다. 참고로 이 방법은 추천기만 끕니다. 사용자가 :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 = ...멤버를 가져오는 로직...
});
// 스태프에게만 이모지 자동완성 적용
if (!isGroupMember) {
// 또는 hate_emoji 그룹의 멤버에게는 이모지를 추천하지 않도록 하려는 경우
return; // 비스태프 사용자의 자동완성 비활성화
}
// 그 외에는 원래 동작으로 폴백
this._super(...arguments);
},
});
});
},
};
그룹(또는 다른 조건?)에 따라 이모지 추천기를 비활성화/활성화하는 제대로 작동하는 테마 컴포넌트를 원한다면, Marketplace 토픽에서 이 코드를 참고할 수 있습니다.