empowerhack / DrawMyLife-Service

API and Admin system for the Draw My Life initiative - Volunteers: check README and GitHub Projects to get started.
https://github.com/empowerhack/DrawMyLife-Service/projects
MIT License
13 stars 0 forks source link

Remove emoji slider in favour of dropdown box #47

Closed steverabino closed 8 years ago

steverabino commented 8 years ago

Address #14 and #32

Spent a bit of time trying to hook up the emoji slider (which will have required JS tweaks to make it a 1-10 scale also), or create a new slider.

Took too long, and then we have the issue of accessibility on mobile devices also, so just replaced with a simple dropdown

@krissy, some Qs for you:

  1. The collection: as an array of arrays looks messy, but necessary to show the emojis, but not commit them as values. Any way you would tidy this up.
  2. Having emojis in the code - good?/bad?/whatever? 3. Finally, this removes the validation on all data points for the drawings. Ok for now, or you want me to leave this for a later PR, as will impact your tests/is not really the right PR for it?

image

steverabino commented 8 years ago

@krissy ready for review when you are

krissy commented 8 years ago

Changes overall look good! Couple of replies below:

Emojis: we're better off using a css kit like http://ellekasai.github.io/twemoji-awesome for compatibility

Array of arrays: you can add a helper method to handle this, similar to https://github.com/empowerhack/DrawMyLife-Service/pull/51/files#diff-f0794d516bf40a2c66eba074c7589a42R15 but also using a ruby range for 1..10-ness.

Also, I would separate the building of the array of arrays and use of emojis into two parts. Generate the array of arrays first, then apply the CSS styles to the first and last element after.

steverabino commented 8 years ago

☝️ Last commit creates a helper for the mood_rating selection dropdown, but makes no effort toward the goal of adding a css-based emoji solution for options within a dropdown, which I feel may be beyond me. I'll pick up again tomorrow.

krissy commented 8 years ago

:+1: 👯