Assign names to the available Shortcut icon glyphs
Closed this issue · 3 comments
#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.
Names for almost all the Shortcut icon glyphs have been assigned, you can see the full list here: xalien95 :: docs/components/Metadata/gist.js. The following glyphs have to be named, I would have suggestions on them since I'm not a native English speaker 🙂
Objects
CITY
STEPS
- ``
HARDDISK
DATABASE
DATACELLS
- ``
- ``
AGENDA
OPERA
MASKS
BELL
BELL_MATCH
PIPETTE
orPICKER
HAMMER
- ``
HAMMER_CLAW
MEAL
orSOUP
GLASS
orCOCKTAIL
HANGER
People
CONFERENCE
orTALK
STUDENT
orTEACHER
- ``
SNOWBOARD
- ``
- ``
Symbols
CENTER
- ``
Already assigned names can be changed, feel free to suggest names that you think are more appropriate.
Great work!
I've got a few of my suggestions here. I compared a few of these to Font Awesome and took the name from there, in some places. Those have been marked with (FA).
Objects
BINOCALARS
HDD
(FA)SERVER
(FA)DATABASE
(FA)- ?
- Is it a
SPEAKER
? - Could maybe be
BOOKMARK
but I see that's used elsewhere, and I agree with the other use more. Don't know what to suggest. - A hard one, but it could be likened to a
VENETIAN_MASK
. We could just simplify it toMASK
MASKS
BELL
CONCIERGE_BELL
(FA)- I prefer
PIPETTE
, buy either's fine - This is complicated by 17, but it could be
SLEDGEHAMMER
orMALLET
HAMMER_WRENCH
maybe?- If we go with 15, it could just be
HAMMER
- I prefer
SOUP
COCKTAIL
HANGER
is good, orCOAT_HANGER
but I don't know if that's just a British word
People
- Possibly
PODIUM
- I like
STUDENT
SKIING
orSKIING_NORDIC
(FA)- Or
SNOWBOARDING
- depends if we want nouns or verbs HIKING
- Might just have to be literal,
WALKING_WITH_STICK
or something
Symbols
TARGET
BULLSEYE
Existing
These are just some suggestions for existing icons, only my opinion so don't feel obliged to change them!
RESTAURANT
-> UTENSILS
SUNNY
-> SUN
CLOUDY
-> CLOUD
RAINY
-> RAIN
VIDEOCAM
-> VIDEO
MAIL
-> ENVELOPE
MAIL_OPEN
-> ENVELOPE_OPEN
CALL
-> PHONE
PHONE
-> MOBILE
STATS
-> BAR_CHART
PRINT
-> PRINTER
GAME
-> GAMEPAD
HEADSET
-> HEADPHONES
HELP_BUOY
-> LIFE_RING
(?)
TIME
-> CLOCK
THUNDER
-> LIGHTNING
or BOLT
or LIGHTNING_BOLT
BRUSH
-> PAINT_BRUSH
ATTACH
-> PAPERCLIP
CUT
-> SCISSORS
ZOOM
-> MAGNIFYING_GLASS
WATER
-> DRIP
or DROP
CAFE
-> MUG
SHIRT
-> T_SHIRT
SCHOOL
-> GRADUATION_CAP
or MORTARBOARD
DANCE
-> DANCING
GYM
-> WEIGHT_LIFTING
SWIM
-> SWIMMING
RUN
-> RUNNING
WALK
-> WALKING
CIRCLE_ADD
-> CIRCLE_PLUS
CIRCLE_CLOSE
-> CIRCLE_CROSS
CONTRACT
-> COMPRESS
OPTIONS
-> SLIDERS
I started editing gist.js
based on your suggestions. I found some recurrences:
- if we call
CLOUDY
asCLOUD
, there's already aCLOUD
at line 262 - if we call
VIDEOCAM
asVIDEO
, there's already aVIDEO
at line 34
Could we call the last glyph in People section as OLD_MAN
or something similar?
Also, I based these names on the ionicons icons, that's the reason behind weather conditions instead of weather elements. It also let us to not find a new name for the Cloud services (last icon in Symbols) (maybe CLOUD_SERVICE
?). Same goes for meanings instead of items (CUT
instead of SCISSORS
, ZOOM
instead of MAGNIFYING_GLASS
/MAGNIFIER
, and so on).
I'm a bit concerned about changing MAIL
to ENVELOPE
and PHONE
to MOBILE
. At primary school we study British English, so I don't know what differences are there between British and American words and if some terms are British only.
I included most of your suggestions. As for the replacements here are the missing/delayed ones:
VIDEOCAM
->VIDEO
MAIL
->ENVELOPE
MAIL_OPEN
->ENVELOPE_OPEN
CALL
->PHONE
PHONE
->MOBILE
STATS
->BAR_CHART
PRINT
->PRINTER
TIME
->CLOCK
BRUSH
->PAINT_BRUSH
ATTACH
->PAPERCLIP
CUT
->SCISSORS
ZOOM
->MAGNIFYING_GLASS
WATER
->DRIP
orDROP
SHIRT
->T_SHIRT
SCHOOL
->GRADUATION_CAP
orMORTARBOARD
I replaced CLOUD
with CLOUD_SERVICE
, if it's okay.