FIX: Sync URL Input when pasting a cURL command#7344
FIX: Sync URL Input when pasting a cURL command#7344gitKashish wants to merge 1 commit intousebruno:mainfrom
Conversation
WalkthroughThe QueryUrl component now synchronizes the editor UI after dispatching URL updates from paste handlers. When curl or GraphQL content is pasted, the code immediately updates the editor display to reflect the new URL alongside existing state updates. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Fixes #7345 |
|
Hey @gitKashish, thanks for taking the time to work on this. We’ll review your changes over the next day or two and get back to you with an update. |
|
Hi @chirag-bruno, thanks for responding. Is there some update on this? |
|
Any update on this bug fix? |
Description
After the recent update when I tried pasting in the a cURL command in the URL text input. The cURL was parsed properly and it was updated in the app state as well. But the URL input did not reflect the API URL.
I think it was due to the
event.PreventDefault()on the paste operation that was causing the issue and causing the single line editor to not reflect changes, since its paste event was interrupted.So I explicitly set the URL once the cURL command is parsed. I hope this seems like a valid approach. I made the changes for both
handleGraphqlPaste()andhandleHttpPaste()functions.Thanks.
Contribution Checklist:
Summary by CodeRabbit