config: add tag suggestions

This is intended to make the tags feature more discoverable, as people
keep requesting "plugin categories". Putting plugins into a singular
category that will make sense for most users is impossible, as many
plugins will can logically be placed into multiple categories.

The Category Tag list is intended to be a short, curated, list of tags
that are helpful to a user trying to find plugins.
This commit is contained in:
Max Weber
2020-05-15 02:19:08 -06:00
committed by Adam
parent d8d5631734
commit 8571262840

View File

@@ -24,6 +24,7 @@
*/
package net.runelite.client.plugins.config;
import com.google.common.collect.ImmutableList;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
@@ -74,6 +75,15 @@ class PluginListPanel extends PluginPanel
{
private static final String RUNELITE_GROUP_NAME = RuneLiteConfig.class.getAnnotation(ConfigGroup.class).value();
private static final String PINNED_PLUGINS_CONFIG_KEY = "pinnedPlugins";
private static final ImmutableList<String> CATEGORY_TAGS = ImmutableList.of(
"Combat",
"Chat",
"Item",
"Minigame",
"Notification",
"Skilling",
"XP"
);
private final ConfigManager configManager;
private final PluginManager pluginManager;
@@ -150,6 +160,7 @@ class PluginListPanel extends PluginPanel
onSearchBarChanged();
}
});
CATEGORY_TAGS.forEach(searchBar.getSuggestionListModel()::addElement);
setLayout(new BorderLayout());
setBackground(ColorScheme.DARK_GRAY_COLOR);