Mustache template for list item causes a mustache_lint warning

Re: Mustache template for list item causes a mustache_lint warning

by David Mudrák -
Number of replies: 2
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

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?

In reply to David Mudrák

Re: Mustache template for list item causes a mustache_lint warning

by Kevin Wiliarty -

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?

In reply to Kevin Wiliarty

Re: Mustache template for list item causes a mustache_lint warning

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

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