antfu-collective / icones

โšก๏ธ Icon Explorer with Instant searching, powered by Iconify

Home Page:https://icones.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Icones VS Code extension

afzalsayed96 opened this issue ยท comments

Hey @antfu ๐Ÿ‘‹๐Ÿป

I made a VS Code extension to search and copy icons without leaving code editor. The extension renders a webview of a forked icones.netlify.app site.

Here's the source code for the extension. I would love to know your thoughts on this.

And here's the published extension: https://marketplace.visualstudio.com/items?itemName=afzalsayed96.icones

This is great & thanks for making it. Just tried out and here are some of my thoughts:

  • The name, it will be great to name it Icรดnes instead of Icones
  • The description, same, great if it can match with this repo
  • README, I think it's better to have some intro to the extension itself. Like how to use it with some screenshots of it.
  • The webview has some horizontal margins on my side, which is not expected I think.
  • You can use the injected css variable to make the whole app matches with vscode theme & in this way, the dark mode toggle might no longer be needed.
  • Download is not working, not sure if there is a way to replace it will some native vscode functionality to add them into to current project.

Let me know if you need any help, I guess the theming might be a bit hard to do. If the first three points get resolved, I would love to have a link to it in the README. Thanks!

@antfu Thanks for the detailed review.

As pointed out, I've made the changes to name, description & added a usage GIF in README.

Also I've fixed the horizontal padding issue. As for the download thingy, I believe it might need a closer look. The navigator.writeText api wasn't working earlier either and I had to replace that with copy-text-to-clipboard package.

To be honest I like the custom theme of the site over any vscode theme as it ensures proper contrast for icon previews, etc.

๐Ÿ‘ Looking great, I have added a link to it in README.

If the changes for embedding it is not overhauling, you can make a PR to this repo with a build or runtime flag to switch for different platforms - so we can have a single code base which makes it easy for you to keep the new features up-to-date as well.

Also, I also notice it's actually loaded from the web. It might be great for we can just embed the built files into the extension and making it usable even in offline mode. (which I think is a good alternative before we have the native client, or, we just don't need it anymore XD)

FYI, I also make this extension that might get your interest https://github.com/antfu/vscode-iconify

Sounds great. I will look into what it would take for loading the site assets locally.

Published v0.0.3 with website assets being served locally and also it now uses the same codebase as the website itself!

https://marketplace.visualstudio.com/items?itemName=afzalsayed96.icones

Great, well done!

@afzalsayed96 do you use Twitter & what's your handle? Would love to post a tweet about this and credit to you. Thanks

I do! Handle's the same as github username: https://twitter.com/afzalsayed96

Thanks a lot!