Giter Club home page Giter Club logo

smartdown's Introduction

DEPRECATED

This repository is no longer maintained.

Smartdown Build Status

Smartdown is a custom formatting language designed to generate HTML formatted questions. These questions can then be joined in a manner that articulates a full user journey.

Implementation details for each kind of question can be found in the documentation directory.

For example:

  # A Formatting and Logic Language

  Smartdown helps GOV.UK users find the information they need without
  having to search through daunting official documentation.

  ## Some extra information you need to know before you start

  * Like bullet points
  * Can be used
  * Throughout this journey

  [start: step_1]

  ## Additional context after a start button

  Any more information down here

Will produce:

<div id="js-replaceable">

  <header class="page-header group">
    <div>
      <h1>
        A formatting and Logic Language
      </h1>
    </div>
  </header>

  <div class="article-container group">
    <article role="article" class="group">
      <div class="inner">
        <div class="intro">
          <p>Smartdown helps GOV.UK users find the information they need
          without having to search through daunting official
          documentation.</p>

          <h2 id="some-extra-information-you-need-to-know-before-you-start">
            Some extra information you need to know before you start
          </h2>

          <ul>
            <li>Like bullet points</li>
            <li>Can be used</li>
            <li>Throughout this journey</li>
          </ul>

          <p class="get-started">
            <a rel="nofollow" href="/step-1/y" class="big button">
              Start now
            </a>
          </p>
        </div>

        <h2 id="additional-context-after-a-start-button">
          Additional context after a start button
        </h2>
        <p>Any more information down here</p>

      </div>
    </article>
  </div>

</div>

Which on GOV.UK will look like:

The language is designed to look like Markdown, but it has been extended to allow you to write in logic rules, questions and conditional blocks of text.

Overview

A single smartdown flow has a Start Page, a set of Questions, Outcomes and a set of Test Scenarios.

Start Pages, Questions and Outcomes are all a type of 'node'. A node represents a single user interaction (normally a web page, but in other media may be presented differently).

Each question and outcome is held in its own file. The name of the files are significant: they are used to identify each question.

Here's an example of the check-uk-visa flow:

-- check-uk-visa
   |-- outcomes
   |   |-- general_y.txt
   |   |-- joining_family_m.txt
   |   |-- joining_family_y.txt
   |   |-- marriage.txt
   |   |-- medical_n.txt
   |   |-- medical_y.txt
   |   `-- ...
   |-- scenarios
   |   |-- 1.txt
   |   |-- 2.txt
   |   `-- 3.txt
   |-- questions
   |   |-- planning_to_leave_airport.txt
   |   |-- purpose_of_visit.txt
   |   |-- staying_for_how_long.txt
   |   |-- what_passport_do_you_have.txt
   `-- check-uk-visa.txt

Wiki

Additional documentation and a glossary of terms and concepts can be found in the project wiki or in the documentation folder

Dependencies

Currently smartdown relies on the Smart Answers application to run.

Running

For GOV.UK developers you can bowl smartanswers and navigate to an example flow such as http://smartanswers.dev.gov.uk/animal-example-multiple from within the GOV.UK VM.

smartdown's People

Contributors

heathd avatar camillebaldock avatar dsingleton avatar friedsock avatar jackscotti avatar benjanecke avatar kushalp avatar roc avatar tijmenb avatar steventux avatar tadast avatar bradwright avatar brenetic avatar chrisroos avatar jamiecobbett avatar jennyd avatar mattbostock avatar

Stargazers

 avatar Jens avatar Guinslym avatar Sulav Regmi avatar Eaton avatar Rob McKinnon avatar Ant Ramm avatar  avatar Ubiratan Soares avatar Steffen Gransow avatar Jim Dolter avatar  avatar  avatar Andrew Garner avatar Chris Bird avatar

Watchers

James Stewart avatar Simon Whatley avatar Rebecca Cottrell avatar  avatar  avatar minglis avatar Minno avatar David Illsley avatar Richard Baker avatar James Cloos avatar Mateusz Grotek avatar Ben Holliday avatar Mark Hurrell avatar Tara Stockford avatar Andrew Leimdorfer avatar Rhian Lewis avatar  avatar  avatar Dr Keith Mitchell avatar Ash Chohan avatar Somme avatar Keith Lawrence avatar  avatar Barbara Slawinska avatar Dilwoar Hussain avatar Chae Cramb  avatar Johnathan Ishmael avatar  avatar  avatar Leena Gupte avatar Rosa Fox avatar David Trussler avatar Jonathon Shire avatar  avatar  avatar  avatar  avatar Shahina Rahman avatar z-gooch avatar George Eaton avatar  avatar

smartdown's Issues

Money question type

Are there plans to add a money question type?

For a potential fee remissions eligibilty smart answers, we require a user to enter a claim fee amount. E.g.

screen shot 2015-01-08 at 15 30 25

Integer question type

Are there plans to add an integer question type?

For a potential fee remissions eligibilty smart answers, we require a user to enter the number of financially dependent children they have. We'd like to validate that a positive integer or zero has been entered.

E.g.
screen shot 2015-01-29 at 09 59 50

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.