DEV: Plugin api for adding category admin dropdown items (PR #9927)

It is suprising difficult to add an item to this dropdown right now.

Screenshot from 2020-05-29 10-33-50

The actions for the items are defined in app/assets/javascripts/discourse/app/components/d-navigation.js, but the items themselves are defined here.

This plugin api gives a single function to add an item to the dropdown, as well as a function to call when the item is clicked.

GitHub

It is suprising difficult to add an item to this dropdown right now.

It’s actually very easy :stuck_out_tongue: I don’t do it on every dropdown because there are many different cases, and for example historically categories-admin-dropdown has been defining actions a little bit differently than other cases. But with only a little tweak to the component, we can leverage select-kit plugin API without having to write a dedicated API.

I propose the following PR instead:

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

@jjaffeux Yeah that is fine! What I do