Picture of Stephen Harlow
Trickle behaviour change
by Stephen Harlow - Thursday, 20 September 2018, 12:40 AM
 

I'm updating a course created with an older version of the framework and the behaviour of the Trickle extension seems to have changed.

Previously I was able to use it to show a "Start" button immediately after a text component, clicking the button would then scroll the user to the next block. This approach no longer works. It appears Trickle only works for blocks containing components that set a _isComplete or _isInteractionComplete attribute. Is that a correct interpretation? Presumably the text component has no such attribute?

Picture of Matt Leathes
Re: Trickle behaviour change
by Matt Leathes - Thursday, 20 September 2018, 8:30 AM
 
Presumably the text component has no such attribute?

Not only do all components have both these properties but all blocks, articles, contentObjects and even the course itself all do; these properties are defined in the AdaptModel, which all these other types extend.

Picture of Stephen Harlow
Re: Trickle behaviour change
by Stephen Harlow - Thursday, 20 September 2018, 10:12 PM
 

OK, but something odd is going on. I've noticed that if I refresh the page the Trickle button appears. The Chrome console doesn't throw any light on things for me, although I did notice this warning that may be relevant:

[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>

It only seems to happen with this imported course, a new course behaves as expected.

Picture of Matt Leathes
Re: Trickle behaviour change
by Matt Leathes - Friday, 21 September 2018, 9:00 AM
 
It only seems to happen with this imported course, a new course behaves as expected.

This suggests to me that it's a setting somewhere in the imported course, I'd have a check through all the various trickle settings; in particular I'd be inclined to have a look the course configuration to see what _completionAttribute is set to.

Picture of Stephen Harlow
Re: Trickle behaviour change
by Stephen Harlow - Sunday, 23 September 2018, 11:53 PM
 

More investigation suggests this is an obscure issue between Trickle, the Text component and cgkineo's adapt-hotgrid component.

To replicate the issue, add a Text component to the first block in an article and enable Trickle on that block. Now add the Hotgrid component to the next block (and add an item to it's Properties). Trickle will fail to work.

  • Trickle works when I remove the Hotgrid component (or even just all the items in Hotgrid's Properties).
  • Trickle also works if the Text component is moved below the hotgrid component.
  • The import issue was a red herring, this behaviour can be replicated in a new course.

Matt, can you explain what Hotgrid is doing that is interfering with Trickle set in the Text component above it? Assuming it's not some configuration I'm missing, once I can explain it I will raise an issue on github.

Picture of Matt Leathes
Re: Trickle behaviour change
by Matt Leathes - Monday, 24 September 2018, 8:58 AM
 
Matt, can you explain what Hotgrid is doing that is interfering with Trickle set in the Text component above it?

Nothing, as far as I can see. Hotgrid is a pretty basic component really. Have you checked the console for errors? Could you share a sample course with this occurring?

Picture of Stephen Harlow
Re: Trickle behaviour change
by Stephen Harlow - Monday, 24 September 2018, 10:08 PM
 

Here's a simple course created in AT v0.5.0 running Framework v2.2.5 in Chrome (v69). Two pages, one with a Hotgrid (2.1.3) item, the second page a copy of the first, but with the Hotgrid item removed. The first page configuration inhibits Trickle (2.3.1) on the initial Text component (2.0.3) while on the second page everything works.

You can swap the Text component on the first page for another type (other than the Blank component) e.g. an Accordion, and Trickle will again work correctly.

Nothing in the console. In other odd behaviour, the first time I preview the build in Firefox or IE Trickle works, but not for subsequent previews. I think I'm going crazy!

Picture of Matt Leathes
Re: Trickle behaviour change
by Matt Leathes - Tuesday, 25 September 2018, 11:50 AM
 

Well I had a good old check of this in IE11, FF and Chrome and for me it works every time i.e. a Trickle 'Continue' button is always shown in the With Hotgrid items page below the text component:

Just once - on iOS12/iPad - did it not show Trickle on that page, unfortunately I have since been unable to replicate that so can't debug it.

Picture of Stephen Harlow
Re: Trickle behaviour change
by Stephen Harlow - Thursday, 27 September 2018, 3:17 AM
 

Thanks for your patience Matt. I've downloaded the course and re-built it using the Framework and it works as it should. I dunno!