Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.
For the best experience please use the latest Chrome, Safari or Firefox browser.
Flickr Uploadr: The Grid
(Or, 10,000 Photos In Your Browser)
isflashdeadyet.com/talks/html5/
Presented 10/25 in San Francisco, CA. See video, ~58:00.
Also see Meetup page.Scott Schiller / @schill
See the UI in action: Uploadr Beta (2012) demo screencast
Powerful Batch Editing(And a shiny UI)
Divide and conquer.
EditrData:filesAdded
, EditrGrid:selection
, PhotoItem:update
Preventing :event
overload
Fire once, with lots of data. EditrData:filesAdded([file1, file2, file3]);
(Then do all the heavy lifting at once).
CRUD Analogy
EditrData
EditrData
as user adds or edits metadataBroadcast events are good.
"Good news, everyone!"
Only events + data thus far.
This stuff is pretty fast.
No DOM + UI yet.
The DOM is Slow.
window.scrollTop
and other high-level properties, too)documentFragment
, innerHTML
etc.)Throttle + queue / batch operations.
window.scroll()
is frequent, window.resize()
is expensive."Virtual" page full of photos
<div>
has height assigned based on number of rows needed.Staying fast
Updates: Online/Offline Nodes
Updates: Online/Offline Nodes
"Select All -> edit titles" case:
Data model is immediately updated.
On-screen nodes also immediate. Off-screen nodes refreshed when scrolled into view.
inline-block
CSS for grid items
One top-level className
change to toggle "info" overlay mode across grid
Mixable className
values dictate UI of each grid item
photo-item content-type-photo safety-level-safe license-nc has_thumbnail has_uploaded has_fullsize_thumbnail has_error is_oversize selected
:hover
can be expensive.
Consider disabling hover, transitions and related effects during scrolling or expensive cases (eg., mouse selection events).
There Shall Be Donuts.
Progress ring generated via <canvas>
, applied to photo items and dynamic favicon (where supported)
Uploadr UI In Action
http://code.flickr.com/author/scottschiller/
Use a spacebar or arrow keys to navigate