Skip to content

Enable simple user-driven boolean validation in narrative schema #8

Description

@jwoLondon

It would be helpful to be able to define a label in a narrative schema that inserts a checkbox in the formatted document, and a rule that requires the checkbox to be ticked for the litvis to 'pass' linting.

Issue #7 would allow this to be achieved by providing an appropriate regex, but given this might be quite a common task, perhaps it would be better to define it as simple label / rule attributes and for litvis to insert the relevant markdown and rule validation logic.

For example, something like this (see includeCheck, checkMustPass):

labels:
  - name: invariance
    includeCheck: true
    paired:
      htmlTemplate: 'Confirm that non-meaningful changes in data representation, such as table row order have no discernible effect on visualization.{{children}}</div>'

rules:
  - description: Kindlmann and Scheidegger's principle of data representation invariance.
    selector:
      label: invariance
    checkMustPass: true

There is an open question as to whether such a check should be attached to the 'question' or 'response' label (e.g. invariance or invarianceAssessment in albebra.yaml) and whether an explicit message is required to be given if the box is not checked (currently this would be the description field in the rule).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions