Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple plugins of same type not allowed in template. #118

Open
WebCoder49 opened this issue Oct 23, 2024 · 0 comments
Open

Multiple plugins of same type not allowed in template. #118

WebCoder49 opened this issue Oct 23, 2024 · 0 comments
Labels
area:existing-plugin A bug/feature for an existing plugin in the plugins folder of code-input. bug Something isn't working

Comments

@WebCoder49
Copy link
Owner

When multiple plugins of the same class are added to a template, undesired and undocumented behaviour will often occur occur. This shouldn't occur: plugins of the same class should be self-contained enough to exist alongside each other where it makes sense, or throw an error if there is already a plugin of the same class.

Reasons:

  • (many plugins) both instances use the same data source from pluginData even though their configurations may be different.
  • (SelectTokenCallbacks, probably others) both instances interact with the same HTML elements leading to one overwriting the other.

To fix:

  • Fix existing plugins.
  • Add comments to the test plugin, and more tests for multiple instances of plugins, to ensure this is not rebroken in the future.
  • Delete the remark in the README about this.
@WebCoder49 WebCoder49 added bug Something isn't working area:existing-plugin A bug/feature for an existing plugin in the plugins folder of code-input. labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:existing-plugin A bug/feature for an existing plugin in the plugins folder of code-input. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant