Understanding Solved Plugin

Hi,
I am trying to understand the solved plugin to get a better idea of creating plugins. I had a few questions about code snippets from the solved plugin.

https://github.com/discourse/discourse-solved/blob/master/assets/javascripts/discourse/solved-route-map.js.es6

In the tutorial for developing plugins, there was a path field, why isn’t there one in the solved route-map?

In the plugin.rb file, I couldn’t find the solved plugin version of

add_admin_route 'purple_tentacle.title', 'purple-tentacle'

How does the solved plugin, achieve the solved interface in the user activity? How are the notifications linked to this interface?

Thank you

2 Likes

https://github.com/discourse/discourse/blob/master/config/routes.rb#L397

As per the above code a common filter path is already available in Discourse core. So we don’t need to add the solved activity filter u/:username/activity/solved again in plugin code.

5 Likes