Use add_admin_route to prevent situations in the future

The CW plugin does now add an item to the sidebar but it does not add an item in the top menu on the plugins page.

To make the CW plugin put its menu items where people expect it, I believe we should be using add_admin_route so Discourse core will take care of making it appear where people expect it.

1 Like

That is a bigger update than making it accessible in the new admin sidebar. It requires a change to the route structure itself on both the server and the client. The first thing to do here is what we did, i.e. make it accessible if the site is using the new sidebar. We can also make the change you’re suggesting, but that is separate.

I would slightly disagree that the approach you’re suggesting is the only way to adhere to “discourse standards”. There is a long history of plugins, including official plugins, using a dedicated admin route, rather than a route in “plugins”. The reasons for this are various which I won’t go into here.

I don’t disagree that we can move to the approach you’re suggesting, but that is a different task. Perhaps let’s create a separate topic to track that change.

1 Like

Yep, I know all the nuances and history and reasons :wink:

I’ll split this to a separate topic

1 Like

@jumagura Would you mind giving this a shot?

1 Like