[dojox/app] SwapViews are jumping/ cannot align PageIndicator to the bottom

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[dojox/app] SwapViews are jumping/ cannot align PageIndicator to the bottom

PaulChristopher
I have some trouble with SwapViews used in a scenario similar to dojox/app/tests/multiSceneApp: When swipping, the next pane starts to jump down. It stays in this position as long as you swipe and jumps back into position if you release it. That's quite odd. Moreover, my PageIndicator, which should be aligned to the bottom, is missing completely.

Steps to reproduce the issue:

Just replace the content of dojox/app/tests/multiSceneApp/templates/simple/home.html with the following code and update the dependencies in config.json accordingly.

<div class="mblBackground">
	<div data-dojo-type="dojox/app/widgets/Container">
		<h1 data-dojo-type="dojox/mobile/Heading" data-dojo-props='fixed:"top"'>Scene 1</h1>
		
		<div data-dojo-type="dojox/mobile/PageIndicator"  data-dojo-props='fixed:"bottom"'>
   		</div>
		
		<div data-dojo-type="dojox/mobile/SwapView">
	    	<div data-dojo-type="dojox/mobile/RoundRect" data-dojo-props='shadow:true'>
	    		Pane 1
	    	</div>
	  	</div>
	
	  	<div data-dojo-type="dojox/mobile/SwapView">
	    	<div data-dojo-type="dojox/mobile/RoundRect" data-dojo-props='shadow:true'>
	    		Pane 2
	    	</div>
	  	</div>
	
	  	<div data-dojo-type="dojox/mobile/SwapView">
	    	<div data-dojo-type="dojox/mobile/RoundRect" data-dojo-props='shadow:true'>
	    		Pane 3
	    	</div>
	  	</div>
  	</div>
</div>

Run the test. The start screen is already the SwapView. On FF19 or Safari 5.1.17 with Dojo 1.9 trunk, it shows the above behaviour.

I had a look at dojox/app/tests/swapViewTestApp. But since this example uses a FixedSplitter, I could not figure out what's wrong with my tests/multiSceneApp integration.

Reply | Threaded
Open this post in threaded view
|

Re: [dojox/app] SwapViews are jumping/ cannot align PageIndicator to the bottom

edchat2
Hi, I spent some time trying to get things working in your test, without much luck.  I think one of your problems has to do with the fact that you are using a dojox/app/widgets/Container and the dojox/mobile/SwapView and dojox/mobile/PageIndicator together.  I know when I was working on the scrollable tests I had issues combining dojox/app/widgets/Container and dojox/mobile/ScrollableView.  As a side note, the multiSceneApp is my least favorite of the dojox/app tests, I find it difficult to work with, but I have left it as a test because it was the original test with dojox/app.  

I was able to get the dojox/mobile/PageIndicator to show up when I worked with the modelApp instead of multiSceneApp.  But I had to move the PageIndicator under the SwapViews, and I still see the slight offset of the views as they slide over each other.  The swapViewTestApp takes a different approach, it is trying to place a different "view" into each of the SwapViews, but it does not seem to have the problem with the offset when swapping views, although it does have a different initial layout problem.  We are planning to try to make it easier to use these type of mobile views in the next release.
Regards,
Ed


On Sat, Apr 6, 2013 at 2:44 PM, PaulChristopher <[hidden email]> wrote:
I have some trouble with SwapViews used in a scenario similar to
dojox/app/tests/multiSceneApp: When swipping, the next pane starts to jump
down. It stays in this position as long as you swipe and jumps back into
position if you release it. That's quite odd. Moreover, my PageIndicator,
which should be aligned to the bottom, is missing completely.

Steps to reproduce the issue:

Just replace the content of
dojox/app/tests/multiSceneApp/templates/simple/home.html with the following
code and update the dependencies in config.json accordingly.



Run the test. The start screen is already the SwapView. On FF19 or Safari
5.1.17 with Dojo 1.9 trunk, it shows the above behaviour.

