neo09 / gwt-platform

Automatically exported from code.google.com/p/gwt-platform
0 stars 0 forks source link

Consider adding an on onFocus method in the presenter lifecycle #169

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Right now, onReveal() is called (bottom up) on presenters when they were 
invisible and they become visible. onReset() is called top-down every time the 
app navigates.

However, imagine the situation where a parent presenter has 2 slots each 
containing a presenter the app can navigate to. As the user navigates from 
#presenter1 to #presenter2 onReveal() is never called (the presenters are both 
visible) and onReset() is called, but on all the presenters. In this situation, 
it could be really useful to have an onFocus() method called bottom up, from 
the leaf presenter to the top presenter.

Use case:
An app using a 2 slot setup as above could use onFocus() to trigger an 
animation that moves presenter1 off-screen and presenter2 on-screen.

Questions to consider:
- If we want to focus the entire hierarchy do we need a focusInParent() like we 
have a revealInParent()? Is there a better way to kill both birds with one 
stone?
- Do we need/want to notify presenters when they lose focus?

Original issue reported on code.google.com by philippe.beaudoin on 17 Aug 2010 at 9:21

GoogleCodeExporter commented 9 years ago

Original comment by goudreau...@gmail.com on 25 Aug 2010 at 3:41

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 22 Sep 2010 at 1:35

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 20 May 2011 at 1:28

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 20 May 2011 at 2:10

GoogleCodeExporter commented 9 years ago
Bumping to 0.7, preparing release 0.6.

Original comment by philippe.beaudoin on 6 Jun 2011 at 8:17

GoogleCodeExporter commented 9 years ago
We should probably tackle Issue 333 before that one.

Original comment by philippe.beaudoin on 17 Jun 2011 at 9:14

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 1 Feb 2012 at 6:52