Uploaded image for project: 'stripes-core'
  1. stripes-core
  2. STCOR-205

Timers that are re-started when there is activity

    XMLWordPrintable

Details

    Description

      As noted in UICHKOUT-70, we need to make a piece of Checkout-app state time out after not just the Checkout app but the whole of FOLIO has been inactive for a specified amount of time. Because an app can't see what happens outside of itself, this requires a new facility at the stripes-core level.

      I imagine an API somewhat along the lines of

      this.props.stripes.setInactivityTimer(n, () => {
         console.log(`FOLIO has been inactive for ${n} milliseconds`);
      });
      

      The difficulty in implementation is going to be how to detect any activity, to reset the timer. We may need to dig deeper into exactly when React re-renders exactly which components. Hopefully there's a simple way for a component to know when any of its descendants re-renders: that would be an elegant and straightforward way to detect "any activity".

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                mike Mike Taylor
                mike Mike Taylor
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 hour
                    1h

                    TestRail: Runs

                      TestRail: Cases