craftql icon indicating copy to clipboard operation
craftql copied to clipboard

Added schema for Dolphiq/craft3-iconpicker

Open u12206050 opened this issue 7 years ago • 6 comments

u12206050 avatar Nov 30 '18 10:11 u12206050

This is cool! The enum values look a little odd to me, though. I would recommend taking the GraphQL approach of upper casing them, like: as:HEX or a Twig approach of camel casing them, like: as:hex.

Other than that this is good to merge.

Thoughts?

markhuot avatar Nov 30 '18 14:11 markhuot

Good point, however I feel since I want to keep it inline with how the original plugin uses it in templating dropping the "icon" part. So instead of iconCharHex, just CharHex

u12206050 avatar Nov 30 '18 20:11 u12206050

I'll vote once again to lcfirst it, though. If the the icon field's Twig implementation dropped the icon prefix it would probably be written as, {{ entry.iconField.charHex }} since Craft prefers camel case for variable names.

markhuot avatar Nov 30 '18 20:11 markhuot

Agree, will change to lcfirst

u12206050 avatar Dec 01 '18 08:12 u12206050

Changes made. Also, changed default to Char since that is most likely what I believe users will want

u12206050 avatar Dec 01 '18 08:12 u12206050

Ready to merge?

u12206050 avatar Dec 06 '18 08:12 u12206050