General developer forum

Mustache template for list item causes a mustache_lint warning

 
Picture of David Mudrák
Re: Mustache template for list item causes a mustache_lint warning
Core developersDocumentation writersMoodle HQParticularly helpful MoodlersPlugin developersPlugins guardiansTestersTranslators

I may be missing something obvious and also I haven't studied the case into details. But on your github repository I can see the rubric.mustache that correctly wraps the list items. However, in the snapshots repository which is what the code precheck uses, such a wrapper is not present. Could that be related?

 
Average of ratings: -
Picture of Kevin Wiliarty
Re: Mustache template for list item causes a mustache_lint warning
Core developersPlugin developersTesters

Hi David, there are two complications to what you're noticing. The first thing is that I have pushed new code since posing the question, and the second thing is that the rubric.mustache includes a list_item.mustache that still causes a warning in the precheck. The new snapshot is at https://git.in.moodle.com/pluginsbot/moodle-plugins-snapshots/blob/007ad633ede708abd3cddd3f3575650078b4c1bb/blocks/filtered_course_list/templates/list_item.mustache#L1.

I am now also getting a second precheck warning, again because the precheck does not consider the context into which an element is included. The new message is:

An element with “role=tab” must be contained in, or owned by, an element with “role=tablist”.

Should I be handling something differently? Or is it just a limitation of the precheck?

 
Average of ratings: -
Picture of David Mudrák
Re: Mustache template for list item causes a mustache_lint warning
Core developersDocumentation writersMoodle HQParticularly helpful MoodlersPlugin developersPlugins guardiansTestersTranslators

I tend to think this is a clear bug in the prechecker.

 
Average of ratings: -