Skip to content

obsidian/components/settings-migration-component

Component that offers settings this plugin used to own to the plugin that owns them now, once, through that plugin’s public API.

This is the other half of obsidian/components/plugin-suggestion-component!PluginSuggestionComponent. The suggestion asks the user to install the plugin that took a feature over; this carries the settings they had configured for it across, so taking the suggestion does not mean re-entering everything by hand.

A proposing plugin never writes into another plugin’s data.json. It PROPOSES: the other plugin owns the settings, so it owns the dialog, and the user approves, edits or declines. Only an applied migration retires the pending values.

The offer is made whenever it CAN succeed, which needs two independent things to have happened — the provider’s API being available, and this plugin’s own settings having arrived from disk. Either can land first, so both edges are wired and each re-reads the current state rather than assuming the other has already happened.

ClassDescription
SettingsMigrationComponentOffers settings this plugin used to own to the plugin that owns them now.
InterfaceDescription
SettingsMigrationComponentConstructorParamsParameters for the SettingsMigrationComponent constructor.