Closed
Bug 770634
Opened 13 years ago
Closed 13 years ago
Build-in transitions for search results and social
Categories
(Pancake Graveyard :: Front-end, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
M3
People
(Reporter: gbrander, Assigned: sfoster)
References
Details
PostListView (Search and social lists) need some sort of build-in transition (a fade perhaps)?
| Reporter | ||
Updated•13 years ago
|
Status: NEW → ASSIGNED
| Reporter | ||
Comment 1•13 years ago
|
||
Track changes in this imaginatively named branch: https://bitbucket.org/mozillapancake/pancake/changesets/tip/branch(%22css-transitions%22).
| Reporter | ||
Comment 2•13 years ago
|
||
Also want build-in for headingListView.
| Reporter | ||
Comment 3•13 years ago
|
||
I think we want this animation to be:
* Spinner at smallish size
* Grow to eventual size
* Spinner disappears
* Fade in
| Reporter | ||
Comment 4•13 years ago
|
||
Currently, ListView renders data as it comes in. If there are no items, it hides itself. In order to add loading states, we must make our ListView more nuanced.
Actions:
* An initial `reset` that renders the main DOM framework of the ListView, along with any items for the collection that are present. Called in the `initialize` method.
* A `resetViews` call that is bound to collection `reset` events. It empties just the list element and re-renders all items.
* `fallback`, which renders a different DOM element or does some hide/show magic when the collection is empty.
* `render` for all other view updates.
* `addView`
* `removeView`
* `moveView`
This looks a bit like a state machine, but let's avoid that if possible.
Chaplain does something similar. They also manage sub-views via a registry, in much the same way we do.
<https://github.com/chaplinjs/chaplin/blob/master/src/chaplin/views/collection_view.coffee>
| Reporter | ||
Comment 5•13 years ago
|
||
I've made significant progress on transition states as of https://bitbucket.org/mozillapancake/pancake/changeset/e7f944d22af1. Still on the agenda: a decent spinner image and better transition states for search results.
| Reporter | ||
Comment 6•13 years ago
|
||
Spinner image added in https://bitbucket.org/mozillapancake/pancake/changeset/eea199048298.
| Reporter | ||
Comment 7•13 years ago
|
||
Branch css-transitions closed https://bitbucket.org/mozillapancake/pancake/changeset/92f3fb39e237. Work continues in https://bitbucket.org/mozillapancake/pancake/changesets/tip/branch(%22accordion-drawer-design%22). Depends on #769498 because of shared code changes.
Depends on: 769498
| Reporter | ||
Comment 8•13 years ago
|
||
* URLs view fixed
* Images view fixed
* Suggestions view fixed
* Twitter view fixed
The height animation can still sometimes be tricked with fast typing.
| Reporter | ||
Comment 9•13 years ago
|
||
Fixed by by https://bitbucket.org/mozillapancake/pancake/changeset/117def9dd572, which resolves the final remaining issue with fast typing.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 10•13 years ago
|
||
The height animation + spinner have a significant negative effect on overall performance.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Reporter | ||
Comment 11•13 years ago
|
||
The changes for this bug should be de-tangled from #769498 changes so we can accurately perf test them, apart and so the drawer can be landed more quickly.
| Reporter | ||
Comment 12•13 years ago
|
||
https://bitbucket.org/mozillapancake/pancake/changeset/57978730422d separates build-in work from drawer perf work.
Work for this bug continues in https://bitbucket.org/mozillapancake/pancake/changesets/tip/branch(%22stack-and-search-build-in%22).
No longer depends on: 769498
| Reporter | ||
Comment 13•13 years ago
|
||
Per meeting, we want to take a simple approach to this so we can ship. The main issue is the initial render. Let's make sure the layout happens invisibly so we don't get a jittery feeling when the item is rendered. Beyond that, maybe a spinner for the initial render?
Let's try to avoid making the view a full-blown state machine for now. Emphasis is on wrapping this up with a good enough solution so we can ship.
Assignee: gbrander → sfoster
| Assignee | ||
Comment 14•13 years ago
|
||
Have picked at this a bit. I tried various way of laying out the contents off-screen or out of document flow and fading back in to reveal. None really helped much to be honest.
I have an idea to include a placeholder element in the listview(s) that we can toggle while loading (and show initially). But shoe-horning it in there without breaking stuff is a trick.
| Assignee | ||
Comment 15•13 years ago
|
||
I've added an optional bindPlaceholder call in ListView's bindEvents method. If there's an attachPoint.placeholder and a truthy options.showLoadingPlaceholder property it will bind to the collection and do the loading placeholder and animate in thing.
This works great for the stackheadinglist instance on the home screen. It should also work for the social postlistview, but doesn't. I've spent a couple hours troubleshooting and am ready to pronounce it "good enough".
| Assignee | ||
Comment 16•13 years ago
|
||
Now using an animated spinner.gif. Looks fine and performs much better than the css-animated class. Also we're back to an external resource for the image, so i preload it using an AMD plugin to mitigate the loading-while-loading issue. Maybe the animated gif can be converted to a data uri too, meantime this works.
See https://bitbucket.org/mozillapancake/pancake/changeset/268d0bbf38dc1726d81b8ebfa3d8c7d243b267fb
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•