professor / whiteboard

Carnegie Mellon University - Silicon Valley Campus - Learn By Doing Curriculum Tool
37 stars 61 forks source link

Mobile support with failback spike #188

Open abhitrivedi opened 11 years ago

abhitrivedi commented 11 years ago

MfSE Team Defect Story Definition: As a user, when I access the site on a mobile device, if I go to the home page, I see just the links on the left navigation. If I go to people search, then I just see the main content window. This should work on iphone and android.

Implementation: Reference: http://railscasts.com/episodes/199-mobile-devices

  1. Created a new Mime Type (:format) for mobile devices
  2. Added a helper method to identify user_agent
  3. Added mobile layout and *.mobile.erb files for mobile format
professor commented 11 years ago

Thank you for this pull request. Out of curiosity, did you explore the media="mobile.css" solution to render a different page for mobile? I'll go watch the railscast next, as he probably talks about why your solution is better.

abhitrivedi commented 11 years ago

@professor: According to our research it seems that creating a mime type for mobile provides a more universal platform for extending mobile support to other modules by simply creating a new *.mobile.erb version of the view and changing the content. We felt that this approach is less intrusive as well.

I would love to hear your comments about it.