Top Banner
Tapping into Mobile UI with HTML5 Luke Melia + Yael Sahar
76

Tapping into Mobile UI with HTML5

Feb 11, 2017

Download

Technology

Yael Sahar
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Tapping into Mobile UI with HTML5

Tapping into Mobile UI with HTML5

Luke Melia + Yael Sahar

Page 2: Tapping into Mobile UI with HTML5

Mobile UX principles

Page 3: Tapping into Mobile UI with HTML5

Direct manipulation

Page 4: Tapping into Mobile UI with HTML5

Ergonomics: Operated with a single hand.

Finger tip size.

Page 5: Tapping into Mobile UI with HTML5

Immediate feedback

Page 6: Tapping into Mobile UI with HTML5

Be consistent with platform conventions

Page 7: Tapping into Mobile UI with HTML5

“I should always know where I am”

Page 8: Tapping into Mobile UI with HTML5

“Show me what I want to see when I need it”

Page 9: Tapping into Mobile UI with HTML5

“Don’t make me type”

Page 10: Tapping into Mobile UI with HTML5

The HTML5tradeoff

Page 11: Tapping into Mobile UI with HTML5

You get a single code base in exchange for implementing

all UI elements yourself

Page 12: Tapping into Mobile UI with HTML5

Mobile UIpatterns

Page 13: Tapping into Mobile UI with HTML5

Buttons [ used for actions ]

Page 14: Tapping into Mobile UI with HTML5

Touch target size: 44px on iOS, 48px on Android

----------------------------------UI principles:• Ergonomics

Designer says:

iOS

Android

44px 30px

Page 15: Tapping into Mobile UI with HTML5

Position on screen

------------------------------------UI principles:• Be consistent with

platform conventions • Immediate feedback

Designer says:

iOS Android

Page 16: Tapping into Mobile UI with HTML5

Visual appearance (frames on iOS vs. no frame on Android, use system fonts)

------------------------------------UI principles:• Be consistent with

platform conventions • Ergonomics• Immediate feedback

Designer says:

iOS Android

Page 17: Tapping into Mobile UI with HTML5

Back / Cancel actions on iOS use a button vs. the hardware Back button on Android.

------------------------------------UI principles:• Be consistent with

platform conventions • I should always know

where I am• Immediate feedback

Designer says:

iOS Android

Page 18: Tapping into Mobile UI with HTML5

Challenge: have a single button image background across all app themes

Button background image:• Button height: 60px (30px actual) -> image is double size

for high retina display • Shape: rounded rectangle, 12px round corner (6px actual)• Drop shadow: white @45% opacity; Angle: 90; Blend

mode: normal; Distance: 2; Spread: 0; Size: 0• Inner shadow: black @65% opacity; Angle: 90; Blend

mode: Normal; Distance: 3; Choke: 0; Size: 1• Stroke: 1 px, black @65% opacity• Gradient overlay: 30% opacity white to full transparency;

linear gradient; Angle: 90Button font:• Helvetica bold white, 11pt.• Drop shadow: black @65% opacity; angle -90; distance 1;

spread 0; size 1

Designer tip: how to create an iOS looking button

Page 19: Tapping into Mobile UI with HTML5

Developer says_

The #1 reason that many mobile web apps feel slow:

Page 20: Tapping into Mobile UI with HTML5

Developer says_

Instead,respond immediately!

Page 21: Tapping into Mobile UI with HTML5

Developer says_

“What about developing on my laptop???”

Implement a mouse-friendly path...

...or emulate!

Page 22: Tapping into Mobile UI with HTML5

Developer says_

Touch targets

Handle them case-by-casewith CSS

Page 23: Tapping into Mobile UI with HTML5

Developer says_

Cross-platform visual conventions

Help yourself with some Javascript, and handle visual differences in CSS.

Page 24: Tapping into Mobile UI with HTML5

