insomnia/packages/insomnia-app/app/ui/components
Dimitri Mitropoulos e161f45b06
ResponseTimer callstack exceeded (#3386)
* no default export (prepping for hooks)

* makes logic match other implementation

note that above in `componentDidUpdate` it uses `<= 0`, whereas here it uses `> 0` but then only checks for false.

Also, logically, there's no way to ever get `aria-hidden="true"` since it returns early so that entire attribute can just be removed.

* removes fake private class member syntax

this is moving to hooks anyway, but in the meantime...

* undoes calling identical code twice in a row...

* condenses class methods to prepare for hooks

* hooks refactor

fairly faithful to the original, this attempts to just refactor to hooks.  this exposes, again, the fact that we're setting state within useEffect.

* removes 200 ms offset for response time

so that, now, you know, the time reported is the actual time.

* adds logging for response timer lage

* removes timer logging and `responseTime` prop after PR discussion

it's definitely fruitful, but the fix for the callstack exceeded is what needs to be the focus.

* removes shadowed variable per PR feedback

* reinstates and documents 200ms compensation

* add delay endpoint to example server

* Update packages/insomnia-app/app/ui/components/response-timer.tsx

Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-05-17 18:58:05 -05:00
..
base [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
buttons [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
codemirror [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
dropdowns [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
editors [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
export-requests [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
graph-ql-explorer [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
key-value-editor [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
modals [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
panes ResponseTimer callstack exceeded (#3386) 2021-05-17 18:58:05 -05:00
proto-file [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
settings sanitize all electron.shell.openExternal calls (#3336) 2021-05-12 16:20:52 -04:00
sidebar check the length of react children correctly (#3380) 2021-05-13 09:01:06 -04:00
spec-editor [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
tags [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
templating [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
viewers sanitize all electron.shell.openExternal calls (#3336) 2021-05-12 16:20:52 -04:00
activity-toggle.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
analytics.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
check-for-updates-button.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
cookie-list.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
error-boundary.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
forms.stories.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
grpc-spinner.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
help-tooltip.stories.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
help-tooltip.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
hotkey.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
html-element-wrapper.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
keydown-binder.ts [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
markdown-editor.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
markdown-preview.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
notice.stories.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
notice.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
onboarding-container.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
page-layout.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
rendered-query-string.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
rendered-text.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
request-url-bar.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
response-timer.tsx ResponseTimer callstack exceeded (#3386) 2021-05-17 18:58:05 -05:00
sync-pull-button.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
time-from-now.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
toast.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
tooltip.stories.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
tooltip.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
unit-test-editable.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
workspace-page-header.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
wrapper-analytics.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
wrapper-debug.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
wrapper-design.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
wrapper-home.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
wrapper-migration.tsx sanitize all electron.shell.openExternal calls (#3336) 2021-05-12 16:20:52 -04:00
wrapper-onboarding.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
wrapper-unit-test.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
wrapper.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00