Merge lp://qastaging/~tpeeters/ubuntu-ui-toolkit/pageHead-sectionsIndex into lp://qastaging/ubuntu-ui-toolkit/staging

Proposed by Tim Peeters
Status: Merged
Approved by: Cris Dywan
Approved revision: 1753
Merged at revision: 1751
Proposed branch: lp://qastaging/~tpeeters/ubuntu-ui-toolkit/pageHead-sectionsIndex
Merge into: lp://qastaging/ubuntu-ui-toolkit/staging
Diff against target: 287 lines (+163/-10)
7 files modified
src/Ubuntu/Components/1.3/Sections.qml (+38/-5)
src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml (+1/-1)
src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsForPageHead.qml (+46/-0)
src/Ubuntu/Components/Themes/Ambiance/Ambiance.pro (+1/-0)
src/Ubuntu/Components/Themes/Ambiance/qmldir (+1/-0)
tests/unit_x11/tst_components/tst_pagehead_sections.qml (+8/-2)
tests/unit_x11/tst_components/tst_sections.qml (+68/-2)
To merge this branch: bzr merge lp://qastaging/~tpeeters/ubuntu-ui-toolkit/pageHead-sectionsIndex
Reviewer Review Type Date Requested Status
Cris Dywan Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+279834@code.qastaging.launchpad.net

Commit message

To prevent an invalid sectionIndex, reset the value of sectionIndex to -1 when the model of Sections is changed.

To post a comment you must log in.
Revision history for this message
Tim Peeters (tpeeters) wrote :

Here https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1511839 it is requested NOT to change the sectionIndex when it was -1. This MR would break that, so we need a more complex solution.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1746. By Tim Peeters

documentation

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1747. By Tim Peeters

update unit test

1748. By Tim Peeters

clean

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
1749. By Tim Peeters

select index 0 by default, and trigger selected action.

1750. By Tim Peeters

deal with invalid model

1751. By Tim Peeters

don't regress bug 1511839

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

Automatically setting the index when the model changes regresses bug 1511839. To work around that, I use the older copy of Sections inside the AppHeader that is configured using Page.head.sections. That means to get the automatic updates to selectedIndex when changing the model, the app must update to use the new PageHeader instead of the old Page.head.sections. See also comment #4 on bug 1513933.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

> Automatically setting the index when the model changes regresses bug 1511839.
> To work around that, I use the older copy of Sections inside the AppHeader
> that is configured using Page.head.sections. That means to get the automatic
> updates to selectedIndex when changing the model, the app must update to use
> the new PageHeader instead of the old Page.head.sections. See also comment #4
> on bug 1513933.

Will setting -1 be explicitly supported with PageHeader then? I feel having different behavior between these might be both hard to support and use..

review: Needs Information
1752. By Tim Peeters

kick jenkins

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

To summarize: The desired behavior is implemented in Sections (and can be used in the new PageTreeNode), and if you use Page.head.sections, you still get the old behavior because changing that would break the fix for this bug: https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1511839

I discussed this with Zsombor and Christian and we agree that this is the best solution. Apps will have to update to use the new PageHeader if they require the new automatic behavior.

1753. By Tim Peeters

kick jenkins again

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches