#16 added support for specifying the icon glyph of a generated Shortcut, however there's currently no easy way to choose an icon without having to refer to other sources to find the code for your icon of choice.
It would be nice if the user could just do something like
import {
GLYPHS,
} from '@joshfarrant/shortcuts-js/meta';
buildShortcut([], {
icon: {
glyph: GLYPHS.KEYBOARD,
},
});
Here, the user accesses a glyph using a readable name, KEYBOARD
, rather than using E836
, as it is at the moment.
There's no standardised set of names for these glyphs, so naming them may be a bit of a challenge and might need to be broken down into a few different stages.
@xAlien95 has already done a huge amount of (probably very tedious!) work for this by coming up with Italian names for the glyphs (here). I don't want this work to go to waste, so for starters it can serve as a point of reference when coming up with the English names. Additionally, it would be nice if we could have language specific files for these glyph names, with the Italian versions in a meta/index-it.ts
file, English in a meta/index-en.ts
file, etc.
Help would be appreciated on this one, so feel free to jump right in! Even just adding the names for a couple of glyphs would be a big help.
Again, I stress that anyone wishing to get started with this to take a look at the previous discussion in #15 and #16, and specifically @xAlien95's work referenced in this comment.