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

issue/2758 Added deepClone API (v5.7.0) #2759

Merged
merged 73 commits into from
Jul 16, 2020
Merged

issue/2758 Added deepClone API (v5.7.0) #2759

merged 73 commits into from
Jul 16, 2020

Conversation

olivermartinfoster
Copy link
Contributor

@olivermartinfoster olivermartinfoster commented May 9, 2020

#2758

Added

  • AdaptModel.deepClone to clone model hierarchies

Changed

  • Adapt.findById Moved indexing to add/remove events in data collection rather than indexing after file download
  • AdaptModel.setupModel Stopped running on the adapt:initialize event but instead is called after cloned or on instantiation after file download
  • Allowed QuestionModel to restoreUserAnswers after clone without having to listen to the adapt:initialize event
  • Changed the order of init execution in ItemsQuestionModel such that ItemsComponentModel can setup its children before QuestionModel tries to restoreUserAnswers

oliverfoster and others added 30 commits March 31, 2020 17:03
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>
Co-Authored-By: tomgreenfield <tomgreenfield@users.noreply.github.com>
@oliverfoster oliverfoster changed the base branch from release/v5.5.0 to release/v5.6.0 May 12, 2020 10:21
@oliverfoster oliverfoster changed the title issue/2758 Added deepClone API (v5.5.0) issue/2758 Added deepClone API (v5.6.0) May 12, 2020
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Copy link
Contributor

@moloko moloko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code 👓

@oliverfoster oliverfoster changed the title issue/2758 Added deepClone API (v5.6.0) issue/2758 Added deepClone API (v5.7.0) Jun 17, 2020
@oliverfoster oliverfoster changed the base branch from release/v5.6.0 to master July 7, 2020 17:48
oliverfoster and others added 6 commits July 15, 2020 17:12
* Removed `set` and `setOnChildren` parameters for the `modifier` function only
* Allowed the `modifier` function to specify custom unique ids or default to assign unique ids automatically
* Switched the `modifier` function arguments so that the `cloned` model appears before the original, as its more useful that way
* Swapped the new unique id so that the original id is the prefix rather than the postfix, which will allow easier reading of cloned items in the dom and model collections
Copy link
Contributor

@tomgreenfield tomgreenfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💎

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Copy link
Contributor

@moloko moloko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small suggestion, otherwise looks good

@oliverfoster oliverfoster merged commit 8c7ac76 into master Jul 16, 2020
@oliverfoster oliverfoster deleted the issue/2758 branch July 16, 2020 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

adapt_framework v5.7.0: Add model deepClone
5 participants