issue/2709 v5.5.0#2711
Merged
Merged
Conversation
oliverfoster
requested review from
brian-learningpool,
cahirodoherty-learningpool,
chetan-hajare and
tomgreenfield
March 31, 2020 16:48
Closed
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>
tomgreenfield
approved these changes
Apr 21, 2020
Contributor
|
@oliverfoster is this ready for review again now? |
Contributor
|
Absolutely |
tomgreenfield
approved these changes
May 5, 2020
chetan-hajare
approved these changes
May 8, 2020
This was referenced May 9, 2020
Closed
prevent invalid value from being processed by setActiveItem
Member
Author
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#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.removeand how that interacts with all sub views ofAdaptView.Added
ContentObjectViewto unify commonPageViewandMenuViewbehaviourAdapt.storewhich is theAdapt.componentStoreextended to contain all content views and models not just component views and modelsAdaptModelfunctions for matching type groups such as "blocks", "components", "pages" etc:getTypeGroup(),getTypeGroups(),isTypeGroup(typegroup)Adaptfunctions for fetching model and view classes:getViewName,getViewClass,getModelName,getModelClassAdaptModelpropertyhasManagedChildrento signify which models automatically render and listen to their children models_modeland_viewspecify the name of the registered model or view to use on instantiation. Adapt will use properties_type,_component,_modeland_type,_component,_viewin order to determine which model or view should be used respectivelyAdapt.log.warnOncebuild.jsandconfig.jsonare 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-manifestsfor language folder manifest productioncontentObjectView:*events [preRender, render, postRender, preReady, ready, postReady, preRemove, remove, postRemove] for extensions toContentObjectViewview:*events [preRender, render, postRender, preRemove, remove, postRemove] for every view which extendsAdaptViewAdapt.router.rootModelproperty to allow the router to have a different rootContentObjectModelother thanAdapt.courseAdapt.router.navigateBackinstead of needingBackbone.history.history.back()Changed
Adapt.log.deprecated,Adapt.log.removedandAdapt.log.warnOncewhere appropriateQuestionViewcompatibility layerAdaptModel.setCustomLockingmenu check into theMenuModelItemsQuestionModelblending ofItemsComponentModelandQuestionModelto make it clearerLockingModelto work with ES6 classesAdapt.registername parameter can now take an array or space separated list of namesAdapt.storeRouterusesAdapt.storeto lookupContentObjectviewsAdaptViewaddChildrenusesAdapt.storeto lookup child viewsAdapt.datais now a collection of all modelsAdapt.data.filteris used to filter all data models throughoutAdapt.datausesAdapt.storeto lookup modelsfindRelativeModelso that it doesn't use hard-coded type groups and so that it returns therootModelwhen requestedAdapt.parseRelativeStringso that it doesn't use hard-coded type groupsrouter:menuif aViewClassisn't found for themfindAncestor,findDescendantModels,findRelativeModelsrc/core/js/data.jsto 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.jsAdaptCollectionso that it is no longer a data loader, only a container.Adapt.navigateToElementintoAdapt.routerAdapt.scrollTointoAdapt.scrollingproperAdaptViewlistening to globalremoveevent, 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
AdaptModelproperties,_parent,_children,_siblingsAdapt.contentObjects,Adapt.articles,Adapt.blocks,Adapt.componentsin favour ofAdapt.dataAdapt.componentStorecomponents,blocks,articles,contentObjectsin favour of lowercase singularcomponent,block,article,contentobjectQuestionViewgetInteractionObject,getInteractionObject,getResponseType,setupDefaultSettings,setupButtonSettings,setupWeightSettings,canSubmit,updateAttempts,storeUserAnswer,resetUserAnswer,isCorrect,setScore,updateButtons,setupButtonSettings,isPartlyCorrect,setupCorrectFeedback,setupPartlyCorrectFeedbackandsetupIncorrectFeedbackin favour of theQuestionModelversions.Adapt.register('name', View);Removed
Testing
Tested with languagePicker, works as normal.
All
changeevents trigger from bothAdapt.dataandAdapt.blocks,Adapt.componentsetc as intended.PRs included
#2717
#2716
#2713