hoppscotch / hoppscotch

Open source API development ecosystem - https://hoppscotch.io (open-source alternative to Postman, Insomnia)
https://hoppscotch.io
MIT License
65.13k stars 4.53k forks source link

[request] VS code extension #313

Closed arangates closed 4 years ago

arangates commented 4 years ago

shipping as Vscode extension might be the best place to start getting initial traction

liyasthomas commented 4 years ago

@arangates would you like to contribute to making a VS code extension..? I don't have any in-hand experience on making a VS Code extension.

sneakycrowllc commented 4 years ago

@arangates How are you imagining this looking and working? Just trying to wrap my head around the UI/UX.

ghost commented 4 years ago

@sneakycrow I can imagine making it a tab similar to markdown preview https://github.com/shd101wyy/vscode-markdown-preview-enhanced

FatDoge commented 4 years ago

Yep, it should has a GUI like the web version, people may choose it rather than a command line version postwoman.

ghost commented 4 years ago

maybe build a desktop version too. https://github.com/mimecorg/vuido

sneakycrowllc commented 4 years ago

maybe build a desktop version too. https://github.com/mimecorg/vuido

This sounds rad. Could you create a second issue for it so we can track it @fibric

sneakycrowllc commented 4 years ago

@liyasthomas I'll take a shot at this. I haven't ever built a VSCode plugin before though. So if there's someone with more experience with then they can take it. Otherwise I'll try to flex my learning muscles πŸ’ͺ

sneakycrowllc commented 4 years ago

@liyasthomas Feel free to assign the issue to me. I'm going to get started on some tutorials for making a VS Code plugin today and get started on this specific plugin sometime after Thanksgiving.

andreujuanc commented 4 years ago

I can help you out @sneakycrow :)

sneakycrowllc commented 4 years ago

@andreujuanc That sounds awesome! I'm actually unsure I can contribute the time right now or for the foreseeable next few months. @liyasthomas can you go ahead and un-assign me from the task! Sorry, I just had a bunch of personal stuff come up recently!

liyasthomas commented 4 years ago

Okay. I can understand.

Kradirhamik commented 4 years ago

Looking forward for this! I'm not so good at coding, but I'm alright at testing if useful ;)

vieirin commented 4 years ago

I have no experience in vscode extensions, but I don't believe it's that hard, so I could help on this, platformio starts a whole ide over vscode, for example. I think it's a good reference for this

ac2epsilon commented 4 years ago

AFAI .. -IAC? -AIC? never remembered them, damn, anyway. What is the main obstacle to vsce? You're right and it's not as difficult (as nothing too heavy on earth), but here are three rocks on the way: 1. Limitations. Because vsc is a hosted environment, you have some rules and restrictions. For example, no SVG in the project except blah blah. But you love your SVG, don't you? 2. Integration. As Eclipse uses swt, the same thing happens with vsc. You must follow the instructions and follow the API to make your vsce look natural and work properly. Own menus, own notifications, own status bar, right? Unpredictable screen space that the user can change at any (rest assured, inappropriate) time . 3. UX. Due to the built-in nature of the plugins, they are criminally restricted on the screen. As for today's PW, which we all know and love, it must be completely rewritten and any component reviewed. As a result, my view is simple: if and when an application becomes vsce, it should be a separate project that can only have a few snippets of the fullscreen version / Or we have to stay limited to vsce-compatible features (oh, no, it's just a terrible alternative). So Fork & Shine!

liyasthomas commented 4 years ago

Wow! That's a neat clarification. I guess I know how this will end.

Edit: I changed my mind. I'll be working on this feature since it's the mose requested feature βœ¨πŸ™ŒπŸΌ

liyasthomas commented 4 years ago

Can we make use of WebView in VS code extension? @RandomFractals any thoughts?

RandomFractals commented 4 years ago

yes! I would recommend that route as there are no other options to do it for custom editors or views in vscode.

You might need to refactor and retrofit some of your web app parts to reuse them for this effort.

However, keep in mind vscode webviews are your typical node.js web apps and things should work well if they work in a browser.

You just get an option to hook up to vscode explorer, do custom outlines, config settings, fs hooks, etc. that you don't typically get in a browser experience.

RandomFractals commented 4 years ago

@liyasthomas if you are just starting with vscode ext. dev, a few pointers:

  1. don't use that cat demo. It's a really bad webview ext. example.

  2. Join this slack workspace where you can ask questions about vscode ext. dev:

https://vscode-dev-community.slack.com/

It's not the official vscode team slack, but there are some members from that team on it.

Overall, it's a very vibrant and warm dev community. I do congregate there a lot :)

Good luck!

liyasthomas commented 4 years ago

Lol, i was just going through the cat demo and I was like.. "how immature this demo is..".

Thanks for the link πŸ™ŒπŸΌπŸ‘

RandomFractals commented 4 years ago

haha! yeah, it's done by the cat lovers & it's a shame that most devs starting on vscode extensions get to that page first.

My recommendation is you pick a similar http proxy/client with webview extension from vscode marketplace and clone it to get started since they don't support paid extensions and pretty much all of them are OSS with links to github repos you can peruse.

There are a bunch of them, but none are like your postwoman. Btw, I love the name!

ac2epsilon commented 4 years ago

Rather interesting two things: does it technically possible to make "vsce" target in Nuxt AND does it possible to mix contexts of vsc electron and separate vue pwa? I m happy to learn new, do if you can - I cross fingers for yous success

RandomFractals commented 4 years ago

@ac2epsilon you seem to talk a lot about vscode like you know it. have you tried creating an extension for it? I have not seen 1 in your github profile.

As I have mentioned above:

However, keep in mind vscode webviews are your typical node.js web apps and things should work well if they work in a browser.

You just get an option to hook up to vscode explorer, do custom outlines, config settings, fs hooks, etc. that you don't typically get in a browser experience.

So, you can use nuxt and vue as postwoman does for your custom vscode webview extensions & with proper packaging you can hook into vscode fs, settings, configs, etc. & many extensions have done so.

For example, SandDance vscode extension is just a wrapper of their web app: https://github.com/microsoft/SandDance/tree/master/packages/vscode-sanddance It's done in react but same logic should apply for vue web apps...

Also, you don't have to wire into vscode status bar, menus, etc. if you don't want to and many http client extensions don't: https://marketplace.visualstudio.com/search?term=http%20client&target=VSCode&category=All%20categories&sortBy=Relevance

For the best dev UX I would recommend you do tho.

liyasthomas commented 4 years ago

Closing due to inactivity. VS code extension for PW is not in development road map.