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

Adapt Framework Version 6 Prototype #3324

Closed
wants to merge 3 commits into from
Closed

Adapt Framework Version 6 Prototype #3324

wants to merge 3 commits into from

Conversation

oliverfoster
Copy link
Member

@oliverfoster oliverfoster commented Aug 18, 2022

fixes #2526
fixes #2363

original issues #3044

What's changed?

  1. We have NPM install support for plugins via our normal registry server. The server is publically available for those who wish to host their own registries. A registry server can be setup to fallback to any other public npm registry. The default server fallback registry is to the npm public registry but it is possible to chain to the adapt registry which then chains to the npm one. Any plugins registered in the server should be installable via npm using the registry at https://adapt-bower-repository.herokuapp.com/npm/. With:
//.npmrc
registry=https://adapt-bower-repository.herokuapp.com/npm/
  1. The core has been broken into the following pieces:
    adapt-contrib-core Model/view registry, tracking, offlineStorage, fixes, logging and wait queues
    adapt-contrib-data Data loader, router, scrollto, location, startcontroller
    adapt-contrib-mpabc Menu, page, article, block and component interfaces
    adapt-contrib-a11y Accessibility layer
    adapt-contrib-device Device identification and breakpoints
    adapt-contrib-drawer Side drawer
    adapt-contrib-navigation Navigation
    adapt-contrib-notify Notify
    With adapt-contrib-tooltip yet to come.
  2. We've gotten rid of src/course in favour of build/course
  3. React, bower and semver are all now installed node modules.
  4. It will be possible to use (most/some) npm modules in courses moving forwards (tbc as to limitations).
  5. Most existing plugins should be compatible (tbc, with the addition or injection of a package.json)

Testing

  1. Run the following commands
git clone https://github.com/adaptlearning/adapt_framework v6-test
cd v6-test
git checkout issue/v6
cd src/
npm install
cd ../
npm install
grunt dev
  1. Once built, cancel the dev task with ctrl+c, then run
grunt server
  1. Please have a look around and post any comments on this pr

Todo

  • LESS: Much of the styling needs to be moved into the right extensions
  • SCHEMAS: The grunt tasks do not yet apply defaults from the new AAT schemas, the old AAT schemas will not work with v6 without sustantial work but the new AAT schema styles should be able to do what's necessary, they have yet to be cleaned up and trimmed. We need to decide if v6 will support the classic AAT / vice-versa.
  • adapt-cli is not yet compatible with v6 but the adapt install command etc will be made v6 compatible Add npm layer adapt-cli#175
  • grunt build includes do not yet work with dependent extensions, such that if resources is included but drawer is not, drawer will not yet be added to the construction phase

@oliverfoster oliverfoster marked this pull request as draft August 18, 2022 17:08
@oliverfoster oliverfoster self-assigned this Aug 18, 2022
@cahirodoherty-learningpool
Copy link
Contributor

👏

@oliverfoster oliverfoster marked this pull request as ready for review September 26, 2022 10:53
@chris-steele
Copy link
Contributor

Source install not currently working in Node v16:

$ npm i
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...  
npm WARN old lockfile 
npm ERR! code E404
npm ERR! 404 Not Found - GET https://adapt-bower-repository.herokuapp.com/npm/scheduler/-/scheduler-0.20.2.tgz
npm ERR! 404 
npm ERR! 404  'scheduler@https://adapt-bower-repository.herokuapp.com/npm/scheduler/-/scheduler-0.20.2.tgz' is not in this registry.

N.B. working fine in Node v14

@oliverfoster
Copy link
Member Author

Source install not currently working in Node v16:

$ npm i
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...  
npm WARN old lockfile 
npm ERR! code E404
npm ERR! 404 Not Found - GET https://adapt-bower-repository.herokuapp.com/npm/scheduler/-/scheduler-0.20.2.tgz
npm ERR! 404 
npm ERR! 404  'scheduler@https://adapt-bower-repository.herokuapp.com/npm/scheduler/-/scheduler-0.20.2.tgz' is not in this registry.

N.B. working fine in Node v14

Should be fixed for v16 now. Thanks for checking.

@joe-allen-89
Copy link
Contributor

Able run through the install and for the most part working nicely. Getting the below issue when answering the 4th question on the question components page (c-62)

Uncaught TypeError: Cannot read properties of undefined (reading 'notFinal') at McqModel.setAttemptSpecificFeedback (QuestionModel.js:287:57) at McqModel.setupIncorrectFeedback (QuestionModel.js:283:10) at McqModel.setupFeedback (ItemsQuestionModel.js:160:10) at McqView.setupFeedback (QuestionView.js:514:18) at McqView._runModelCompatibleFunction (QuestionView.js:544:7) at McqView.onSubmitClicked (QuestionView.js:212:10) at McqView.onButtonStateUpdate (QuestionView.js:146:14) at p (backbone.min.js:2:3295) at v (backbone.min.js:2:3081) at u (backbone.min.js:2:902)

@oliverfoster
Copy link
Member Author

stupendous, thank's @joe-allen-89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Future: transition from bower to npm / yarn Drop 'src/course' folder in favour of 'build/course'
4 participants