[sdk] The pagestacks should allow to pop more than one page at the time

Bug #1257307 reported by Sebastien Bacher
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu UX
Won't Fix
Medium
Olga Kemmet
ubuntu-ui-toolkit (Ubuntu)
Won't Fix
Medium
Tim Peeters

Bug Description

In some cases you have several level of pages stacked, it would be useful to let be able to pop more than once a the time

e.g you have a start page, push a list, push a confirmation/option dialog, then you want to go back to the start screen ... right now you have to pop one level and then have some logic to pop down another level when getting there.

It would be nice to be able to pop(n), maybe with 0=bottom of the stack

---------------UX comment-----------------

The solution as per comment #3 seems plausible. I do agree with comment #4 + #4. A sudden change in the general logic and page stack navigation is going to cause confusion to the user. The described use case (example?) seems to be an edge case.

summary: - The pagestacks should allow you pop more than one page at the time
+ The pagestacks should allow to pop more than one page at the time
Revision history for this message
Ken VanDine (ken-vandine) wrote : Re: The pagestacks should allow to pop more than one page at the time

It would be useful to have a convenience method, like popAll(id) where it pops all the pages down to the one the page that matches the parameter. Perhaps it could be the id, or objectName. And if there are no parameters passed, pop the way to 0.

Revision history for this message
Sebastien Bacher (seb128) wrote :
Revision history for this message
Zsombor Egri (zsombi) wrote :

I guess an optional count property to pop() would be good enough. Also would be good to have similar to push() when you need to push several pages due to some app state restoration or so. So push() could accept either a Page or an array of pages.

Revision history for this message
Tim Peeters (tpeeters) wrote :

Dialogs are not pushed on the stack, they are separate items that are shown in front of the current Page.

Pushing/popping multiple pages at once will be confusing for the user to navigate. Any design ideas on this?

Changed in ubuntu-ui-toolkit:
assignee: nobody → Tim Peeters (tpeeters)
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Giorgio Venturi (giorgio-venturi-deactivatedaccount) wrote :

There are some use cases where this might be required, but it is a rare instance and it should be avoided *as much as possible* to avoid breaking the default pagestack behaviour.

For example, there is a similiar behaviour within the out-of-the-box experience. I'm happy with the solution proposed by Zsombar

Changed in ubuntu-ux:
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Giorgio Venturi (giorgio-venturi)
importance: Low → Medium
Revision history for this message
Jouni Helminen (jounihelminen) wrote :

maybe I missed something, but agree with Tim - dialogs are not a part of the stack

In a page stack you always go to a new view, and then pressing the back arrow in that view takes you back one level

Seb could you show an example of a use case you want to go back several levels at once?

Changed in ubuntu-ux:
assignee: Giorgio Venturi (giorgio-venturi) → Vesa Rautiainen (vesar)
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Tim Peeters (tpeeters)
importance: Undecided → Medium
status: New → Incomplete
Zoltan Balogh (bzoltan)
no longer affects: ubuntu-ui-toolkit
John Lea (johnlea)
summary: - The pagestacks should allow to pop more than one page at the time
+ [sdk] The pagestacks should allow to pop more than one page at the time
Vesa Rautiainen (vesar)
Changed in ubuntu-ux:
assignee: Vesa Rautiainen (vesar) → Olga Kemmet (olga-kemmet)
Changed in ubuntu-ux:
status: Triaged → Fix Committed
description: updated
Revision history for this message
Tim Peeters (tpeeters) wrote :

PageStack will be deprecated in favor of AdaptivePageLayout. AdaptivePageLayout already has a removePages() function that takes a parameter which determines which pages are removed from the stack.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Incomplete → Won't Fix
Changed in ubuntu-ux:
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.