-
Notifications
You must be signed in to change notification settings - Fork 250
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
issue/2709 v5.5.0 #2711
issue/2709 v5.5.0 #2711
Conversation
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.
🎾
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.
👀
Co-Authored-By: tomgreenfield <tomgreenfield@users.noreply.github.com>
Co-Authored-By: tomgreenfield <tomgreenfield@users.noreply.github.com>
Co-Authored-By: tomgreenfield <tomgreenfield@users.noreply.github.com>
Co-Authored-By: tomgreenfield <tomgreenfield@users.noreply.github.com>
@oliverfoster is this ready for review again now? |
Absolutely |
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.
🔥
prevent invalid value from being processed by setActiveItem
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.
👀
Thanks for reviewing @cahirodoherty-learningpool, @chetan-hajare, @tomgreenfield, @moloko Just need to do a v5.4.0 release as there are 30 commits to go out before this gets merged. Note: Had to bump up all the minor version numbers as 5.3.0 had feature additions added. So this pr is now v5.5.0 |
#2645 #2709 #2712 #2714 #1902
Reference WIKI
Reference plan
Converted more of adapt core to ES6.
Views and models no longer have hard-coded relationships, instead they are determined by the JSON. All core views and models can be replaced. Multi-menu support is now possible by simply registering the menu view with
Adapt.register('course menu boxmenu', { view: BoxMenuView })
;This should be non-breaking. Lots of additions, some code relocated, fundamental changes to
Adapt.remove
and how that interacts with all sub views ofAdaptView
.Added
ContentObjectView
to unify commonPageView
andMenuView
behaviourAdapt.store
which is theAdapt.componentStore
extended to contain all content views and models not just component views and modelsAdaptModel
functions for matching type groups such as "blocks", "components", "pages" etc:getTypeGroup()
,getTypeGroups()
,isTypeGroup(typegroup)
Adapt
functions for fetching model and view classes:getViewName
,getViewClass
,getModelName
,getModelClass
AdaptModel
propertyhasManagedChildren
to signify which models automatically render and listen to their children models_model
and_view
specify the name of the registered model or view to use on instantiation. Adapt will use properties_type
,_component
,_model
and_type
,_component
,_view
in order to determine which model or view should be used respectivelyAdapt.log.warnOnce
build.js
andconfig.json
are still fixed filenames outside of the language folders).{ "_type": "" }
,{ "_component": "" }
or{ "_model": "" }
attribute on each JSON file object as this denotes the corresponding model inside the framework.{ "_type": "course" }
object.language-data-manifests
for language folder manifest productioncontentObjectView:*
events [preRender, render, postRender, preReady, ready, postReady, preRemove, remove, postRemove] for extensions toContentObjectView
view:*
events [preRender, render, postRender, preRemove, remove, postRemove] for every view which extendsAdaptView
Adapt.router.rootModel
property to allow the router to have a different rootContentObjectModel
other thanAdapt.course
Adapt.router.navigateBack
instead of needingBackbone.history.history.back()
Changed
Adapt.log.deprecated
,Adapt.log.removed
andAdapt.log.warnOnce
where appropriateQuestionView
compatibility layerAdaptModel.setCustomLocking
menu check into theMenuModel
ItemsQuestionModel
blending ofItemsComponentModel
andQuestionModel
to make it clearerLockingModel
to work with ES6 classesAdapt.register
name parameter can now take an array or space separated list of namesAdapt.store
Router
usesAdapt.store
to lookupContentObject
viewsAdaptView
addChildren
usesAdapt.store
to lookup child viewsAdapt.data
is now a collection of all modelsAdapt.data.filter
is used to filter all data models throughoutAdapt.data
usesAdapt.store
to lookup modelsfindRelativeModel
so that it doesn't use hard-coded type groups and so that it returns therootModel
when requestedAdapt.parseRelativeString
so that it doesn't use hard-coded type groupsrouter:menu
if aViewClass
isn't found for themfindAncestor
,findDescendantModels
,findRelativeModel
src/core/js/data.js
to load manifest, files and become the collection for all models. It now has no references to the menu, page, article, block and component structuresrc/core/js/mpabc.js
AdaptCollection
so that it is no longer a data loader, only a container.Adapt.navigateToElement
intoAdapt.router
Adapt.scrollTo
intoAdapt.scrolling
properAdaptView
listening to globalremove
event, so all content objects and their descendants are now selectively destroyed usingfindDescendantViews
. Have addedAdapt.set('_shouldDestroyContentObjects', false);
to control destruction which will allow extensions to perform content object transitions before destroying the old one, have addedAdapt.set('_shouldContentObjectScrollTop', false);
to control if the contentObject performs ascrollTop(0);
automatically.Adapt.wait.queue()
into an async function if no callback specified which flattens some nested callbacks in the routerDeprecated
AdaptModel
properties,_parent
,_children
,_siblings
Adapt.contentObjects
,Adapt.articles
,Adapt.blocks
,Adapt.components
in favour ofAdapt.data
Adapt.componentStore
components
,blocks
,articles
,contentObjects
in favour of lowercase singularcomponent
,block
,article
,contentobject
QuestionView
getInteractionObject
,getInteractionObject
,getResponseType
,setupDefaultSettings
,setupButtonSettings
,setupWeightSettings
,canSubmit
,updateAttempts
,storeUserAnswer
,resetUserAnswer
,isCorrect
,setScore
,updateButtons
,setupButtonSettings
,isPartlyCorrect
,setupCorrectFeedback
,setupPartlyCorrectFeedback
andsetupIncorrectFeedback
in favour of theQuestionModel
versions.Adapt.register('name', View);
Removed
Testing
Tested with languagePicker, works as normal.
All
change
events trigger from bothAdapt.data
andAdapt.blocks
,Adapt.components
etc as intended.PRs included
#2717
#2716
#2713