Disable “Your topic is similar to…” overlay for some categories

Hi,

The “Your topic is similar to…” overlay while typing a new topic is a great feature, especially for Questions, but for other topics it may be better to skip it and just show the message preview.

In particular, we have a “Jobs” category for posting job offers, and a “Showcase” category for people to show their work.

In both cases, the fact that similar topics were posted before is irrelevant. Apparently there is no setting to disable this overlay for individual topics, would you consider adding this ?

8 Likes

There is indeed no setting, at a minimum I support adding some classes here to the composer so you can suppress it using CSS if you wish.

2 Likes

Hi @felixmariotto

In the meantime, I tried this simple jQuery for you but it only works when the page is reloaded, unfortunately (not much help, FYI only I’m afraid). There is a Discourse API call to execute code when the page changes, but it only seems to work for me when I reload the page manually, not when I navigate to the page, so I could not get any better results than “hide on page reload” using the following very simple jQuery selector:

In this example, the snippet hides the stuff you want to hide if the category contains the word “Applications”, FYI only:

<script>
$( document ).ready(function() {
      var cat = $('.category-name').html();
      if(cat.includes('Applications')){
          $('#suggested-topics').hide();
      }
});
</script>

If I understood Ember lifecycle hooks better, we might be able to add this kind of simple code to the appropriate lifecycle hook; but truthfully and unfortunately, my Ember skills are really lacking, almost non-existant to be honest.

1 Like