Can't always select any category in composer

Summary

There are some scenarios when working in the composer to create a new topic, I can’t choose from all the available categories. They seem to be restricted, based on where I am when I start the “create new topic” process.

Expected Behavior (control case)

  1. Click the :heavy_plus_sign: New Topic button on the main site home page.
  2. The composer window appears. Any category for which I have permission to post appears in the drop-down list.

Actual Behavior (problem case 1)

  1. Go to a random topic such as Secure Uploads and click the :link: button then :heavy_plus_sign: New Message to fork the topic.
  2. The composer window appears, but only categories feature and Uncategorized are available.

Actual Behavior (problem case 2)

  1. Go to a category listing page with subcategories, such as plugin.
  2. Click the :heavy_plus_sign: New Message button to start a new topic.
  3. The composer window appears, but only the current category and subcategories, e.g., plugin and #plugin:broken-plugin, are available.
4 Likes

Our default behavior is to scope the composer to the current category, all other categories are searchable, some previous discussion here:

7 Likes

There might be a regression with search though, writing a test and fixing it.

7 Likes

This might be why I haven’t noticed it until lately; I would always type out the category I want rather than scroll.

Thanks for the leads all.

2 Likes

That should fix it:

https://github.com/discourse/discourse/pull/9031

There was a test, but sadly it was too forgiving and couldn’t catch this, I updated it to make it more obvious and strict that we are testing this behaviour.

11 Likes

This topic was automatically closed after 24 hours. New replies are no longer allowed.