adobe-photoshop / spaces-design

Adobe Photoshop Design Space
http://adobe-photoshop.github.io/
Other
851 stars 74 forks source link

Show document panels earlier by promoting the fade-in animation. #3721

Closed shaoshing closed 8 years ago

shaoshing commented 8 years ago

This PR promote the panel's fade-in animation so that they are displayed faster during startup. Before, the animation starts when the FluxController emits ready event. In general, the event is emitted 150ms - 300ms later after the PanelSet completes rendering for the active document, as the event has to wait until all beforeStartpu callbacks are completed. So, instead of waiting for the ready event, the PanelSet now starts the animation when its active document's content are flushed to the DOM.

screen shot 2016-02-18 at 8 51 43 am 1) the panel content are flushed to the DOM. 2) Main component receives the ready event.

Improvements

panel fade-in starts Before After Diff
empty document 1690ms 1530ms -160ms
vermilion 2630ms 2410ms -220ms
iwehrman commented 8 years ago

Looks good so far. It's too bad that the simple structure of beforeStartup -> ready -> UI drawn didn't hold up. I guess as long as the view doesn't try do something as a result of having an initialized document, and assuming that some other store has its other dependent data ready. Because that store may not yet be fully initialized as a result of some other action running it's beforeStartup method a little later. Still, that's only a theoretical concern, and this seems like a fine way to get the UI drawn faster. :+1:

Back to @shaoshing to address a few minor suggestions.

shaoshing commented 8 years ago

@iwehrman I've addressed your comments. Also addressed a potential flashing issue in https://github.com/adobe-photoshop/spaces-design/pull/3721/files#diff-6ca92cfb1bbcf69e9825408c732136d7R177. Back to you for a second review.

iwehrman commented 8 years ago

Looks good, works good!