Direct manipulation of content is usually betterClear No Buttons. All actions are done with gestures

CameraZoom In / Out with Pinch & spread gestures

FlipboardFlip Pages with a swipe gesture

Alternatives

Page 25: Tapping into Mobile UI with HTML5

Tab bars [ used to navigate through the sections of your app]

Page 26: Tapping into Mobile UI with HTML5

Position on screen

---------------------------UI principles:• Be consistent

with platform conventions

• I should always know where I am

• Show me what I need when I need it

Designer says:

iOS Android

Page 27: Tapping into Mobile UI with HTML5

Bar height. 50px on iOS, 48px on Android

------------------------------UI principles:• Ergonomics

Designer says:

50px

48px

iOS Android

Page 28: Tapping into Mobile UI with HTML5

#of tabs in view: 5on iOS, 3 words on Android

----------------------------------UI principles:• I should always know

where I am• Show me what I

need when I need it

Designer says:

iOS Android

Page 29: Tapping into Mobile UI with HTML5

Do not use the tab bar for actions

Designer says:

Page 30: Tapping into Mobile UI with HTML5

Developer says_

Position and size your tab bar for each platform using CSS

Page 31: Tapping into Mobile UI with HTML5

Developer says_

@font-faceA custom web font for your icons

can be good, bro.

Page 32: Tapping into Mobile UI with HTML5

Developer says_

Tab bar icons works like “push” buttons.

As soon as you tap them, they highlight and activate.

Easy, right?

Page 33: Tapping into Mobile UI with HTML5

Developer says_

Give the browser time to render the highlight.

Page 34: Tapping into Mobile UI with HTML5

Cross platform solution with CSSTwitterApp UI implementation on iOS and Android

Identifying common elements and positioning them in consistency with platform.

Page 35: Tapping into Mobile UI with HTML5

YappUI implementation on iOS and Android.

Identifying common elements and positioning them in consistency with platform.

Cross platform solution with CSS

Page 36: Tapping into Mobile UI with HTML5

Main Menu page:Creates more drill downsI always need to go back in order to navigate

Facebook Side menu. Still requires an extra tap to go back to menu. I know where I was.

Pinterest:Tab bar disappears when scrolling down and appears when scrolling up

Alternatives

Page 37: Tapping into Mobile UI with HTML5

Drilling down [ used to navigate to sub sections ]

Page 38: Tapping into Mobile UI with HTML5

[ Drill downs on iOS and Android ]

Page 39: Tapping into Mobile UI with HTML5

Show user’s path and current location (title bar and Back button)

Designer says:

----------------------------UI principles:• I should always

know where I am• Immediate

feedback

iOS Android

Page 40: Tapping into Mobile UI with HTML5

#of drill downs (more than 2-3 feels like too much drilling especially if you don’t use a tab bar to navigate)

Designer says:

---------------------------UI principles:• I should always

know where I am

• Show me what I need when I need it

Page 41: Tapping into Mobile UI with HTML5

• Animated feedback

• Information hierarchy

Designer says:

--------------------------------UI principles:• Immediate feedback

Page 42: Tapping into Mobile UI with HTML5

Developer says_

Title bar and body animate differently

350mseaseInOutQuint

Page 43: Tapping into Mobile UI with HTML5

Developer says_

Animation tips

1) Avoid DOM changes or other callbacks firing during animation

2) Use hardware-accelerated animations

Page 44: Tapping into Mobile UI with HTML5

Developer says_

Show compositing borders

defaults write com.apple.Safari IncludeInternalDebugMenu 1

Page 45: Tapping into Mobile UI with HTML5

Alternatives

FacebookModal Slide up toDrill intocontent

Page 46: Tapping into Mobile UI with HTML5

Segmented controls / tabs & spinners

[ used to show different vies of the same content]

Page 47: Tapping into Mobile UI with HTML5

Use segmented controls to avoid a level of drill downs

