I had a conversation with Felipe where he asked:
Do you know of any tutor plugin that loads the code of a UIslot without requiring that the code is first published to NPM?
I didn't know any examples. The README examples for the slots all use inline RenderWidget code, and the other examples use NPM packages.
The solution used for openedx-ai-extensions ended up being Tutor's build-contexts.
https://github.com/openedx/openedx-ai-extensions/blob/main/tutor/openedx_ai_extensions/plugin.py#L32
I definitely think "make a plugin that utilizes FPF slots but doesn't have frontend code published to NPM" is a reasonable use case that we should (and apparently already do) support, so it'd be great to document that.
I had a conversation with Felipe where he asked:
I didn't know any examples. The README examples for the slots all use inline
RenderWidgetcode, and the other examples use NPM packages.The solution used for
openedx-ai-extensionsended up being Tutor'sbuild-contexts.https://github.com/openedx/openedx-ai-extensions/blob/main/tutor/openedx_ai_extensions/plugin.py#L32
I definitely think "make a plugin that utilizes FPF slots but doesn't have frontend code published to NPM" is a reasonable use case that we should (and apparently already do) support, so it'd be great to document that.