[AdaptivePageLayout] Add function to return the top Page of a PageColumn

Bug #1534674 reported by Michael Hall
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Triaged
High
Unassigned

Bug Description

Add a function that will return a reference to the top Page object in a specific PageColumn.

Suggestion:

getPageInColumn(int columnIndex)

Use Case:

In uReadIt I have at most a 3-column layout. I would like a user action on an item in the first column to add a Page to the 3rd column. This requires knowing the current page in the 2nd column in order to call pageStack.addPageToNextColumn(secondPage, "SourcePage.qml").

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

The logic doesn't really allow you to push pages to a given column, only to the next column. It is against the UX guidelines.

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

Strap my last comment... Sorry, you need to know who's in the 2nd column in order to push into the third one... Right.

We can do this, however remember that when you are in 2-column mode, and you'd want to query the 3rd column for instance, you will still get the page assigned to the third column as your layout would be on 3column mode.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Triaged
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Wishlist → High
assignee: nobody → Tim Peeters (tpeeters)
Revision history for this message
Tim Peeters (tpeeters) wrote :

<renato> I have a AdaptivePageLayout on main window. And when the app starts, I push the contact list on it
<renato> if the device rotates and there is more space for a new page, I push a ContactDetail page if the column property changes on AdaptivePageLayout
<renato> the problem is
<renato> if the user has already navigate to another page, I do not want to push this page
<renato> right now there is not API to query AdaptivePageLayout how many page is visible, or the depth of it

Zsombor Egri (zsombi)
tags: added: convergence
Tim Peeters (tpeeters)
tags: added: adaptivepagelayout
Zsombor Egri (zsombi)
tags: added: apl
removed: adaptivepagelayout
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

This would also help to identify when a column is empty.
In messaging-app, for instance, we need to add an empty state page to the second column when switching from one to two columns layout in case there is no content there.

Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: Tim Peeters (tpeeters) → nobody
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.