Skip to content

components/plugin-suggestion-component

Component that suggests installing another community plugin the host plugin needs in order to offer some of its behavior.

A suggestion is not a dependency — but a dependency is now a thing this library HAS, so the choice between them is a real one. Use a suggestion when the other plugin ADDS something: the host keeps working without it, simply unable to offer whatever that plugin owns, and this component asks once whether the user would like it installed. Use PluginGateComponent when the host’s advertised behavior is not there at all without the other plugin.

This file used to argue the stronger position — that requiring another plugin should not exist, because “inventing one by refusing to load would punish the user for something they never agreed to”. That was wrong about which option punishes the user, and the counter-case is worth keeping rather than quietly deleting. A load-bearing plugin the user cannot identify is not a neutral outcome: months later they meet it in their plugin list, nothing in Obsidian’s manifest format says anything depends on it, they remove it, and the damage surfaces weeks after that with no way to connect the two. Beside that, a mandatory dependency that stays enabled-but-inert, names what it is waiting for, installs it in one click and resumes without a restart is not a punishment — it is the same information, delivered while the user can still act on it.

The ask is surfaced twice, deliberately, because the two placements answer different questions: a notice on load (“you are missing something you probably want”) and a settings-tab banner (“the settings you came looking for live in another plugin”). Declining silences only the notice — a user who opens the settings tab is asking about the feature right then, so the banner stays.

Class Description
PluginSuggestionComponent Suggests installing another community plugin, via a load-time notice and a settings-tab banner.
Interface Description
PluginSuggestionComponentConstructorParams Parameters for the PluginSuggestionComponent constructor.
Type Description
SuggestedPluginState How the suggested plugin is currently present in the vault.