Merge lp:~renatofilho/address-book-app/update-bottom-edge into lp:address-book-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Bill Filler
Approved revision: 627
Merged at revision: 622
Proposed branch: lp:~renatofilho/address-book-app/update-bottom-edge
Merge into: lp:address-book-app
Diff against target: 804 lines (+200/-171)
13 files modified
src/imports/ABContactEditorPage.qml (+1/-1)
src/imports/ABContactListPage.qml (+71/-84)
src/imports/ABContactViewPage.qml (+5/-5)
src/imports/ABMultiColumnEmptyState.qml (+14/-6)
src/imports/ABNewContactBottomEdge.qml (+37/-32)
src/imports/MainWindow.qml (+15/-8)
src/imports/Ubuntu/AddressBook/Base/ContactDetailBase.qml (+0/-1)
src/imports/Ubuntu/AddressBook/Base/ContactDetailItem.qml (+5/-17)
src/imports/Ubuntu/AddressBook/ContactEditor/ContactDetailNameEditor.qml (+7/-3)
src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml (+22/-14)
src/imports/Ubuntu/Contacts/ContactListView.qml (+4/-0)
src/imports/Ubuntu/Contacts/ContactSimpleListView.qml (+18/-0)
tests/qml/tst_ContactEditor.qml (+1/-0)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/update-bottom-edge
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+303174@code.launchpad.net

Commit message

Keep bottom edge page live while changing app: munticolumn <-> single column

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

FAILED: Continuous integration, rev:621
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/13/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/1229/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1229
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/1103
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/1103
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/1103
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1090
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1090/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1090
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1090/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1090
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1090/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1090
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1090/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1090
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1090/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1090/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1090
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1090/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1090
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1090/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1090
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1090/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/13/rebuild

review: Needs Fixing (continuous-integration)
622. By Renato Araujo Oliveira Filho

Fix input hint for name field.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:622
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/14/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1233
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/262
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1233
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/1105
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/1105
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/1105
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1092
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1092/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1092
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1092/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1092
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1092/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1092
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1092/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1092
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1092/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1092
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1092/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1092
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1092/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1092
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1092/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1092
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1092/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/14/rebuild

review: Approve (continuous-integration)
623. By Renato Araujo Oliveira Filho

Make sure that the recent created contact is visible after close edit page.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:623
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/15/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1234
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/263
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1234
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/1106
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/1106
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/1106
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1093
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1093/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1093
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1093/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1093
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1093/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1093
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1093/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1093
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1093/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1093
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1093/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1093
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1093/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1093
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1093/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1093
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1093/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/15/rebuild

review: Approve (continuous-integration)
624. By Renato Araujo Oliveira Filho

Make sure that the Firs name get focus.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

FAILED: Continuous integration, rev:624
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/16/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/1237/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1237
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/1109
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/1109
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/1109
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1096/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1096/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1096/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1096/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1096/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1096/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1096/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1096/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1096/console

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/16/rebuild

review: Needs Fixing (continuous-integration)
625. By Renato Araujo Oliveira Filho

Fixed contact editor enable state.

626. By Renato Araujo Oliveira Filho

Make sure that the edit page is enabled during the unit test.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:625
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/17/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1239
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/266
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1239
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/1111
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/1111
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/1111
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1098/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1098/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1098/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1098/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1098/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1098/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1098/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1098/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1098/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/17/rebuild

