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

Migrate content renderer mixin to composable, and require it to be explicitly consumed #12744

Open
rtibbles opened this issue Oct 24, 2024 · 2 comments
Labels
DEV: frontend DEV: renderers HTML5 apps, videos, exercises, etc. TAG: dev experience Build performance, linting, debugging...

Comments

@rtibbles
Copy link
Member

Observed behavior

Currently all Kolibri content renderers use the contentRendererMixin - although this is implicitly added after the component is loaded by the pluginMediator code.

While this works it has all the disadvantages of lack of explicitness that mixins have, combined with the fact that the mixin isn't even explicitly imported into the component code.

Expected behavior

The existing contentRendererMixin should be converted into a composable function as the default export of the module, and a named props export which can be reused to define common props across different renderer components. This module should be exposed as part of the kolibri package.

To provide backwards compatibility, the current pluginMediator mixin functionality should be updated to check whether a renderer component has a setup function, and if it does not, to inject a setup function and props into the component that replicates the previous mixin functionality.

User-facing consequences

None - this is a developer experience only change.

@rtibbles rtibbles added DEV: frontend DEV: renderers HTML5 apps, videos, exercises, etc. TAG: dev experience Build performance, linting, debugging... labels Oct 24, 2024
@abhirupPann
Copy link

Hi @rtibbles, Can you assign it to me?

@AlexVelezLl
Copy link
Member

Hi @abhirupPann, thanks for volunteering! This issue is not meant for contribution, but there are another contributing opportunities. See the contributing guidelines including links to issues suitable for contribution for each repository here:

Kolibri Contributing Guidelines
Kolibri Design System Contributing Guidelines
Studio Contributing Guidelines
You can also see the list of unassigned "help wanted" or "good first issue" issues across all repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEV: frontend DEV: renderers HTML5 apps, videos, exercises, etc. TAG: dev experience Build performance, linting, debugging...
Projects
None yet
Development

No branches or pull requests

3 participants