Commit Graph

12 Commits

Author SHA1 Message Date
Łukasz Mierzwa
c298a6cd69 fix(ui): delay initial fetch until browser is idle
Right now the very fist fetch() happens right after Fetcher instance is created, which might be while a lot of other components are still being created. Wrap it inside requestAnimationFrame so it's executed once the browser is (fairly) idle
2019-05-04 22:48:40 +01:00
Łukasz Mierzwa
4e3635bc98 fix(tests): reset mocks between tests
Ensures that tests don't rely on previous tests mocking things
2018-10-03 10:16:31 +01:00
Łukasz Mierzwa
9ba495bbe7 feat(ui): pause fetching when alert/group menu is open
This will prevent whack-a-mole when user clicks on an action menu and then grid re-renders moving it around
2018-09-20 14:25:13 +01:00
Łukasz Mierzwa
08f7e6a9fa refactor(ui): prevent concurrent fetches
Refactor the timer so instead of calling fetch directly every  seconds we call it every 1 second, check if we could & should fetch (fetch isn't already/still in progress and  seconds passed since last fetch) and if needed call fetch.
This will also allow us to pause fetches when user is interacting with alerts so there's no whack-a-mole with buttons
2018-09-20 11:34:13 +01:00
Łukasz Mierzwa
4d64b0b3ea chore(tests): drop console mock, fix all tests that throw console errors 2018-09-08 21:11:15 +01:00
Łukasz Mierzwa
096b3985a4 chore(tests): migrate tests to enzyme 2018-09-06 22:37:05 +01:00
Łukasz Mierzwa
99f5f3999e refactor(tests): use jest-fetch-mock for mocking fetch() calls 2018-08-22 15:34:58 +01:00
Łukasz Mierzwa
992158d714 feat(test): basic tests for Fetcher component 2018-08-21 23:06:14 +01:00
Łukasz Mierzwa
2e36eff52e fix(ui): all components should use alertStore.fetchWithThrottle() 2018-08-21 20:39:32 +01:00
Łukasz Mierzwa
0f2ebbcbc7 refactor(ui): split settings into dedicated classes 2018-07-20 11:30:40 +02:00
Łukasz Mierzwa
3aa1d868c8 feat(ui): configurable refresh interval 2018-07-19 23:38:11 +02:00
Łukasz Mierzwa
a4a20ea3ef feat(ui): new UI written in React 2018-07-19 23:38:11 +02:00