VSpaceCode icon indicating copy to clipboard operation
VSpaceCode copied to clipboard

Add icons for all bindings

Open stevenguh opened this issue 4 years ago • 9 comments

Problem

whichkey v0.9 added support for icon on the menu (https://github.com/VSpaceCode/vscode-which-key/issues/41). https://github.com/VSpaceCode/VSpaceCode/pull/205 added most of the icons for our default bindings.

I am opening this to track the rest of the menus that don't have icons.

  • Clojure major mode
    • [ ] SPC m e (+Evaluate)
    • [ ] SPC m k (+Structural editing), including +Wrap sub-menu
    • [ ] SPC m m (+Manage REPL session)
    • [ ] SPC m r (+Refactor), including all sub-menus

Solution

Find the suitable icons for the reminder of the menus from Product Icon Reference

stevenguh avatar Jun 23 '21 05:06 stevenguh

I think there are more in other major modes, but I'd have to check. However, I left them out because I believe it's impossible to find matching icons for those items/actions, typically because they are just too specialized. As long as the set of available icons stays the same, I don't believe this is acitonable.

The-Compiler avatar Jun 23 '21 18:06 The-Compiler

I understand some of them are very specialized, and I mostly opened this issue to track which menus are left without icons. Maybe one day vscode will have the icons we need :)

stevenguh avatar Jun 24 '21 04:06 stevenguh

Here's a full list, found via jq '.contributes | recurse | select(type == "object" and .name and .icon == null and (.key | type != "string" or (startswith("languageId:") | not)))' package.json and some manual filtering:

  • Main
    • [x] vspacecode.magitRefBindings (I didn't realize those were part of VSpaceCode, I might attempt adding icons there, but not sure if that's supported!)
    • [x] SPC f i (+File -> +Indentation)
    • [x] SPC f y (+File -> +Yank)
  • Clojure major mode
    • [ ] SPC m e (+Evaluate)
    • [ ] SPC m k (+Structural editing), including +Wrap sub-menu
    • [ ] SPC m m (+Manage REPL session)
    • [ ] SPC m r (+Refactor), including all sub-menus
    • [x] SPC m T (+Toggle)
  • F# major mode
    • [x] SPC m c (+Compile)
    • [x] SPC m s (+FSI REPL)

I was mistaken about SPC z ., I guess I was accidentally running an older version there.

Maybe there are some low-hanging fruit left there. For Clojure, I'd probably need help from someone who knows what those terms really mean, it all sounds very foreign to me :sweat_smile:. @practicalli-john or @lread, maybe?

For reference, here's the list of available icons again: VS Code Product Icon Reference

The-Compiler avatar Jun 24 '21 11:06 The-Compiler

Maybe there are some low-hanging fruit left there. For Clojure, I'd probably need help from someone who knows what those terms really mean, it all sounds very foreign to me 😅. @practicalli-john or @lread, maybe?

Heya! Sorry, I really don't know what icons I'd use for those Clojure bindings either! Are we OK with not having icons for these lower level operations?

lread avatar Jul 07 '21 18:07 lread

@The-Compiler @stevenguh Now I actually look at the icons available, these are my suggestions for the Clojure commands

Evaluate sub-menu Use same icon as evaluate menu for all sub-commands except for the following

  • interupt evaluate - debug-stop
  • clear evaluation results - clear-all
  • select expression - selection

Structural Editing

  • Toggle paredit mode - same as Toggle menu
  • Barf expression forward - arrow-right
  • Convolute expression -
  • Backward expression - arrow-left
  • Forward down expression - arrow-down
  • Backward down expression - arrow-down
  • Forward expression - arrow-right
  • Raise expression - arrow-up
  • Slurp expression forward - arrow-right
  • Transpose expression - ``

Wrap Nothing suitable found in icon list - suggest using gift for everything

Manage REPL session Use the repl icon for everthing except

  • Refresh changed namespaces - refresh
  • Disconnect from REPL server close
  • Refresh all namespaces - refresh

Refactor

  • Add - add
  • Add missing library spec - book
  • Cycle Clean Convert - refresh
    • Clean namespace definition refresh
    • Cycle privacy lock
  • Extract Expand - expand-all
    • same for all sub-menu items
  • Introduce Inline - add
    • same for all sub-menu items
  • Move combine
    • same for sub-menu
  • Thread macros - arrow-right
    • use for sub-menu too except for
      • Unwind thread refresh
      • Unwind thread all refresh

practicalli-johnny avatar Jul 07 '21 20:07 practicalli-johnny

Seems reasonable to me. Would you mind submitting a PR? 👍

stevenguh avatar Jul 14 '21 03:07 stevenguh

Its probably going to be a while before I get chance to submit PR as I've been ill for the last 6 months and have a long list of community tasks to work on first. I am not actively using VSpaceCode or VSCode at the moment.

It does seem that all that is required is adding "icon": "name-of-icon", to the menu items above. So if anyone enjoys working with a large json file, it seems straight forward to do.

If I do find some time, I will submit a PR, but its not a priority for me I'm afraid.

practicalli-johnny avatar Jul 14 '21 11:07 practicalli-johnny

I hope you are feeling better now :) Appreciate your time getting most of the icons and that really helps.

It's pretty straightforward. I would say this is up to grab by anyone. I will work on it if I have some time.

stevenguh avatar Jul 21 '21 03:07 stevenguh

Looking at VSpaceCode again and it seems the icons have been added to the Clojure commands

vspacecode-clojure-menu-dark

My thanks to everyone for making this happen, it adds a lot to the experience now I see it in action. Thanks again.

I'm creating an improved guide to using VSpaceCode (mostly for Clojure and maybe json/javascript) at https://practical.li/vspacecode/

practicalli-johnny avatar Feb 08 '23 20:02 practicalli-johnny