joshfarrant/shortcuts-js

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 🙂

Missing glyph names

Objects

  1. CITY
  2. STEPS
  3. ``
  4. HARDDISK
  5. DATABASE
  6. DATACELLS
  7. ``
  8. ``
  9. AGENDA
  10. OPERA
  11. MASKS
  12. BELL
  13. BELL_MATCH
  14. PIPETTE or PICKER
  15. HAMMER
  16. ``
  17. HAMMER_CLAW
  18. MEAL or SOUP
  19. GLASS or COCKTAIL
  20. HANGER

People

  1. CONFERENCE or TALK
  2. STUDENT or TEACHER
  3. ``
  4. SNOWBOARD
  5. ``
  6. ``

Symbols

  1. CENTER
  2. ``

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

  1. BINOCALARS
  2. HDD (FA)
  3. SERVER (FA)
  4. DATABASE (FA)
  5. ?
  6. Is it a SPEAKER?
  7. 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.
  8. A hard one, but it could be likened to a VENETIAN_MASK. We could just simplify it to MASK
  9. MASKS
  10. BELL
  11. CONCIERGE_BELL (FA)
  12. I prefer PIPETTE, buy either's fine
  13. This is complicated by 17, but it could be SLEDGEHAMMER or MALLET
  14. HAMMER_WRENCH maybe?
  15. If we go with 15, it could just be HAMMER
  16. I prefer SOUP
  17. COCKTAIL
  18. HANGER is good, or COAT_HANGER but I don't know if that's just a British word

People

  1. Possibly PODIUM
  2. I like STUDENT
  3. SKIING or SKIING_NORDIC (FA)
  4. Or SNOWBOARDING - depends if we want nouns or verbs
  5. HIKING
  6. Might just have to be literal, WALKING_WITH_STICK or something

Symbols

  1. TARGET
  2. 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 as CLOUD, there's already a CLOUD at line 262
  • if we call VIDEOCAM as VIDEO, there's already a VIDEO 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 or DROP
  • SHIRT -> T_SHIRT
  • SCHOOL -> GRADUATION_CAP or MORTARBOARD

I replaced CLOUD with CLOUD_SERVICE, if it's okay.