-
Notifications
You must be signed in to change notification settings - Fork 699
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
Add the ability to specify rendering options #6873
Conversation
Note: need to add a migration for the change to content models (as the main Kolibri models inherit from the base models). |
Oh, but you have added one - Django does not seem to be picking it up for some reason. |
Need to update the tests as well, there's a section on this in the documentation in |
…ersion 3 schema import test.
…allow blank and null for options.
Looks like your latest commit deleted the updated migration, which is causing the test failures. Code looks correct to me, although I note that the |
Sorry, I forgot to run |
Codecov Report
|
I think the only thing missing here is the update to https://github.com/learningequality/kolibri-design-system - for the addition of the content mixin.js option prop. |
Kolibri design system PR: learningequality/kolibri-design-system#31 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging this - noting that it will not be fully functional until Kolibri is pointing at the most recent version of KDS.
Summary
For certain renderers, it can be helpful to configure rendering options on a per-ContentNode basis. A common example, included in this PR, is the ability to specify a custom height and width for an HTML5 app. This has been an issue with some in-progress content sources, as well as some content sources we'd like to support in the future. (Like Unity games in portrait or landscape mode.)
This PR creates a
ContentNode.options
JSON field that allows for the ability to specify renderer-specific options for that node. The ability to specify HTML5 app height and width is included as a part of this PR.Reviewer guidance
This can't currently be reviewed with content channels because we would need to first add the ability for Studio to export channels with this option. (PR here: learningequality/studio#1896) Once that is done, I can push a version of the ProFuturo content that provides these options for testing.
References
Contributor Checklist
PR process:
Testing:
Reviewer Checklist
yarn
andpip
)