[SailfishDevel] Sailfish pageStack, web-like forward/back browsing, pushExtra()

Matthew Vogt matthew.vogt at jollamobile.com
Sun Mar 3 01:19:14 UTC 2013


Hi Filip, sorry for the top-posted reply, but my client is inadequate :)

1. pushExtra() is now an official part of the PageStack API, except that it has been renamed to pushAttached().

Until recently, pushExtra was provided to support a specific use-case, and we hadn't fully considered whether we should expand the API to create a general distinction between stack operations and the location of the visible page.  We have now decided not to do this, as it would add complexity to the general use cases for little practical benefit.  So pushAttached is the official solution, and has now been documented as such - please use it in your applications where appropriate.

The functionality pushAttached provides is to allow a page to be added to the stack, not as an independent element but as an additional page attached to the page which is currently the stack top.  The 'attached' page cannot be popped independently - it will only be removed when the primary page is removed.  While it is on the stack, the user can freely navigate between the primary and attached page(s), without causing anything to be removed from the stack.  It is therefore appropriate for displaying additional or contextual information, which is nice to have handy, but not cluttering the interface.

2. & 3.  Thanks for the report, I will ensure this is fixed.  As you have noticed, if anything goes wrong with the PageStack, then it is time to restart your application, as it does not recover well :)

Also, thanks for trying the SDK, and finding the spelling issues!

Thanks,
Matt

________________________________________
From: devel-bounces at lists.sailfishos.org [devel-bounces at lists.sailfishos.org] on behalf of Filip Kłębczyk [fklebczyk at gmail.com]
Sent: Sunday, March 03, 2013 12:08 AM
To: devel at lists.sailfishos.org
Subject: [SailfishDevel] Sailfish pageStack, web-like forward/back browsing,    pushExtra()

Hello all,

I've encountered few interesting things when playing with Sailfish SDK
which I would like to share with you and look for some answers here.

1. In the Sailfish Silica documentation page about QML PageStack there
is only one of the push methods described - push(). It's behavior is
simple it pushes page to stack and switches to it. In gallery of Silica
components you can see that there is also another way to push pages on
stack - that is through pushExtra(). What's interesting in the
pushExtra() method? It allows you to achieve a web browser-like
forward/back navigation through pages (as far as I remember thp was
interested in such functionality yesterday on #sailfishos). Anyway I
wonder why there is nothing about pushExtra() in the offical
documentation? Do we developers are not supposed to use it or is it
planned to be official for the future releases of Sailfish?

2. Regarding pushExtra() I noticed that when there is only initial page
(so one page on the stack) then even if you use pushExtra() you cannot
easily access to the next page (through swiping/flicking from left to
right) like it is possible, when there are already more pages on the
stack. Is there a solution for this problem?

3. I also found an interesting bug which you can easily achieve by using
push() then few times pushExtra() and then push(). It makes a a real
mess to the stack.

To let you understand all the points better here is a video that shows
above issues (yay! everyone loves videos!)
http://www.youtube.com/watch?v=UFfRy5zd2O8

Last but not least I would like to thank Jolla for releasing great alpha
SDK and our amazing community for what it is doing with it since it's
release.

Best regards,
Filip

PS. Some spelling errors I've found reading documentation:
https://sailfishos.org/sailfish-silica/qml-sailfishsilica-applicationwindow.html
Hierchical -> Hierarchical
provdes -> provides

PS2. It would be nice (at least for me) if the names of methods in
documentation would somehow differ from their description (bold or some
typewriter font?).
_______________________________________________
SailfishOS.org Devel mailing list


More information about the Devel mailing list