fix: Plugin loading respects plugins configuration
#292
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Update the
EditorServiceto respect thepluginsconfiguration option. TheEditorServiceon both iOS and Android was unconditionally callingprepareAssetBundle()regardless of thepluginsconfiguration setting. This caused plugin assets to always be loaded even when plugins were disabled.Why?
Fix CMM-1173.
The previous behavior of ignoring the
pluginsconfiguration effectively disabled the configuration option's ability to control the user experience. This is problematic if a host app needs to selectively disable plugin support.How?
Added
prepareAssetBundleIfEnabled()method that checks the configuration before attempting to load plugin assets:configuration.shouldUsePluginsconfiguration.pluginsWhen plugins are disabled, the method returns an empty asset bundle immediately instead of attempting to download or read from cache.
Testing Instructions
pluginsconfiguration.pluginsconfiguration.Accessibility Testing Instructions
N/A, no UX changes.
Screenshots or screencast
N/A, no UX changes.