Giter Site home page Giter Site logo

stopwatch's People

Contributors

davwillev avatar grezniczek avatar nadha25 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

grezniczek

stopwatch's Issues

UI for setting storage formats

Awsome implementation thus far @grezniczek !

I had to read the readme instructions of how 'to set up the storage formats for the validated fields' before I understood it, so guess unfamiliar users will have to do the same.

I know it's a little fancy and probably involves lots more work, but for future versions, to avoid users having to write (for example) the /g group separator placeholder, could a future interface use a row of drop-down menus to set the format and create the JSON parameters in the background?

Timer mode possible?

Is it possible to use this module as a timer?

I would like to have users hit the "start" button, then have the timer/stopwatch STOP when 30 seconds have elapsed.

Thanks.

Can stopwatch track form completion time?

Hello stopwatch folks,
I am looking for a way to track time on task for public facing REDCap surveys. Can stopwatch be set to start the timer when a survey is shown and stopped when the user submits the form? If not, can you suggest alternatives to capture time on task? I would like to try to calculate "typical" completion times?

I am a statistician not a web programmer so clues for the clueless would be greatly appreciated.
Ray

Start with widget at top of display (and keep it there)

When using a text box, the widget begins at the tope of the field display and stays there as rows are added to the capture table. However, when using a Text Box or Notes Box with lots of text, the widget begins in the vertical centre of the field and gradually moves upward as rows are added to the table. This means that the user has to keep looking at the widget to 'chase' the buttons up the display to continue using them. This is potentially distracting to the user and risks missing a button click.
Screenshot 2020-05-29 at 20 10 48

Once the table fills the space, the top of the table reaches the top of the field space (after 10 rows or so) and remains there. As more rows are added, the field display increases in size and rows are now just added to the bottom of the table. This latter behaviour feels correct and is easy to use.

Define use cases

@davwillev - We should first define the concrete use cases the stopwatch EM is supposed to cover.
There are probably VERY many, such as:

  • Simple starting/stoping and putting the elapsed time into a text field.
    • This could be in ms (integer),
    • or seconds (decimal number),
    • or minutes,
    • or formatted HH:mm:ss.nnn
  • Capture start time, stop time, and elapsed time in 3 different fields
    • e.g. 2x datetime w/seconds, and an integer field for seconds (or decimal when including fractional seconds).
    • (unvalidated) text fields with HH:mm.ss.nnn format,
    • maybe include the date as well (optionally)
  • Capture start, stop, lap time points
    • with or without date (formatted a specific way),
    • with or without the option to halt the time (without reseting - as in current code),
    • as JSON in a text box,
    • as text in a notes box,
    • as new instances in a separate repeating instrument.

This get's rather complicated very quickly. All needs to be configureable by the EM user aka project designer. Fields need to be mapped, etc....

Maybe start with just one use case, but keeping the design open to accomodate more/all of them.

Timer ticks

Currently, Stopwatch uses one timer per stopwatch. Thus, when there are multiple stopwatches on a page, each has its own timer. While this may be negligible for just a few timers, it might be better to have one ticker serve all Stopwatch instances.
This is low priority.

Add 'tallying' feature

Could we add a num_caps parameter to provide a count ('tallying')? This would effectively give the user a method to calculate observed event rate: num_caps/cumulated_time

HTML IDs

The generated HTML makes use of IDs, which will lead to problems further down, i.e. can't have two or more stopwatches on the same page, or there may be conflicts with other EMs.

Either ids need to be unique, or (preferred) no ids are used at all.

Interface for controlling multiple stopwatches

An idea ...
There might be use cases where multiple timings need to be taken. An interface (buttons) to control all (or groups of) Stopwatches at the same time could be added. The functions would include:

  • start all
  • stop all that are still running
  • reset all (only enabled when all are stopped)

This could be implemented as a @STOPWATCH-GROUP="group_id" action tag (that determines placement) and "group" parameters of individual @stopwatch action tags.

This would probably only support the basic use case (record time elapsed).

Storing laps

A very easy to implement way would be to store the laps in a notes field.

Storage as repeat instances of a separate form would require 2 things:

  • the configuration logic for the user to set this up, and
  • the logic to actually create these instances.

What exactly should be stored? What is optional? How to configure (for the user who sets up the instruments)?

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.