I had a look at dojox/app/tests/swapViewTestApp. But since this example uses
a FixedSplitter, I could not figure out what's wrong with my
tests/multiSceneApp integration.





--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/dojox-app-SwapViews-are-jumping-cannot-align-PageIndicator-to-the-bottom-tp3995638.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: [dojox/app] SwapViews are jumping/ cannot align PageIndicator to the bottom

PaulChristopher
Thanks, Ed, for your reply. When I have some time, I will have a look at the cause - but maybe it's too difficult for me to spot exactly the root of the problem...

All in all, I'm glad that you did not remove the multiSceneApp testcase. It is exactly what I was looking for.

I guess most people who start to write an app
a) will create a "plain" app without any fixed layout stuff (like the simpleModelApp, i.e. just a fullscreen loading of new views)

b) use a fixed, permanent tabbar at the bottom so as to split the app into different "sections"/ parts (that's were the multiSceneApp comes in)

or

c) they will use a FixedSplitter to give the app a general structure (swapViewTestApp?) and load the views in the main content area depending on the actions clicked in the sidebar.


Some days ago, I was wondering what the relationship between dijit/StackContainer, dijit/TabContainer and dojox/app is? When programming a larger, wizard like app (based on dijit/StackContainer) and some kind of dashboard like app (which was based on dijit/TabContainer), I had the wish to move the code for each step in the wizard/ for each tab in the dashboard app into a seperate controller-file.

Could dojox/app help me with this in future? Or am I confusing some basic concepts, i.e. is dijit/StackContainer basically incompatible with dojox/app, and only dijit/BorderContainer is compatible?
Reply | Threaded
Open this post in threaded view
|

Re: [dojox/app] SwapViews are jumping/ cannot align PageIndicator to the bottom

edchat2
Regarding using dojox/app with a dijit/StackContainer, the BorderLayout controller actually uses a StackContainer inside of each region, so you could use the BorderLayout controller and set all of your views with "constraint" : "center" to use a StackContainer with dojox/app.  

But dojox/app is designed to support custom Layout controllers, (the BorderLayout controller was actually more of a sample custom layout controller) so you could also create your own StackLayout (based upon the BorderLayout) if you want to have a layout controller to work with StackContainer without using a BorderContainer.  

If you want to use dojox/app with dijit/TabContainer you would have to create a custom layout controller, but it should be fairly easy to do.  It may make sense to have the constraint be the tab's label, and then views with the same tab label would be transitions with in that tab.
Regards,
Ed


On Wed, Apr 10, 2013 at 4:31 PM, PaulChristopher <[hidden email]> wrote:
Thanks, Ed, for your reply. When I have some time, I will have a look at the
cause - but maybe it's too difficult for me to spot exactly the root of the
problem...

All in all, I'm glad that you did not remove the multiSceneApp testcase. It
is exactly what I was looking for.

I guess most people who start to write an app
a) will create a "plain" app without any fixed layout stuff (like the
simpleModelApp, i.e. just a fullscreen loading of new views)

b) use a fixed, permanent tabbar at the bottom so as to split the app into
different "sections"/ parts (that's were the multiSceneApp comes in)

or

c) they will use a FixedSplitter to give the app a general structure
(swapViewTestApp?) and load the views in the main content area depending on
the actions clicked in the sidebar.


Some days ago, I was wondering what the relationship between
dijit/StackContainer, dijit/TabContainer and dojox/app is? When programming
a larger, wizard like app (based on dijit/StackContainer) and some kind of
dashboard like app (which was based on dijit/TabContainer), I had the wish
to move the code for each step in the wizard/ for each tab in the dashboard
app into a seperate controller-file.

Could dojox/app help me with this in future? Or am I confusing some basic
concepts, i.e. is dijit/StackContainer basically incompatible with
dojox/app, and only dijit/BorderContainer is compatible?



--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/dojox-app-SwapViews-are-jumping-cannot-align-PageIndicator-to-the-bottom-tp3995638p3995748.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest