* use selector and improve types
* Loading remote projects now requires a team id; it is no longer optional
* activate with workspace or workspace id
* extract helper
* normalize graphql return type for a remote project to include the team
* pull into the space as defined by the project team id, not by the active space. If the space doesn't exist, create it
* use helper
* make testing easier by putting the active space name as the first breadcrumb
* fix tests
* add the active space into the title
* refactor and add tests
* remove todo
* Add sort order for space items
* Add ability to sort dashboard cards
* Fix TS errors
* Fix lint errors
* Add sort options for modified time
* Move workspace-card to a new file and use redux global state for persistence
* Remove ordering from the space model
* Use currying for the workspace mapping function and clean up types
* Expand testcase for activespace initialization
* Fix lint errors
* Remove date defaults and check if modifedLocally is defined
* Fixup: Use global selector for space order
* Fixup: Decouple space order initialization from active space
* Fixup: Use named exports in SpaceSortDropdown and rename handler in WrapperHome
* Implement color scheme badge artifact workaround.
Color scheme badges have a small gap artifact caused by an interplay
between anti-aliasing and alpha blending. Here, we use pseudo-classes to
ensure one opaque pixel of intersection between the shadow border and
the color badge.
* Improved workaround for color badge bug.
This improved workaround has fewer limitations and reduces visual
artifacts during transitions.
* Don't fade ring when hovering in OS theme mode.
This tiny change makes the transition look a lot better.
* Upgrade Electron from 9.3.5 to 11.2.3.
* bump version
* update preid to alpha
* version packages lib@2.3.1-alpha.0
* Downgrade electron-builder to 22.11.3.
We tried to upgrade electron-builder to 22.11.7, but this fails
because electron-builder 22.11.4 introduces imports into fs/promises.
This module is only available in Node 14+, so we have to stick to
22.11.3 until we update to Electron 12.
* Revert npm script changes from alpha release.
Co-authored-by: Opender Singh <opender.singh@konghq.com>
* INS-674 - First pass at making the send button more visible
* [wip] adds rect for send button
* Update colors in the SVG to match send button
* Update the gRPC send button to also use theme colors
* Adding left margin to send button
Co-authored-by: Eric Reynolds <eric.reynolds@konghq.com>
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
Co-authored-by: Opender Singh <opender.singh@konghq.com>
* adds redux-devtools back
I had to delete anything under `~/.config/insomnia-app/extensions/lmhkpmbekcpmknklioeibfkpmmfibljd*` to get this to work. Apparently there's some old state left around from the prior version or something when it was broken that prevents a migration?
* improves logging (partly to compensate for bug in upstream)
see: https://github.com/MarshallOfSound/electron-devtools-installer/issues/180
* INS-674 - First pass at making the send button more visible
* [wip] adds rect for send button
* Update colors in the SVG to match send button
* Update the gRPC send button to also use theme colors
* Adding left margin to send button
Co-authored-by: Eric Reynolds <eric.reynolds@konghq.com>
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
Co-authored-by: Opender Singh <opender.singh@konghq.com>
* fix: insomnia open dialog for proto directory can't select directories
* uses a named export for selectFileOrFolder
(also, removes original js file from rebase)
* clears error by leveraging exhaustiveness check
* fixes bug: the `name` field is actually for a file filter
see the referenced pull request.
As for the `extensions: ['*']`, there's no reason I can see to include a filter and then tell the filter to then accept everything.
* update selectFileOrFolder mocks
* use switch (for exhaustiveness checking) and type selectedFormat
* removes unnecessary filters from _save_ dialog
from the docs:
> The filters specifies an array of file types that can be displayed
As suspected, this is not needed. A user is free to save it wherever they want.
* adds extension to saved file
not sure why this was missing before, but it appears to have been a bug
* formatting updates
best to "ignore whitespace" for this commit. I did this with the hope of using the `ThunkAction` type from `redux-thunk`, but once I got them all looking good and started adding the type I quickly learned there's quite a bit more work to do in this area before we can have such a thing. I therefore opted to just call it a day at that and take the (no-op) formatting changes and typings.
* removes remaining name filters from save dialogs
same reason as the 2nd to prior commit - they cause the bug
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
Co-authored-by: Opender Singh <opender.singh@konghq.com>
* readability improvements and reduced indirection
* adds type for handleShowModifyCookieModal
* correctly types wrapperProps property, thereby fixing bug.
if you add `console.log({ previewHidden, propsOne: this.props.wrapperProps.activeWorkspaceMeta });` to the third line of `_renderPreview()` you'll see that `activeWorkspaceMeta` is indeed, sometimes, `undefined.
Also, there's no reason to use `await` on `this.setState`. I didn't find any more of these in the codebase, I just found this one.
* adds type for swaggerUiSpec
* undoes lifting props to state
almost always, this is done for performance reasons, but I removed it the app is working pretty quick-and-snappy for me without needing to introduced duplicated application state and keep track of it.
I went ahead and measured it before and after this commit (using performance.now):
before = [
1.93500000750646,
1.149999996414408,
0.9499999869149178,
0.9950000094249845,
0.8650000090710819,
1.560000004246831,
1.5699999930802733,
0.8450000023003668,
1.4550000196322799,
1.3299999991431832,
1.3050000125076622,
1.4099999971222132,
1.3099999923724681,
1.3100000214762986,
1.1999999987892807,
1.0099999781232327,
0.830000004498288,
1.2449999921955168,
1.2500000011641532,
1.4349999837577343,
]
after = [
2.9400000057648867,
2.449999999953434,
2.33499999740161,
2.2849999950267375,
1.7700000025797635,
1.8149999959859997,
2.1249999990686774,
1.9150000007357448,
2.074999996693805,
1.9899999897461385,
2.0200000144541264,
2.869999996619299,
2.1450000058393925,
2.33499999740161,
2.130000008037314,
2.119999990100041,
2.144999976735562,
2.130000008037314,
2.380000009201467,
2.8999999922234565,
]
> R.mean(before)
> 1.2480000004870817
> R.mean(after)
> 2.243749999080319
> R.median(before)
> 1.2775000068359077
> R.median(after)
> 2.137499992386438
So basically, considering a 16ms render rate (i.e. 60hz), 1ms saved by lifting props to state makes no difference in application performance.
This is committed separately so that if there's any reason we want to keep the prior implementation, we can just still do so.
* fix ts-expect-error
* removes useless await
see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/await-thenable.md
We're not quite ready to have this rule on everywhere, but in this case I can see that it's correct to follow.
* add comment about magic number
and moves the assignment to the one place it's used
I opted not to make a ticket because we are recently running out of tickets and this seems to be a relatively small thing @reynolek please confirm this is the correct course of action.
* initialize ref to reflect reality (and include actual type)
* fixes root cause of error, inlines one-liners
the error with the type of `_handleInputColorChange` was due to `onChange` being the wrong prop to use (where `onChange` is the one we want).
* use onChange instead of onInput to access correct types
ultimately, since react's behavior diverged from the DOM behavior to match onInput, this should have no effect on any functionality since react assigns this event to `onChange` anyway. see https://github.com/facebook/react/blob/master/fixtures/attribute-behavior/src/attributes.js#L2089
* clears remaining ts-expect-errors in file
* updates fallback call per review feedback
* 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>
* sanitize all electron.shell.openExternal calls
* adds lint rule to disallow future usage of `openExternal`
* updates to use URL constructor per review feedback