Open jhump opened 5 years ago
This is an old one... but well needed. :) I'd highly appreciate
This very important feature, for fast coomunicete in develop team. Now this feature has wombat https://github.com/rogchap/wombat/pull/51, but with bug https://github.com/rogchap/wombat/issues/50#issuecomment-1236460826
Hey, @jhump , i have given this a shot. Here's what it looks like. The grpcurl
updates on every change, as expected. Wonder if there is a better placement for this.
if that looks good, can send a PR for this for review.
I won't be able to approve/merge any changes as I'm no longer with FullStory. However, I can provide some input on the above described solution:
Copy as "grpcurl"
.navigator.clipboard.writeText(grpcurlStatementText)
.I'm not sure who at FullStory would be able to provide more guidance on what kind of change would be accepted. I know @dragonsinth has helped me merge some small changes, but I'm not sure who should review something of this nature. I think the biggest concern would be getting the UX right -- so that the feature isn't too prominent/distracting but is still discoverable. I had originally envisioned this being a context menu sort of thing, like right-clicking in the form brings it up, but perhaps that is too subtle/hidden...
It could be another Tab.
It could also be another pane in Raw Request (JSON)
, which we could rename to just Raw Request
.
@jhump, @dragonsinth , thank you for feedback. Would love to have it same like in Postman, where there is a sidebar, and one of the buttons is show code
. Upon clicking that, it pops up a pane with generated code. This looks like a much bigger work and falls out of scope of this request.
I also like the idea of having a "copy this" button. I find it handy when websites have such button along any data that I want to copy. A nice clipboard icon could be used for this. This could be done in a separate PR.
Showing the copy button without the actual generated code IMO is worse UX, as this does not allow to validate that what you are actually copying into clipboard is actually what you will want to use and run in bash. So having the generated grpcurl
command on screen allows to inspect what the command looks like, and whether it something what I will want to be running in terminal.
So all in all, I liked the last suggestion from @dragonsinth . Renamed second tab to Raw request
, and added a new tab with the grpcurl
contents. Also added heading to the editable JSON payload pane.
A slick feature would be to be able to
Copy as 'grpcurl'
-- which would extract all connection info from command-line flags as well as the request metadata and data in the web form and use that to generate an equivalentgrpcurl
command.Similarly, the ability to paste a
grpcurl
command, and have that auto-populate the metadata and request message data would be slick as well.