visortelle / haskell-spotlight

VSCode extension for Haskell
https://marketplace.visualstudio.com/items?itemName=visortelle.haskell-spotlight
MIT License
108 stars 3 forks source link

Browser Extension Feedback #7

Open visortelle opened 2 years ago

ulysses4ever commented 2 years ago

Linux, Firefox: Ctrl+H opens both, history pane and extension's widget...

Otherwise, there're some things that work not as I'd expect or don't work.

I'm not sure to have a tool that tries to provide interface to Hackage and being a Hoogle frontend at the same time. In my opinion, Hoogle functionality is just enough and it'd be wise to try to follow it as much as possible (e.g. do away with :t, hyperlink package names to functions/types that were searched for, etc.).

I like the UI in general, and how snappy it is!

visortelle commented 2 years ago

@ulysses4ever, Thank you for feedback.

Linux, Firefox: Ctrl+H opens both, history pane and extension's widget...

  • on empty tab the widget does not pop up;

Didnโ€™t check this case.

- [ ] Iโ€™ll try to fix if it wonโ€™t require any additional browser permissions.

Won't fix it for now.

  • search by function name requires :t -- strange; :n would make more sense, but ideally, like on Hoogle, I'd not need to specify.
  • on Hoogle, if I search by name, it shows package names hyperlinked to the actual function/type, but the widget links to package index pages on Hackage.

I think, you are right.

ulysses4ever commented 2 years ago

Hey, great work!

Just installed the extension from the official Firefox store (and 5-starred it!). The issue is: I don't seem to be able to change the hotkey. I see the bubble suggesting me to click on the key I prefer, but clicking anywhere in the area doesn't seem to have any effect.

Also, the default seems to to have changed to Alt+H which activates the Help menu in the menu bar for me (Linux) and doesn't show up the extension's search bar. The previous version had Ctrl+H as the default, and although it showed the History pane as a side effect, at least it did show the extension's search bar.

visortelle commented 2 years ago

@ulysses4ever, thank you.

Screen Shot 2022-01-13 at 11 20 07 PM

It's strange to hear about the hot key. Did you try to refresh the tab after you changed it as the popup suggests? If not, maybe I should make it more explicit.

It won't help, I'll try it in Linux VM. What distro do you use?

Martinsos commented 2 years ago

Just gave it a try on Chrome, Linux, and it seems to work well, great job!

I took me a bit of time to get it opened -> first I was trying Ctrl + H, which wasn't working and was opening history, then I read that now Alt + H is default so I tried that but it didn't work (I think it didn't work because I was in chrome://extensions tab at that point), and then I remaped the keybindings to well, again Alt + H, just to be sure, and then I got it working in a normal tab. So I believe all works fine, it was just confusion on my end. Only useful thing I can imagine is somehow telling users immediately that Alt + H is a shortcut, but I am not sure what is the best mechanism for that (maybe in the extension description?).

visortelle commented 2 years ago

@martinsos, thank you. Glad to hear it. ๐Ÿ™‚

You are right. Probably it's not obvious to users. I added info about the default hot key and how to change it. Is it clear now?

Screen Shot 2022-01-13 at 11 34 07 PM
Martinsos commented 2 years ago

@visortelle Yeah, sounds good to me for now, I don't have a good idea how to make it clearer than this! Great work!

ulysses4ever commented 2 years ago

@visortelle I did refresh the page but the problem is that the pane with key picker (like the one on your screenshot) seems completely unresponsive, so I'd be surprised if something changed after a refresh. I see it on Firefox under both Ubuntu and NixOS, and I don't think the distro matters (you could try any). What could matter is that I run under pure Wayland (I don't assume you know what that is if you don't use Linux): sometimes GUI elements glitch. And with the key picker, it does seem like it fall for it right after I open it: it first glitches, I close it and open again, and then it shows up fine. But, as I said, unresponsive. I may get to trying it under X instead of Wayland later (if no one beats me to it).

visortelle commented 2 years ago

@ulysses4ever maybe this bug? ๐Ÿž

https://bugzilla.mozilla.org/show_bug.cgi?id=1727709

Martinsos commented 2 years ago

@visortelle I did refresh the page but the problem is that the pane with key picker (like the one on your screenshot) seems completely unresponsive, so I'd be surprised if something changed after a refresh. I see it on Firefox under both Ubuntu and NixOS, and I don't think the distro matters (you could try any). What could matter is that I run under pure Wayland (I don't assume you know what that is if you don't use Linux): sometimes GUI elements glitch. And with the key picker, it does seem like it fall for it right after I open it: it first glitches, I close it and open again, and then it shows up fine. But, as I said, unresponsive. I may get to trying it under X instead of Wayland later (if no one beats me to it).

Just to add a bit of data to this: I am on Linux, also Wayland, but Chrome, and it runs under XWayland and I don't have any issues. So it might be a combo of Firefox + Wayland. @ulysses4ever I didn't get if you are running Firefox directly on Wayland or via XWayland?

ulysses4ever commented 2 years ago

@Martinsos pure Wayland (XWayland disabled).

ulysses4ever commented 2 years ago

@visortelle looks very much like it thanks! Strange that they closed it 4 months ago with a fix, and I run pretty recent software usually (Firefox 95 I think). Anyway, I guess you can ignore it.

ulysses4ever commented 2 years ago

Does work under the X server (Firefox, Linux) although does not recognize my Super key (I expect it to show as Meta in the key picker, but it shows as a regular key called OSLeft for some reason).

I'd turn off pulsation of the key picker because I find it annoying. But that's opinionated of course.

visortelle commented 2 years ago

I'd turn off pulsation of the key picker because I find it annoying. But that's opinionated of course.

It seems like you are spending too much time in the key picker. ๐Ÿ™‚ I will try to figure how to deal with it.

visortelle commented 2 years ago

@ulysses4ever can you please check, is all modifier keys are properly handled here https://wangchujiang.com/hotkeys/ ?

If yes, then I'll use this library to handle key events instead of relying on cross-browser and cross-OS compatibility.

ulysses4ever commented 2 years ago

@visortelle it does seem to recognize my Super key (which it calls Command for some reason), so it seems to be doing better.

visortelle commented 2 years ago

@ulysses4ever ok, then I'll use this lib in the next releases.

ulysses4ever commented 2 years ago

It looks very nice. The only two major features I'm missing in comparison to Hoogle is filtering by package and navigation with arrow keys.

visortelle commented 2 years ago

@ulysses4ever, it's on the roadmap. ๐Ÿ™‚

skykanin commented 2 years ago

It would be nice if the package list also contained a short description of the package like it does on hackage image image

visortelle commented 2 years ago

@skykanin it will. It's one of the planned improvements. ๐Ÿ™‚

visortelle commented 2 years ago

The extension is available for Chrome now. ๐Ÿฅณ

https://chrome.google.com/webstore/detail/haskell-spotlight/npadgihccblidebeflijkcgfpklgalkj

pigam commented 2 years ago

I like it very much ! I bound Ctrl+Alt+Comma (Comma is H on a bรฉpo keyboard), all is ok. No : fast & superb !

I did not found how to close the interface with keyboard only though. I expected the binding to act as a toggle.

visortelle commented 2 years ago

@pigam Thank you!

The initial implementation had a toggle behavior. I don't remember what was the reason why I switched to the current behavior. Probably will revisit it. ๐Ÿ™‚

Esc closes the popup.

There is a known bug ๐Ÿž - Esc doesn't work if the search results list is in focus (has been clicked by mouse). Will be fixed in further releases.