* fix: cURL paste not updating request tab editors visually
Remove the focus-based guard from PR#7098 that blocked editor value
updates when the editor had focus. This caused cURL paste to not
reflect in the request tab until switching tabs. Editors now always
accept incoming prop values and preserve cursor position. Also set
cursor to end of new URL after cURL paste using setTimeout.
* fix: added optional chaining
---------
Co-authored-by: Chirag Chandrashekhar <cchirag85@gmail.com>
Prevent app crashes when loading GraphQL schemas with validation errors
(e.g., object types with no fields). The fix:
- Validates schemas using validateSchema() and shows warnings for issues
- Still loads the schema so autocomplete continues to work
- Wraps the CodeMirror GraphQL linter with error handling to catch
any validation errors during linting
Fixes#4529
Co-authored-by: Chirag Chandrashekhar <cchirag85@gmail.com>
fix: clean up whitespace and formatting in linkAware functions
fix rediff
Feature/cmd click on links (#6132)
* Allow ctrl/cmd + click to open URLs
* fix for when user does cmd+tab, then comes back without it
* refactored the community contribution to match Autocomplete's implementation
* updated the code to resolve issues caused during merge conflict resolution with the use of makeLinkAware
* fix: updated the code to use lodash's debounce and removed redundant undefined checks
* fix: correct debouncing test expectation in linkAware.spec.js
The test was incorrectly expecting 3 setTimeout calls when debouncing
should only result in one active timeout. Updated the test to verify
debouncing behavior correctly by checking that setTimeout is called
with the correct delay, and that only one execution happens after
the debounce delay.
* fix: fixed merge issues in linkAware.js
* fix: fixed CodeMirror assignment to this.editor
* fix: formatting fixes
* fix: formatting fix
---------
Co-authored-by: abansal21 <37215457+abansal21@users.noreply.github.com>
Co-authored-by: Chirag Chandrashekhar <chirag@usebruno.com>
* Allow ctrl/cmd + click to open URLs
* fix for when user does cmd+tab, then comes back without it
---------
Co-authored-by: Sid <siddharth@usebruno.com>
* add font-size setting for code editor
* add code font size to remaining editors
* align font-size after font-family
* changed default font size to 14
* fixed className typo
* set inherit mode if unset
* add code font size schema validation
* add font size to folder settings
---------
Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
The goal is to achieve the same behavior from Insomnia which allow to format a GraphQL query using prettier (see 264177b56f/packages/insomnia/src/ui/components/editors/body/graph-ql-editor.tsx (L260-L266)).
I moved the `prettier` deps from `devDependencies` to `dependencies` because it's now used within the application.
I was forced to import `prettier/standalone` & `prettier/parser-graphql` (as it is explained here: https://prettier.io/docs/en/browser.html) otherwise I got that error:
> Couldn't resolve parser "graphql". Parsers must be explicitly added to the standalone bundle.