Merge lp:~tpeeters/ubuntu-ui-toolkit/tabs-autoactive into lp:ubuntu-ui-toolkit

Proposed by Tim Peeters
Status: Merged
Approved by: Zsombor Egri
Approved revision: 758
Merged at revision: 808
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/tabs-autoactive
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 97 lines (+22/-15)
4 files modified
modules/Ubuntu/Components/MainView.qml (+4/-4)
modules/Ubuntu/Components/TabBar.qml (+8/-1)
tests/autopilot/ubuntuuitoolkit/emulators.py (+9/-9)
tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py (+1/-1)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/tabs-autoactive
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Tim Peeters Approve
Zsombor Egri Approve
Review via email: mp+185046@code.launchpad.net

Commit message

Put tab bar in selection mode when apps are launched.

Description of the change

Put tab bar in selection mode when apps are launched.

To post a comment you must log in.
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 :

come on, jenkins. you can do it!

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

Code looks good.

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

thanks for reviewing :)

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
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

tests need to be updated to detect whether the tabbar is active before touching to activate.

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

merge trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:751
http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-ci/1042/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy-vm/479
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/3143
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-saucy-amd64-ci/899
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-saucy-armhf-ci/899
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-saucy-armhf-ci/899/artifact/work/output/*zip*/output.zip
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-vm-saucy/357
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/4627
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/4627/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/3145
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/3145/artifact/work/output/*zip*/output.zip
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/2624
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/2675
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/279
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/278

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/ubuntu-ui-toolkit-ci/1042/rebuild

review: Needs Fixing (continuous-integration)
752. By Tim Peeters

merge trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:752
http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-ci/1069/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/36
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/36
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-trusty-amd64-ci/17
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-trusty-armhf-ci/17
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-trusty-armhf-ci/17/artifact/work/output/*zip*/output.zip
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/30
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/36
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/36/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/36
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/36/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/2665
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/2716
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/370
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/369

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/ubuntu-ui-toolkit-ci/1069/rebuild

review: Needs Fixing (continuous-integration)
753. By Tim Peeters

testing autopilot tests. not passing, but curious if they pass on jenkins

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:753
http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-ci/1075/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/56
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/56/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-trusty-amd64-ci/23
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-trusty-armhf-ci/23
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-trusty-armhf-ci/23/artifact/work/output/*zip*/output.zip
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/49
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/56
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/56/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/56
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/56/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/2686/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/2737/console
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/412
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/411

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/ubuntu-ui-toolkit-ci/1075/rebuild

review: Needs Fixing (continuous-integration)
754. By Tim Peeters

debugging

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

swap position of Header and Toolbar in MainView code so that the header goes on top of the Toolbar IMA

756. By Tim Peeters

clean

757. By Tim Peeters

remove debugging code'

758. By Tim Peeters

remove debugging code

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

Autopilot tests updated, and mouse-event-eating-conflict between toolbar and header resolved.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:758
http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-ci/1094/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/95
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/92
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-trusty-amd64-ci/42
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-trusty-armhf-ci/42
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-trusty-armhf-ci/42/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/90
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/95
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/95/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/92
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/92/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/2720
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/2771
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/491
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/470

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/ubuntu-ui-toolkit-ci/1094/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 'modules/Ubuntu/Components/MainView.qml'
2--- modules/Ubuntu/Components/MainView.qml 2013-09-24 06:22:16 +0000
3+++ modules/Ubuntu/Components/MainView.qml 2013-10-25 10:37:15 +0000
4@@ -271,6 +271,10 @@
5 }
6 }
7
8+ Toolbar {
9+ id: toolbarItem
10+ }
11+
12 /*!
13 The header of the MainView. Can be used to obtain the height of the header
14 in \l Page to determine the area for the \l Page to fill.
15@@ -283,10 +287,6 @@
16 id: headerItem
17 property real bottomY: headerItem.y + headerItem.height
18 }
19-
20- Toolbar {
21- id: toolbarItem
22- }
23 }
24
25 /*!
26
27=== modified file 'modules/Ubuntu/Components/TabBar.qml'
28--- modules/Ubuntu/Components/TabBar.qml 2013-08-14 21:28:43 +0000
29+++ modules/Ubuntu/Components/TabBar.qml 2013-10-25 10:37:15 +0000
30@@ -43,7 +43,14 @@
31 An inactive tab bar only displays the currently selected tab,
32 and an active tab bar can be interacted with to select a tab.
33 */
34- property bool selectionMode: alwaysSelectionMode
35+ property bool selectionMode: false
36+
37+ /*!
38+ When all components are completed, enable selection mode
39+ */
40+ Component.onCompleted: {
41+ tabBar.selectionMode = true;
42+ }
43
44 /*!
45 Do not deactivate the tab bar after a specified idle time or when the user selects a new tab.
46
47=== modified file 'tests/autopilot/ubuntuuitoolkit/emulators.py'
48--- tests/autopilot/ubuntuuitoolkit/emulators.py 2013-10-18 09:37:13 +0000
49+++ tests/autopilot/ubuntuuitoolkit/emulators.py 2013-10-25 10:37:15 +0000
50@@ -205,8 +205,6 @@
51 tab_bar = self.select_single(TabBar)
52 assert tab_bar is not None, _NO_TABS_ERROR
53 tab_bar.switch_to_next_tab()
54-
55- # Sleep while the animation finishes.
56 self._get_animating().wait_for(False)
57
58
59@@ -262,16 +260,18 @@
60
61 def switch_to_next_tab(self):
62 """Open the next tab."""
63- # Click the tab bar to switch to selection mode.
64- logger.debug('Click the tab bar to enable selection mode.')
65- self.pointing_device.click_object(self)
66- if not self.selectionMode:
67- logger.debug('Selection mode not enabled, try again.')
68- # in case someone stole the click, like the open toolbar
69- self.pointing_device.click_object(self)
70+ self._activate_tab_bar()
71 logger.debug('Click the next tab bar button.')
72 self.pointing_device.click_object(self._get_next_tab_button())
73
74+ def _activate_tab_bar(self):
75+ if self.selectionMode:
76+ logger.debug('Already in selection mode.')
77+ else:
78+ # Click the tab bar to switch to selection mode.
79+ logger.debug('Click the tab bar to enable selection mode.')
80+ self.pointing_device.click_object(self)
81+
82 def _get_next_tab_button(self):
83 current_index = self._get_selected_button_index()
84 next_index = (current_index + 1) % self._get_number_of_tab_buttons()
85
86=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py'
87--- tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py 2013-10-18 14:41:53 +0000
88+++ tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py 2013-10-25 10:37:15 +0000
89@@ -193,7 +193,7 @@
90 import Ubuntu.Components.ListItems 0.1 as ListItem
91
92 MainView {
93- width: units.gu(48)
94+ width: units.gu(70)
95 height: units.gu(60)
96
97 Tabs {

Subscribers

People subscribed via source and target branches

to status/vote changes: