Comments (3)
Hi @nubz, one of the changes in the new implementation of the timeout dialog was to remove the expectation that setInterval will be called exactly once every 1000 milliseconds. There's a test for it here https://github.com/hmrc/assets-frontend/blob/master/assets/patterns/help-users-when-we-time-them-out-of-a-service/timeout-dialog.test.js#L525 and the implementation is here https://github.com/hmrc/assets-frontend/blob/master/assets/patterns/help-users-when-we-time-them-out-of-a-service/timeoutDialog.js#L101
Have you tested with the latest version of AF? I'd expect the upgrade to solve your problem, if not I'll gladly look deeper into it.
from assets-frontend.
In conversation with @gordonmcmullan I can see the logic of the problem. I'll take a look.
from assets-frontend.
Hi @matcarey - thanks for looking and yes when I see the tests around this all explicitly fail if a setInterval is being used... these would need quite an overhaul to implement something like this, and to be clear the problem is explicitly about relying on a forward moving timer to move forward in real time and this does not happen when the tab is not in focus. Both setTimeout and setInterval are unreliable versus real time... using setInterval at least gives us a chance to evaluate time elapsed.
from assets-frontend.
Related Issues (20)
- Details element shows double arrows in MS Edge
- Services using AF do not resize text
- The build fails when run against the latest LTS version of node HOT 3
- Tabs component doesn't demonstrate deep linking to a tab
- Random classes getting added to html tag and causing layout issues - v2.245.0 HOT 5
- The 'disclosure widget' for the summary/details element is hidden in Firefox unless the css display value is set to list-item HOT 5
- Character countdown usability HOT 1
- `character-counter` component doesn't support GDS-style commas in long numbers eg 3,000 rather than 3000? HOT 1
- Broken build due to missing path for Nunjucks
- Running locally V3 assets not compiling properly HOT 3
- Pattern Library compiled CSS issue
- Link style button(button--link) focus background colour is green HOT 1
- Issue with Stageprompt not recognising JQuery
- Example markup for Secondary buttons shouldn't include the button class
- stageprompt version included in minified application js doesn't cater for newer Google analytics.js HOT 5
- Minified JavaScript contains unquoted identifiers which are reserved words in IE8
- Inconsistency for Radio Button Toggles HOT 1
- hard coded "+" is not always wanted
- Message pattern layout breaking...
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from assets-frontend.