review: Approve (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:626
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/18/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1243
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/268
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1243
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/1115
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/1115
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/1115
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1102
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1102/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1102
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1102/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1102
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1102/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1102
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1102/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1102
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1102/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1102
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1102/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1102
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1102/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1102
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1102/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1102
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1102/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/18/rebuild

review: Approve (continuous-integration)
627. By Renato Araujo Oliveira Filho

Make sure that bootom edge works if settings page is opened.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:627
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/19/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1256
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/273
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1256
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/1126
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/1126
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/1126
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1113
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1113/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1113
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1113/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1113
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1113/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1113
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1113/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1113
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1113/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1113
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1113/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1113
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1113/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1113
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1113/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1113
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1113/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-address-book-app-ci/19/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/ABContactEditorPage.qml'
2--- src/imports/ABContactEditorPage.qml 2016-01-04 20:03:58 +0000
3+++ src/imports/ABContactEditorPage.qml 2016-08-19 12:45:42 +0000
4@@ -63,7 +63,7 @@
5
6 onContactSaved: {
7 if (pageStack.contactListPage) {
8- pageStack.contactListPage.moveListToContact(contact)
9+ pageStack.contactListPage.onNewContactSaved(contact)
10 pageStack.contactListPage.forceActiveFocus()
11 }
12 }
13
14=== modified file 'src/imports/ABContactListPage.qml'
15--- src/imports/ABContactListPage.qml 2016-07-13 18:40:39 +0000
16+++ src/imports/ABContactListPage.qml 2016-08-19 12:45:42 +0000
17@@ -37,12 +37,12 @@
18 property bool pickMode: false
19 property alias contentHubTransfer: contactExporter.activeTransfer
20 property bool pickMultipleContacts: false
21- property QtObject contactIndex: null
22 property alias contactManager: contactList.manager
23
24 property var _busyDialog: null
25 property bool _importingTestData: false
26 property bool _creatingContact: false
27+ property string _newContactId: ""
28
29 readonly property string currentViewContactId: viewPage && viewPage.contact ? viewPage.contact.contactId : ""
30 readonly property bool isEmpty: (contactList.count === 0)
31@@ -110,7 +110,7 @@
32
33 function showContact(contact)
34 {
35- var currentContact = contactList.listModel.contacts[contactList.currentIndex]
36+ var currentContact = contactList.currentIndex != -1 ? contactList.listModel.contacts[contactList.currentIndex] : null
37 if (currentContact && (mainPage.currentViewContactId === currentContact.contactId)) {
38 // contact view already opened with this contact
39 return
40@@ -130,39 +130,45 @@
41 if (pageStack.columns === 1)
42 return
43
44- if (!emptyPage) {
45+ var newEmptyPage = null
46+ if (!mainPage.emptyPage) {
47 contactList.currentIndex = -1
48 pageStack.removePages(mainPage)
49
50- if ((pageStack.columns > 1) && !hasChildPage()) {
51- emptyPage = pageStack.addFileToNextColumnSync(pageStack.primaryPage,
52- Qt.resolvedUrl("ABMultiColumnEmptyState.qml"),
53- { 'headerTitle': "",
54- 'pageStack': mainPage.pageStack,
55- 'model': mainPage.contactModel })
56- emptyPage.Component.onDestruction.connect(function() {
57+ if (pageStack.columns) {
58+ newEmptyPage = pageStack.addFileToNextColumnSync(pageStack.primaryPage,
59+ Qt.resolvedUrl("ABMultiColumnEmptyState.qml"),
60+ { 'headerTitle': "",
61+ 'pageStack': mainPage.pageStack,
62+ 'model': mainPage.contactModel })
63+ newEmptyPage.Component.onDestruction.connect(function() {
64 mainPage.emptyPage = null
65 })
66
67 }
68+ } else {
69+ newEmptyPage = mainPage.emptyPage
70 }
71+
72 if (openBottomEdge) {
73- mainPage.emptyPage.commitBottomEdge()
74+ newEmptyPage.commitBottomEdge()
75 }
76
77+ mainPage.emptyPage = newEmptyPage
78+
79 }
80
81 function showSettingsPage()
82 {
83- pageStack.removePages(mainPage)
84-
85-
86 if (settingsPage) {
87 settingsPage.Component.onDestruction.disconnect(clearSettingsPage)
88 }
89
90 pageStack.removePages(mainPage)
91 viewPage = null
92+ settingsPage = null
93+ emptyPage = null
94+
95
96 settingsPage = pageStack.addFileToNextColumnSync(mainPage,
97 Qt.resolvedUrl("./Settings/SettingsPage.qml"),
98@@ -203,27 +209,8 @@
99 contactList.startSelection()
100 }
101
102- function moveListToContact(contact)
103- {
104- if ((state !== "searching") &&
105- (state !== "vcardImported")) {
106- mainPage.state = "default"
107- }
108-
109- contactIndex = contact
110- // this means a new contact was created
111- if (mainPage.allowToQuit) {
112- application.goBackToSourceApp()
113- }
114- }
115-
116-
117 function onNewContactSaved(contact) {
118- _creatingContact = true
119- moveListToContact(contact)
120- if (pageStack.columns > 1) {
121- showContact(contact);
122- }
123+ _newContactId = contact.contactId
124 }
125
126 // Delay contact fetch for some msecs (check 'fetchNewContactTimer')
127@@ -234,7 +221,7 @@
128
129 function fetchContact()
130 {
131- if (pageStack.columns > 1 && !contactList.showNewContact) {
132+ if (pageStack.columns > 1 && !contactList.showNewContact && !pageStack.bottomEdgeOpened) {
133 var currentContact = null
134 if (contactList.currentIndex >= 0)
135 currentContact = contactList.listModel.contacts[contactList.currentIndex]
136@@ -306,8 +293,7 @@
137
138 focus: true
139 showImportOptions: !mainPage.pickMode &&
140- pageStack.bottomEdge &&
141- (pageStack.bottomEdge.status !== BottomEdge.Committed)
142+ !pageStack.bottomEdgeOpened
143 anchors {
144 top: parent.top
145 topMargin: pageHeader.height
146@@ -319,8 +305,8 @@
147 filterTerm: searchField.text
148 multiSelectionEnabled: true
149 multipleSelection: (mainPage.pickMode && mainPage.pickMultipleContacts) || !mainPage.pickMode
150- showNewContact: (pageStack.columns > 1) && pageStack.bottomEdge && (pageStack.bottomEdge.status === BottomEdge.Committed)
151- highlightSelected: !showNewContact && pageStack.hasKeyboard && !mainPage._creatingContact
152+ showNewContact: (pageStack.columns > 1) && pageStack.bottomEdgeOpened
153+ highlightSelected: !showNewContact && pageStack.hasKeyboard && (mainPage._newContactId === "")
154 onAddContactClicked: mainPage.createContactWithPhoneNumber(label)
155 onContactClicked: mainPage.showContact(contact)
156 onIsInSelectionModeChanged: mainPage.state = isInSelectionMode ? "selection" : "default"
157@@ -345,8 +331,7 @@
158 }
159
160 onCurrentIndexChanged: {
161- if (!mainPage.contactIndex)
162- mainPage.delayFetchContact()
163+ mainPage.delayFetchContact()
164 }
165
166 onOnlineAccountFinished: {
167@@ -367,7 +352,7 @@
168 //because of that we need this
169 Keys.onRightPressed: {
170 // only move focus away when in edit mode
171- if (pageStack.bottomEdge.status === BottomEdge.Committed) {
172+ if (pageStack.bottomEdgeOpened) {
173 var next = pageStack._nextItemInFocusChain(view, true)
174 if (next === searchField) {
175 pageStack._nextItemInFocusChain(next, true)
176@@ -444,24 +429,25 @@
177 viewPage.cancelEdit()
178 }
179
180+
181+ if (pageStack.bottomEdgeOpened) {
182+ pageStack.closeBottomEdge()
183+ } else {
184+ showEmptyPage(false)
185+ }
186 mainPage.state = "searching"
187 contactList.showAllContacts()
188- if (pageStack.bottomEdge) {
189- pageStack.bottomEdge.collapse()
190- } else {
191- showEmptyPage(false)
192- }
193 searchField.forceActiveFocus()
194 }
195 },
196 Action {
197 iconName: "contact-new"
198- enabled: visible && (!pageStack.bottomEdge || (pageStack.bottomEdge.enabled && (pageStack.bottomEdge.status === BottomEdge.Hidden)))
199+ enabled: visible && !pageStack.bottomEdgeOpened
200 visible: (pageStack.columns > 1)
201 shortcut: "Ctrl+N"
202 onTriggered: {
203- if (pageStack.bottomEdge) {
204- pageStack.bottomEdge.commit()
205+ if (!pageStack.bottomEdgeOpened && (viewPage || emptyPage)) {
206+ pageStack._bottomEdge.commit()
207 } else {
208 showEmptyPage(true)
209 }
210@@ -689,7 +675,7 @@
211 KeyboardRectangle {
212 id: keyboard
213 active: mainPage.active &&
214- (pageStack.bottomEdge && (pageStack.bottomEdge.status === BottomEdge.Hidden))
215+ !pageStack.bottomEdgeOpened
216 }
217
218 ABEmptyState {
219@@ -809,7 +795,7 @@
220 id: bottomEdgeLoader
221
222 enabled: false
223- active: (pageStack.columns === 1) && bottomEdgeLoader.enabled
224+ active: true
225 asynchronous: true
226 sourceComponent: ABNewContactBottomEdge {
227 id: bottomEdge
228@@ -818,40 +804,40 @@
229 hint.flickable: contactList.view
230 pageStack: mainPage.pageStack
231 enabled: mainPage.active
232+ hintVisible: (pageStack.columns === 1) && bottomEdgeLoader.enabled
233+ visible: hintVisible
234 }
235 }
236
237+ Binding {
238+ target: pageStack
239+ property: '_bottomEdge'
240+ value: bottomEdgeLoader.item
241+ when: (bottomEdgeLoader.status === Loader.Ready) &&
242+ (pageStack.columns === 1) &&
243+ bottomEdgeLoader.enabled
244+ }
245+
246 Action {
247 iconName: "contact-new"
248- enabled: mainPage.active &&
249- (bottomEdgeLoader.status === Loader.Ready) &&
250- (bottomEdgeLoader.item.status === BottomEdge.Hidden)
251+ enabled: mainPage.active && !mainPage.bottomEdgeOpened
252 shortcut: "Ctrl+N"
253 onTriggered: {
254 bottomEdgeLoader.item.commit()
255 }
256 }
257
258-
259- Binding {
260- target: pageStack
261- property: 'bottomEdge'
262- value: bottomEdgeLoader.item
263- when: bottomEdgeLoader.status == Loader.Ready
264- }
265-
266 Connections {
267 target: mainPage.contactModel
268
269 onContactsChanged: {
270- if (contactIndex) {
271- contactList.positionViewAtContact(mainPage.contactIndex)
272- mainPage.contactIndex = null
273- // at this point the operation has finished already
274- mainPage._creatingContact = false
275- mainPage.delayFetchContact()
276+ // if is a new contact show it
277+ if (mainPage._newContactId != "") {
278+ contactList.positionViewAtContactId(mainPage._newContactId)
279+ mainPage._newContactId = ""
280 }
281 }
282+
283 onImportCompleted: {
284 if (mainPage._importingTestData) {
285 mainPage._importingTestData = false
286@@ -879,22 +865,23 @@
287 }
288
289 Connections {
290- target: pageStack.bottomEdge
291- onCommitCompleted: {
292- if (mainPage.state !== "default") {
293- mainPage.head.sections.selectedIndex = 0
294- mainPage.state = "default"
295- }
296- }
297- onCollapseCompleted: {
298- if (!mainPage._creatingContact) {
299- if (contactList.currentIndex === -1)
300- contactList.currentIndex = 0
301- mainPage.delayFetchContact()
302- }
303+ target: pageStack
304+ onBottomEdgeOpenedChanged: {
305+ if (pageStack.bottomEdgeOpened) {
306+ if (mainPage.state !== "default") {
307+ mainPage.head.sections.selectedIndex = 0
308+ mainPage.state = "default"
309+ }
310+ } else {
311+ if (mainPage._creatingContact === "") {
312+ if (contactList.currentIndex === -1)
313+ contactList.currentIndex = 0
314+ mainPage.delayFetchContact()
315+ }
316
317- if (mainPage.status === "default") {
318- contactList.forceActiveFocus()
319+ if (mainPage.status === "default") {
320+ contactList.forceActiveFocus()
321+ }
322 }
323 }
324 }
325
326=== modified file 'src/imports/ABContactViewPage.qml'
327--- src/imports/ABContactViewPage.qml 2016-02-13 02:35:02 +0000
328+++ src/imports/ABContactViewPage.qml 2016-08-19 12:45:42 +0000
329@@ -41,7 +41,7 @@
330 _editPage = null
331 }
332 if (pageStack.bottomEdge) {
333- pageStack.bottomEdge.collapse()
334+ pageStack.bottomEdge.close()
335 }
336 }
337
338@@ -55,7 +55,7 @@
339 }
340
341 // Shortcut in case of single column
342- Action {
343+ Action {
344 id: backAction
345
346 name: "cancel"
347@@ -123,7 +123,6 @@
348 Loader {
349 id: bottomEdgeLoader
350
351- active: (pageStack.columns > 1)
352 asynchronous: true
353 sourceComponent: ABNewContactBottomEdge {
354 id: bottomEdge
355@@ -135,13 +134,14 @@
356 pageStack: root.pageStack
357 hintVisible: false
358 enabled: !root.editing
359+ visible: (pageStack.columns > 1)
360 }
361 }
362
363 Binding {
364 target: pageStack
365- property: 'bottomEdge'
366+ property: '_bottomEdge'
367 value: bottomEdgeLoader.item
368- when: bottomEdgeLoader.status === Loader.Ready
369+ when: (bottomEdgeLoader.status === Loader.Ready) && (pageStack.columns > 1)
370 }
371 }
372
373=== modified file 'src/imports/ABMultiColumnEmptyState.qml'
374--- src/imports/ABMultiColumnEmptyState.qml 2016-05-10 15:51:21 +0000
375+++ src/imports/ABMultiColumnEmptyState.qml 2016-08-19 12:45:42 +0000
376@@ -42,7 +42,7 @@
377 function close()
378 {
379 if (bottomEdge.item) {
380- bottomEdge.item.collapse()
381+ bottomEdge.item.close()
382 }
383 }
384
385@@ -64,12 +64,12 @@
386 Loader {
387 id: bottomEdgeLoader
388
389- active: (pageStack.columns > 1)
390 asynchronous: true
391 sourceComponent: ABNewContactBottomEdge {
392 id: bottomEdge
393
394 hintVisible: false
395+ visible: (pageStack.columns > 1)
396 parent: root
397 height: root.height
398 modelToEdit: root.model
399@@ -88,17 +88,25 @@
400
401 Binding {
402 target: pageStack
403- property: 'bottomEdge'
404+ property: '_bottomEdge'
405 value: bottomEdgeLoader.item
406- when: bottomEdgeLoader.status === Loader.Ready
407+ when: (bottomEdgeLoader.status === Loader.Ready) && (pageStack.columns > 1)
408 }
409
410+
411+ // Remove empty page when app changes to 1 column mode
412 Connections {
413 target: pageStack
414- onColumnsChanged: {
415- if (pageStack.columns === 1) {
416+ onBottomEdgeOpenedChanged: {
417+ if (!pageStack.bottomEdgeOpened && (pageStack.columns === 1)) {
418 pageStack.removePages(root)
419 }
420 }
421 }
422+ onActiveChanged: {
423+ if (active && (pageStack.columns === 1)) {
424+ pageStack.removePages(root)
425+ }
426+
427+ }
428 }
429
430=== modified file 'src/imports/ABNewContactBottomEdge.qml'
431--- src/imports/ABNewContactBottomEdge.qml 2016-02-12 23:03:19 +0000
432+++ src/imports/ABNewContactBottomEdge.qml 2016-08-19 12:45:42 +0000
433@@ -26,11 +26,6 @@
434 property var pageStack: null
435 property alias hintVisible: bottomEdgeHint.visible
436 property var _contactToEdit: null
437- // WORKAROUND: BottomEdge component loads the page async while draging it
438- // this cause a very bad visual.
439- // To avoid that we create it as soon as the component is ready and keep
440- // it invisible until the user start to drag it.
441- property var _realPage: null
442
443 function editContact(contact)
444 {
445@@ -38,6 +33,31 @@
446 commit()
447 }
448
449+ function close()
450+ {
451+ if (pageStack.bottomEdgeFloatingPage) {
452+ pageStack.removePages(pageStack.bottomEdgeFloatingPage)
453+ }
454+ }
455+
456+ function pushPage()
457+ {
458+ var properties = {enabled: true,
459+ visible: true,
460+ parent: bottomEdge.parent}
461+ if (bottomEdge._contactToEdit)
462+ properties[contact] = bottomEdge._contactToEdit
463+
464+
465+ var incubator = pageStack.addPageToNextColumn(bottomEdge.parent, editorPageBottomEdge, properties)
466+ incubator.forceCompletion()
467+ pageStack.bottomEdgeFloatingPage = incubator.object
468+ incubator.object.Component.onDestruction.connect(function() {
469+ pageStack.bottomEdgeFloatingPage = null
470+ })
471+ bottomEdge._contactToEdit = null
472+ }
473+
474 hint {
475 id: bottomEdgeHint
476 action: Action {
477@@ -48,42 +68,27 @@
478 }
479 }
480
481- contentComponent: Item {
482- id: pageContent
483-
484- implicitWidth: bottomEdge.width
485- implicitHeight: bottomEdge.height
486- children: bottomEdge._realPage
487- }
488-
489+ contentComponent: editorPageBottomEdge
490+ preloadContent: visible
491
492 onCommitCompleted: {
493- if (bottomEdge._contactToEdit)
494- editorPage.contact = bottomEdge._contactToEdit
495- bottomEdge._contactToEdit = null
496- }
497-
498- onCollapseCompleted: {
499- _realPage = editorPageBottomEdge.createObject(null)
500- }
501-
502- Component.onCompleted: {
503- _realPage = editorPageBottomEdge.createObject(null)
504+ pushPage()
505+ collapse()
506 }
507
508 Component {
509 id: editorPageBottomEdge
510
511 ABContactEditorPage {
512- implicitWidth: bottomEdge.width
513- implicitHeight: bottomEdge.height
514- contact: ContactsUI.ContactsJS.createEmptyContact("", bottomEdge)
515+ id: editorPageItem
516+
517+ implicitHeight: mainWindow.height
518+ implicitWidth: parent ? parent.width : bottomEdge.width
519+ enabled: false
520 model: bottomEdge.modelToEdit
521- enabled: bottomEdge.status === BottomEdge.Committed
522- active: bottomEdge.status === BottomEdge.Committed
523- visible: bottomEdge.status !== BottomEdge.Hidden
524- onCanceled: bottomEdge.collapse()
525- onContactSaved: bottomEdge.collapse()
526+ contact: ContactsUI.ContactsJS.createEmptyContact("", editorPageItem)
527+ onCanceled: pageStack.removePages(editorPageItem)
528+ onContactSaved: pageStack.removePages(editorPageItem)
529 pageStack: bottomEdge.pageStack
530 }
531 }
532
533=== modified file 'src/imports/MainWindow.qml'
534--- src/imports/MainWindow.qml 2016-07-14 18:22:28 +0000
535+++ src/imports/MainWindow.qml 2016-08-19 12:45:42 +0000
536@@ -114,17 +114,21 @@
537 objectName: "mainStack"
538
539 property var contactListPage: null
540- property var bottomEdge: null
541- readonly property bool bottomEdgeOpened: (bottomEdge && bottomEdge.status === BottomEdge.Committed)
542+ property var bottomEdgeFloatingPage: null
543+ readonly property bool bottomEdgeOpened: bottomEdgeFloatingPage != null
544 readonly property bool hasMouse: ((miceModel.count > 0) || (touchPadModel.count > 0))
545 readonly property bool hasKeyboard: (keyboardsModel.count > 0)
546+ property var _bottomEdge: null
547+
548+ function closeBottomEdge()
549+ {
550+ if (bottomEdgeFloatingPage)
551+ mainStack.removePages(bottomEdgeFloatingPage);
552+ }
553
554 function resetStack()
555 {
556- if (bottomEdge)
557- bottomEdge.collapse()
558 mainStack.removePages(primaryPage);
559-
560 }
561
562 function _nextItemInFocusChain(item, foward)
563@@ -182,13 +186,16 @@
564 if (mainStack.columns > 1) {
565 if (mainStack.contactListPage)
566 {
567- if (!mainStack.contactListPage.hasChildPage())
568+ if (!mainStack.contactListPage.hasChildPage() && !mainStack.bottomEdgeOpened)
569+ console.debug("Fech contact:" + mainStack.bottomEdgeOpened)
570 mainStack.contactListPage.delayFetchContact()
571 }
572 else
573 {
574- if (!contactPage.hasChildPage())
575+ if (!contactPage.hasChildPage() && !mainStack.bottomEdgeOpened) {
576+ console.debug("Push empty page:" + mainStack.bottomEdgeOpened)
577 mainStack.addPageToNextColumn(contactPage, Qt.resolvedUrl("./ABMultiColumnEmptyState.qml"))
578+ }
579 }
580 }
581 }
582@@ -208,7 +215,7 @@
583
584 // WORKAROUND: Due the missing feature on SDK, they can not detect if
585 // there is a mouse attached to device or not. And this will cause the
586- // bootom edge component to not work correct on desktop.
587+ // bottom edge component to not work correct on desktop.
588 // We will consider that a mouse is always attached until it get implement on SDK.
589 Binding {
590 target: QuickUtils
591
592=== modified file 'src/imports/Ubuntu/AddressBook/Base/ContactDetailBase.qml'
593--- src/imports/Ubuntu/AddressBook/Base/ContactDetailBase.qml 2015-12-10 19:15:15 +0000
594+++ src/imports/Ubuntu/AddressBook/Base/ContactDetailBase.qml 2016-08-19 12:45:42 +0000
595@@ -97,7 +97,6 @@
596 } else if ((detail in detailNameMap) && (field == -1)){
597 return detailNameMap[detail]
598 } else {
599- console.debug("Unknown : [" + detail + "] [" + field + "]")
600 return "unknown"
601 }
602 }
603
604=== modified file 'src/imports/Ubuntu/AddressBook/Base/ContactDetailItem.qml'
605--- src/imports/Ubuntu/AddressBook/Base/ContactDetailItem.qml 2015-10-26 13:18:11 +0000
606+++ src/imports/Ubuntu/AddressBook/Base/ContactDetailItem.qml 2016-08-19 12:45:42 +0000
607@@ -23,7 +23,7 @@
608 id: root
609
610 readonly property alias fieldDelegates: fieldsColumn.children
611- property Component fieldDelegate: null
612+ property alias fieldDelegate: fieldRepeater.delegate
613 property alias spacing: fieldsColumn.spacing
614
615 implicitHeight: fieldsColumn.height
616@@ -36,26 +36,14 @@
617 }
618 spacing: units.gu(2)
619
620- height: childrenRect.height
621+ //height: childrenRect.height
622 Repeater {
623 id: fieldRepeater
624
625 model: root.fields
626- Loader {
627- id: field
628-
629- sourceComponent: fieldDelegate
630- Binding {
631- target: item
632- property: "field"
633- value: modelData
634- }
635-
636- Binding {
637- target: item
638- property: "detail"
639- value: root.detail
640- }
641+ onItemAdded: {
642+ item.field = Qt.binding(function() { return model[index] })
643+ item.detail = Qt.binding(function() { return root.detail })
644 }
645 }
646 }
647
648=== modified file 'src/imports/Ubuntu/AddressBook/ContactEditor/ContactDetailNameEditor.qml'
649--- src/imports/Ubuntu/AddressBook/ContactEditor/ContactDetailNameEditor.qml 2016-05-06 17:03:26 +0000
650+++ src/imports/Ubuntu/AddressBook/ContactEditor/ContactDetailNameEditor.qml 2016-08-19 12:45:42 +0000
651@@ -96,11 +96,15 @@
652 }
653
654 focus: true
655- width: root.width - units.gu(4)
656- x: units.gu(2)
657+ anchors {
658+ left: parent.left
659+ right: parent.right
660+ margins: units.gu(2)
661+ }
662+ height: units.gu(4)
663 detail: root.detail
664 visible: field === Name.MiddleName ? root.showMiddleName : true
665- height: visible ? units.gu(4) : 0
666+
667 placeholderText: placeholderTextFromField(field)
668 inputMethodHints: Qt.ImhNoPredictiveText
669 onTextChanged: checkIsEmpty()
670
671=== modified file 'src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml'
672--- src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml 2016-05-04 19:42:04 +0000
673+++ src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml 2016-08-19 12:45:42 +0000
674@@ -43,6 +43,15 @@
675 signal contactSaved(var contact);
676 signal canceled()
677
678+ function close() {
679+ if (pageStack.removePages) {
680+ pageStack.removePages(contactEditor)
681+ } else {
682+ pageStack.pop()
683+ }
684+ }
685+
686+
687 function cancel() {
688 for (var i = 0; i < contactEditor.newDetails.length; ++i) {
689 contactEditor.contact.removeDetail(contactEditor.newDetails[i])
690@@ -93,15 +102,11 @@
691 if (changed) {
692 // backend error will be handled by the root page (contact list)
693 var newContact = (contact.model == null)
694+ contactEditor.enabled = false
695+ contact.onContactChanged.connect(contactEditor._onContactSaved)
696 contactEditor.model.saveContact(contact)
697- if (newContact) {
698- contactEditor.contactSaved(contact)
699- }
700- }
701- if (pageStack.removePages) {
702- pageStack.removePages(contactEditor)
703 } else {
704- pageStack.pop()
705+ close()
706 }
707 }
708
709@@ -174,6 +179,13 @@
710 }
711 }
712
713+ function _onContactSaved()
714+ {
715+ contact.onContactChanged.disconnect(contactEditor._onContactSaved)
716+ contactEditor.contactSaved(contact)
717+ close()
718+ }
719+
720 Timer {
721 id: timerMakemakeMeVisible
722
723@@ -196,7 +208,7 @@
724 }
725 }
726
727- enabled: false
728+ enabled: active
729 flickable: null
730 Timer {
731 id: focusTimer
732@@ -482,15 +494,11 @@
733 }
734
735 onActiveChanged: {
736- if (!active) {
737+ if (!active || !enabled) {
738 return
739 }
740
741- if (contactEditor.initialFocusSection != "") {
742- focusTimer.restart()
743- } else {
744- contactEditor.ready()
745- }
746+ focusTimer.restart()
747 }
748
749 Component {
750
751=== modified file 'src/imports/Ubuntu/Contacts/ContactListView.qml'
752--- src/imports/Ubuntu/Contacts/ContactListView.qml 2016-06-21 00:57:29 +0000
753+++ src/imports/Ubuntu/Contacts/ContactListView.qml 2016-08-19 12:45:42 +0000
754@@ -332,6 +332,10 @@
755 {
756 view.positionViewAtContact(contact)
757 }
758+ function positionViewAtContactId(contactId)
759+ {
760+ view.positionViewAtContactId(contactId)
761+ }
762 function positionViewAtBeginning()
763 {
764 moveToBegining.restart()
765
766=== modified file 'src/imports/Ubuntu/Contacts/ContactSimpleListView.qml'
767--- src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2016-02-05 16:07:45 +0000
768+++ src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2016-08-19 12:45:42 +0000
769@@ -208,6 +208,24 @@
770 positionViewAtIndex(currentIndex, ListView.Center)
771 }
772
773+
774+ /*!
775+ Scroll the list to requested contact if the contact exists in the list
776+ */
777+ function positionViewAtContactId(contactId)
778+ {
779+ var contacts = listModel.contacts
780+
781+ for (var i = 0, count = contacts.length; i < count; i++) {
782+ var c = contacts[i]
783+ if (c.contactId === contactId) {
784+ currentIndex = i
785+ positionViewAtIndex(i, ListView.Center)
786+ return
787+ }
788+ }
789+ }
790+
791 /*!
792 private
793 Fetch contact and emit contact clicked signal
794
795=== modified file 'tests/qml/tst_ContactEditor.qml'
796--- tests/qml/tst_ContactEditor.qml 2015-12-16 18:35:33 +0000
797+++ tests/qml/tst_ContactEditor.qml 2016-08-19 12:45:42 +0000
798@@ -46,6 +46,7 @@
799 anchors.fill: parent
800 model: dummyDataModel
801 contact: createEmptyContact('')
802+ enabled: true
803 }
804 }
805

Subscribers

People subscribed via source and target branches