-
Notifications
You must be signed in to change notification settings - Fork 249
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
move inview logic into ComponentView #2269
Comments
Yup, perfect. |
OK I've done the core code update and done PRs for the following components:
As they give a good flavour of the three different ways this can be used:
If everyone's OK with those I'll do PRs for:
I was also thinking we could take this opportunity to add |
@moloko, is this something which is intended to go into v4? |
@brian-learningpool yep that's the idea |
Since the assessmentResults, blank, text, graphic, hotgraphic, narrative & media components all implement
inview
it seems like a sensible idea to move as much of the logic as possible into ComponentView. And now seems like quite a good time to do it!The implementation in adapt-contrib-text seems like a pretty good starting point - particularly in terms of how it allows some flexibility as to what the 'inview element' should be.
I think we would need three functions:
setupInviewListener
setupInviewCompletion
onInview
removeInviewListener
Plus a model property
inviewElementSelector
If that sounds OK by everyone I'm happy to pick this up.
The text was updated successfully, but these errors were encountered: