Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode Extension Feedback #11

Open
visortelle opened this issue Jan 18, 2022 · 18 comments
Open

VSCode Extension Feedback #11

visortelle opened this issue Jan 18, 2022 · 18 comments

Comments

@visortelle
Copy link
Owner

visortelle commented Jan 18, 2022

Please check out this comment first: #2 (comment)

Screen.Recording.2022-01-18.at.9.45.18.PM.mov
@visortelle visortelle changed the title VSCode extension feedback VSCode Extension Feedback Jan 18, 2022
@visortelle visortelle pinned this issue Jan 18, 2022
@yutotakano
Copy link

yutotakano commented Jan 18, 2022

I've played around with it (simulating some searches I might do during actual development) and it's quite useful! With the combination of Haskell Language Server hover documentation, it improves how quickly I can experiment around with new functions and understand existing code.

There is a bit of a sharp end on the right of function descriptions when it is expanded, meaning some of the text is not visible (and there is no indication that there are more) unless the window is wide enough. Perhaps we can improve this with ellipsis in the text, or a shadow/border in the package list.

output.mp4

EDIT: I just realised that the website version also suffers the same problem when the viewport is not wide enough.

@visortelle
Copy link
Owner Author

visortelle commented Jan 18, 2022

@yutotakano thank you for the bug report!

The browser extension, VSCode extension, and the site version use the same React component. Bugs and features across them will be eventually consistent. 😆

@why-not-try-calmer
Copy link

why-not-try-calmer commented Jan 19, 2022

quoting from this reddit comment:

Can you make it so that the Haskell Spotlight tab closes automatically when it loses focus? I generally dislike it when extensions open new tabs that take so much space.

@Sorokin-Anton
Copy link

For me it would be a good option that if some code was selected when I press Alt-H, it would be instantly hoogled (for example, I see unknown function in code, then I select it, and press Alt-H, without Ctrl-C/etc)

@niekvandepas
Copy link

I would personally prefer if the extension showed up in a modal (similar to VS Code's Command Palette) rather than in a separate tab.

@visortelle
Copy link
Owner Author

@NiekPas me too, but as I know, it's not possible to implement in VSCode for this moment.
The extension is a subproject of the HackageUI project and I don't have enough bandwidth now to reimplement it using native VSCode widgets.

Also, I don't really know examples of any good working extensions with similar functionality for VSCode that use native UI.
Not so long time ago I moved from Emacs to VSCode, maybe I missing something.
If anyone knows such, please share. 🙂

@niekvandepas
Copy link

@visortelle Ah, I wasn't aware of that limitation. That's unfortunate, and seems like something that would really limit the usefulness of some extensions. Perhaps it's a security restriction of some kind.

I did a quick search of the VS Code issues and found nothing, so perhaps something it could be suggested there --- although I wouldn't expect it to be implement by end-of-day. 😄

In any case, thanks for making this extension! It's good to see some (frankly, much-needed) progress in the Haskell DevEx :)

@visortelle
Copy link
Owner Author

visortelle commented Jan 21, 2022

I would personally prefer if the extension showed up in a modal (similar to VS Code's Command Palette) rather than in a separate tab.

Relevant issue: microsoft/vscode#112031

Almost a year ago it has been moved to the backlog. 🤞

Screen Shot 2022-01-21 at 9 29 09 AM

@epicallan
Copy link

hi @visortelle, thanks for the extension, I really like it. I have a question though, would you consider adding searching using a local hoogle DB or local pre-built haddock docs?

@visortelle
Copy link
Owner Author

visortelle commented Jan 24, 2022

hi @epicallan and thank you for feedback!

would you consider adding searching using a local hoogle DB

I didn't consider this option, but it's not hard to implement. Probably it's a good idea.

In the next few weeks, I'll dedicate a day or two to the VSCode extension improvements.

Collecting more feedback. 🙂

@goldfirere
Copy link

Just tried this out today. I really like it!

My suggestion would be to have a way to open links within VSCode. For example, I wanted to see the Data.Text module. I searched for Data.Text. But then when I clicked, I was taken to my separate browser. Maybe make this somehow user configurable?

Thanks for your work here!

@visortelle
Copy link
Owner Author

@goldfirere thank you for the feedback!
I considered this option. Will implement soon. 🙂

@mip29
Copy link

mip29 commented Feb 13, 2022

Not sure if this is the correct place to ask, but would it be possible to publish this extension to open-vsx.org for vs codium users?

@visortelle
Copy link
Owner Author

visortelle commented Feb 14, 2022

@mip29 I tried login in at open-vsx.org, but it wants to read my private profile information 😱

Screen Shot 2022-02-14 at 7 10 00 AM

If you want, you can publish it under your own account.

All you need is NodeJS > 14.x.x. https://nodejs.org/en/download/
Clone the repo, then cd vscode-extension && make build

@KristianBalaj
Copy link

KristianBalaj commented Feb 20, 2022

I love this extension, an absolute time saver 👍

I have a suggestion. There is a significant delay until all search results appear (up to 2s even on 1Gbs network connection). I find myself searching for the same functions multiple times and it would be nice if the results would be cached, and thanks to caching showed immediately without waiting for an API response.

EDIT:
Caching also between "sessions", so even after closing/reopening the spotlight tab. Because, I'm using it in a way of opening, searching and then closing the tab.

@visortelle
Copy link
Owner Author

visortelle commented Feb 20, 2022

@KristianBalaj, thank you for the feedback.

You are right - latency is probably not as low as it could be.
Now each request makes the following trip around the world 🌎🤠:

Your PC (let's say you are in Europe) -->
API Proxy to pass CORS (US region) -->
haskell.hoogle.org (GeoIP database says it's in Dublin, Ireland. But wouldn't be 100% sure here) -->
Your PC (back to Europe)

Caching may be the solution, but instead of dealing with it, I'd rather try to bring API closer to a user and remove extra hops by hosting a Hoogle instance for each region.

I'll think about it later. Right now busy with other activities. 🙂

@KristianBalaj
Copy link

Hey! Wondering if it is possible to search in some other Haddock than the official one (Probably a setting where i would input multiple hosts where all of them are used when searching).

I'm interested in the Plutus Haddock - it runs on a separate hosting. It would be nice to have it in the Spotlight along with the types search.

https://playground.plutus.iohkdev.io/doc/haddock/index.html

@visortelle
Copy link
Owner Author

visortelle commented Mar 24, 2022

@KristianBalaj Hello.
It's probably the same request as the request to specify a custom Hoogle instance (or multiple instances) #11 (comment)

If Cardano guys have such running Hoogle instance, it would be possible to search over their docs.

The ability to configure Hoogle instances to search over them isn't hard to implement, but I don't have the bandwidth at this moment to do it.

@visortelle visortelle unpinned this issue Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants