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/2645 Added manifest creation and loading #2717

Merged
merged 6 commits into from
Apr 14, 2020

Conversation

oliverfoster
Copy link
Member

@oliverfoster oliverfoster commented Apr 6, 2020

fixes #2645

PR goes into #2714 then into #2713 then into #2711 then into master

  • Adapt is now JSON filename agnostic in the language folder (build.js and config.json are still fixed filenames outside of the language folders).
  • Each file must contain an object or an array of objects with, at minimum a { "_type": "" }, { "_component": "" } or { "_model": "" } attribute on each JSON file object as this denotes the corresponding model inside the framework.
  • Each language folder must have a { "_type": "course" } object.

Added

  • grunt task language-data-manifests

Changed

  • Reworked 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 structure
  • Moved menu, page, article, block and component controller parts from data into src/core/js/mpabc.js
  • AdaptCollection so that it is no longer a data loader, only a container.

Deprecated

  • Adapt.contentObjects, Adapt.articles, Adapt.blocks, Adapt.components in favour of Adapt.data

Testing

Tested with languagePicker, works as normal.
change events trigger from Adapt.data and Adapt.blocks, Adapt.components etc as intended

@oliverfoster oliverfoster added this to the Adapt v6 milestone Apr 6, 2020
@oliverfoster oliverfoster self-assigned this Apr 6, 2020
@oliverfoster oliverfoster linked an issue Apr 6, 2020 that may be closed by this pull request
@oliverfoster oliverfoster changed the base branch from issue/2714 to master April 7, 2020 12:20
@oliverfoster oliverfoster changed the base branch from master to issue/2714 April 7, 2020 12:20
Copy link
Contributor

Choose a reason for hiding this comment

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

👀

src/core/js/mpabc.js Outdated Show resolved Hide resolved
src/core/js/mpabc.js Outdated Show resolved Hide resolved
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.

grunt build && grunt server

is now giving me

adapt.min.js:1 Uncaught ReferenceError: Logger is not defined

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.

Add data manifests
5 participants