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

Add schema flag for properties which should cause a forced rebuild #522

Open
oliverfoster opened this issue Apr 25, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@oliverfoster
Copy link
Member

oliverfoster commented Apr 25, 2024

Subject of the issue

The following properties, at least, need to be marked as "needing a compile".

"strictMode": {
"type": "boolean",
"default": true,
"inputType": "Checkbox",
"title": "Use strict mode?",
"description": "Strict mode improves performance by tightly restricting the declaration of variables inside code blocks and closures which may cause some older code to stop working. Please leave this at true unless you are experiencing issue with old plugins or third party libraries."
},
"targets": {
"type": "string",
"title": "Supported browsers override",
"description": "Set the browsers that are supported. Overwrites the framework defaults if not empty. Current defaults are: 'last 2 chrome versions, last 2 firefox versions, last 2 safari versions, last 2 edge versions, last 2 ios_saf versions, last 2 and_chr versions, firefox esr'",
"default": ""
}

"_generateSourcemap": {
"type": "boolean",
"title": "Generate source maps",
"description": "Allows the course JavaScript & CSS to be debugged via the browser's developer tools",
"default": false,
"_adapt": {
"isSetting": true
}
},

"_defaultLanguage": {
"type": "string",
"title": "Default language code",
"default": "en"
},
"_defaultDirection": {
"type": "string",
"title": "Default text direction",
"default": "ltr",
"enum": [
"ltr",
"rtl"
],
"_backboneForms": "Select"
},

"_extensions": {
"type": "object",
"title": "Extensions",
"default": {}
},
"_enabledPlugins": {
"type": "array",
"title": "Enabled plugins",
"default": []
},
"_theme": {
"type": "string",
"title": "Theme",
"default": "adapt-contrib-vanilla"
},
"_menu": {
"type": "string",
"title": "Menu",
"default": "adapt-contrib-boxMenu"
},

"customStyle": {
"type": "string",
"title": "Custom CSS/Less code",
"description": "Add any custom CSS or valid Less code here",
"default": "",
"_backboneForms": {
"type": "CodeEditor",
"mode": "less"
}
},

"title": {
"type": "string",
"title": "Title",
"default": "Untitled",
"_adapt": {
"translatable": true
}
},

setDocumentTitle() {
const currentModel = location._currentModel;
const hasSubTitle = (currentModel && currentModel !== router.rootModel && currentModel.get('title'));
const title = [
this.rootModel.get('title'),
hasSubTitle && currentModel.get('title')
].filter(Boolean).join(' | ');
this.listenToOnce(Adapt, 'contentObjectView:preRender', () => {
const escapedTitle = $(`<div>${title}</div>`).text();
document.title = escapedTitle;
});
}

https://github.com/adaptlearning/adapt-contrib-spoor/blob/df90b8dacbe8c20e12e1d57dfd1cdfc37de82903/schema/config.schema.json#L93-L100

https://github.com/adaptlearning/adapt-contrib-spoor/blob/df90b8dacbe8c20e12e1d57dfd1cdfc37de82903/schema/config.schema.json#L149-L154

@oliverfoster oliverfoster added the enhancement New feature or request label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant