Plugins settings list readibility

AI-generated summary

The discussion revolves around improving the readability of plugin settings in Discourse. Canapin suggests separating each plugin’s settings with a <hr> or title to make it easier to identify which setting belongs to which plugin.

sam points out that plugin authors can categorize their settings, but sometimes a plugin only has a few settings, making a whole section unnecessary. sam also proposes changing the filter URL from /plugins?filter=affiliate to ?filter=plugin:discourse-affiliate to make it easier to find plugin-specific settings.

nbianca implements a search filter for site settings, allowing users to filter by plugin name. Dannii suggests that if the system starts tracking which plugin owns which settings, it could also be used to show the “Settings” button for plugins with no enabled settings.

nbianca and Dannii discuss the issue, and nbianca eventually merges a pull request to add the “Settings” button for all plugins with more than 0 settings, regardless of having a plugin_enabled site setting.

Hi, sorry if it has already been suggested, I didn’t find anything using the search.
When we have some plugins, their settings are all in the “plugins” section of Discourse settings.


Even if the settings are sorted by plugin, It’s hard at first glance to see which setting belongs to which plugin as there is no separator of any kind between settings “groups”.
Especially when for a same plugin, settings names don’t necessarily begin with the same word.
For example:

  • askimet notify user
  • skip akismet posts

Is it possible to separate each plugins in this list? A <hr> would do the trick I think, and/or maybe with a title containing the full plugin name?

12 Likes

Yeah there is a bit of an “explosion at the script factory” in this particular area…

7 Likes

There is nothing stopping us (the plugin authors) from properly categorizing stuff as you can see here (these are plugins putting stuff into a dedicated section):

Trouble is sometimes a plugin only has 1 or 2 settings and giving it a whole section is overkill.

The big thing I think I would like fixed is this mess, when you click settings:

/plugins?filter=affiliate

Instead perhaps:

?filter=plugin:discourse-affiliate

That way if a plugin sprays itself into multiple groups or omits a keyword in a setting the button will still work.

I guess when plugins register settings core is going to have to keep track on the server which plugin owns which setting.

I am slotting this particular change to our next release, cause it is small and makes a big diff.

14 Likes

@nbianca can you add that to your list?

4 Likes

If it starts tracking which plugin owns which settings, could this also be changed?

3 Likes

I implemented a search filter for site settings “plugin:PLUGIN_NAME” which will only show settings of “PLUGIN_NAME”. The Settings on plugins page will use it. Also, a user can combine this with other words, for example: “plugin:PLUGIN_NAME enabled” will show any setting containing word “enabled” for plugin “PLUGIN_NAME”.

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

Hmm :thinking: … I am not sure if I understand your request. It looks like that button is shown no matter if the plugin is enabled or not. :blush:

9 Likes

It’s only shown if there is a plugin_enabled setting. If the plugin has other settings, but no _enabled setting, then the button isn’t shown. If an example would help, my Merge Users Plugin is one of those.

5 Likes

It is working great! I agree with @Dannii , we should add the “Settings” for all plugins that have more than 0 settings, regardless of it having a plugin_enabled site setting.

4 Likes

Yes, I’m merging that now. :blush:

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

7 Likes