[AdaptivePageLayout] Add signal for when a page is added

Bug #1534681 reported by Michael Hall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Add a signal for when a page is added to the AdaptivePageLayout that incudes the page and column index as parameters

Suggestion:

pageAdded(page, columnIndex)

Use Case:

In uReadIt I want to respond to an ArticlePage being added to the 2nd column by adding a CommentsPage to the 3rd column (only when in a 3+ column layout). But that must be done *after* the ArticlePage is added to the AdaptivePageLayout. Both the ArticlePage.onCompleted callback, or the incubator's onStatusChanged to Component.Ready are called *before* the page is added to the AdaptivePageLayout.

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

Right. We can add this, however will always report the column number even if the layout has 1 column.

Example:
apl.addPageToNextColumn(primaryPage, page) -> pageAdded(col2Page, 1)
apl.addPageToNextColumn(col2Page, page) ->pageAdded(col3Page, 2)

This will happen even if the layout is 1 or two columns! Perhaps an additional parameter containing the effective column can be added later if needed.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Triaged
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.