-------------------------------UI principles:• I should always know

where I am• Immediate feedback

Designer says:

Page 48: Tapping into Mobile UI with HTML5

[ Tab controls or drop down menus on Android ]

Spinner

Page 49: Tapping into Mobile UI with HTML5

iOS: use on app’s main sections where back button is not needed

Highlight current segment (no title bar)

Designer says:

-------------------------------UI principles:• I should always know

where I am• Immediate feedback

Page 50: Tapping into Mobile UI with HTML5

Developer says_

Tab bar tips apply.

Use a scrolling library with snap-to for horizontal scrolling on Android.

Page 51: Tapping into Mobile UI with HTML5

InterludeA word about

Skeumorphic UI

Page 52: Tapping into Mobile UI with HTML5
Page 53: Tapping into Mobile UI with HTML5
Page 54: Tapping into Mobile UI with HTML5
Page 55: Tapping into Mobile UI with HTML5
Page 56: Tapping into Mobile UI with HTML5
Page 57: Tapping into Mobile UI with HTML5
Page 58: Tapping into Mobile UI with HTML5
Page 59: Tapping into Mobile UI with HTML5
Page 60: Tapping into Mobile UI with HTML5

Scrollbars

Page 61: Tapping into Mobile UI with HTML5

Scrollbars appear only when you need them

-----------------------------------UI principles:• Show me what I want

to see when I need it

Designer says:

Page 62: Tapping into Mobile UI with HTML5

Make sure scrollbar is visible on any background. (ios uses a semi transparent

black scrollbar with a white outline)

-----------------------------------UI principles:• Immediate feedback

Designer says:

Page 63: Tapping into Mobile UI with HTML5

Overshoot animation (ios) vs. overscroll color (android). Overshoot on ios created a new UI layer for actions and messages that

occur below the Zero line

-----------------------------------UI principles:• Show me what I want

to see when I need it• Discoverability

Designer says:

Page 64: Tapping into Mobile UI with HTML5

Overshoot: below the ZERO line

Pull to refreshGesture action discovered at overshoot

YappPromo message

Page 65: Tapping into Mobile UI with HTML5

Developer says_

Duuuude, really?

Unfortunately, yes.

No usable native scrolling yet.

Page 66: Tapping into Mobile UI with HTML5

Developer says_

Use a library.

iScroll, Zynga scroller

Page 67: Tapping into Mobile UI with HTML5

Text Fields

Page 68: Tapping into Mobile UI with HTML5

• Auto-populate text field and auto-complete

• Use text field Clear button

Designer says:

-------------------------------UI principles:• Don’t make me type

Page 69: Tapping into Mobile UI with HTML5

Developer says_

No browser events for keyboard hiding/showing.

Page 70: Tapping into Mobile UI with HTML5

Developer says_

Doesn’t work

Page 71: Tapping into Mobile UI with HTML5

Developer says_

Virtual keyboard

Resizes viewport

Overlays window

Page 72: Tapping into Mobile UI with HTML5

Developer says_

Clear field

Position the icon with CSS, clear the text with Javascript

Page 73: Tapping into Mobile UI with HTML5

Developer says_

When you need to implement your own autocomplete (iOS only):

Page 74: Tapping into Mobile UI with HTML5

Q & A

Page 75: Tapping into Mobile UI with HTML5

@lukemelia@yaelsahar

@yapp

http://yapp.uswe are hiring!

Page 76: Tapping into Mobile UI with HTML5

ResourcesApple Human Interface Guidelines:https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html

Android Interface Guidelines:http://developer.android.com/design/index.html

Luke WroblewskiBlog: http://www.lukew.com/ffBook: Mobile First: http://www.lukew.com/resources/mobile_first.aspTouch Gesture Reference Guide: http://www.lukew.com/ff/entry.asp?1071

Quirksmodehttp://caniuse.com/

Coachmarks:http://pttrns.com/coachmarks