Merge lp://staging/~tpeeters/ubuntu-ui-toolkit/optIn-tabsDrawer into lp://staging/ubuntu-ui-toolkit

Proposed by Tim Peeters
Status: Rejected
Rejected by: Tim Peeters
Proposed branch: lp://staging/~tpeeters/ubuntu-ui-toolkit/optIn-tabsDrawer
Merge into: lp://staging/ubuntu-ui-toolkit
Prerequisite: lp://staging/~tpeeters/ubuntu-ui-toolkit/tabBarInStyle
Diff against target: 1779 lines (+613/-512) (has conflicts)
37 files modified
debian/changelog (+0/-21)
modules/Ubuntu/Components/Header.qml (+24/-1)
modules/Ubuntu/Components/MainView.qml (+8/-0)
modules/Ubuntu/Components/Panel.qml (+31/-0)
modules/Ubuntu/Components/TabBar.qml (+24/-5)
modules/Ubuntu/Components/Tabs.qml (+6/-1)
modules/Ubuntu/Components/TextField.qml (+11/-10)
modules/Ubuntu/Components/TextInputPopover.qml (+1/-3)
modules/Ubuntu/Components/Themes/Ambiance/NewHeaderStyle.qml (+146/-0)
modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml (+5/-3)
modules/Ubuntu/Components/Themes/Ambiance/qmldir (+1/-0)
modules/Ubuntu/Components/plugin/bottombarvisibilitycommunicator.cpp (+75/-0)
modules/Ubuntu/Components/plugin/bottombarvisibilitycommunicator.h (+59/-0)
modules/Ubuntu/Components/plugin/inversemouseareatype.h (+4/-11)
modules/Ubuntu/Components/plugin/plugin.cpp (+3/-0)
modules/Ubuntu/Components/plugin/plugin.pro (+2/-0)
modules/Ubuntu/Components/plugin/quickutils.cpp (+1/-1)
modules/Ubuntu/Components/plugin/quickutils.h (+1/-1)
modules/Ubuntu/Test/Test.pro (+0/-1)
modules/Ubuntu/Test/plugin/plugin.pro (+0/-25)
modules/Ubuntu/Test/plugin/uctestcase.cpp (+0/-50)
modules/Ubuntu/Test/plugin/uctestcase.h (+0/-47)
tests/autopilot/ubuntuuitoolkit/emulators.py (+87/-20)
tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py (+42/-32)
tests/resources/navigation/SimpleTabs.qml (+2/-0)
tests/resources/navigation/StackWithTabs.qml (+22/-32)
tests/resources/navigation/Tabs.qml (+8/-2)
tests/unit/plugin_dependency.pri (+0/-3)
tests/unit_x11/tst_components/tst_tabbar.qml (+7/-0)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaClip.qml (+0/-73)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaInFlickable.qml (+0/-52)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaInPage.qml (+0/-46)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaOnTop.qml (+6/-0)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaOnTopNoAccept.qml (+6/-1)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaParentClipped.qml (+0/-56)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaTopmostItem.qml (+9/-10)
tests/unit_x11/tst_layouts/tst_layouts.cpp (+22/-5)
Text conflict in tests/resources/navigation/Tabs.qml
To merge this branch: bzr merge lp://staging/~tpeeters/ubuntu-ui-toolkit/optIn-tabsDrawer
Reviewer Review Type Date Requested Status
Tim Peeters Disapprove
PS Jenkins bot continuous-integration Needs Fixing
Leo Arias code review of the autopilot tests and helpers Pending
Review via email: mp+212496@code.staging.launchpad.net

This proposal supersedes a proposal from 2014-03-10.

Description of the change

Add new tab patterns (and autopilot tests for those patterns) which are used when useDeprecatedToolbar in MainView is false. The old tab patterns (and test) also still work.

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote : Posted in a previous version of this proposal
Download full text (3.3 KiB)

42 + // FIXME: Currently autopilot can only get visual items, but once it is
43 + // updated to support non-visual items, a QtObject may be used.

Please add a link to http://pad.lv/1273956 so we know what you are referring to. Also, I find it useful to sign the FIXME comments, with something like --timp - 2014-03-19

637 + current_tab = tabs.get_current_tab()
638 + number_of_switches = 0
639 + while not tabs.selectedTabIndex == index:
640 + logger.debug(
641 + 'Current tab index: {0}.'.format(tabs.selectedTabIndex))
642 + if number_of_switches >= number_of_tabs - 1:
643 + # This prevents a loop. But if this error is ever raised, it's
644 + # likely there's a bug on the emulator or on the QML Tab.
645 + raise ToolkitEmulatorException(
646 + 'The tab with index {0} was not selected.'.format(index))
647 + current_tab = self.switch_to_next_tab()
648 + number_of_switches += 1
649 + return current_tab

You should move this into a method. You can call it something like _switch_to_deprecated_tab_by_index

651 + if (index != tabs.selectedTabIndex):
652 + self.get_header().switch_to_tab_by_index(index)
653 + current_tab = tabs.get_current_tab()
654 + return current_tab

This is not a big deal, but it would also make it clearer putting those statements on _switch_to_tab_in_drawer_by_index

668 + return false

Typo. It's False.

677 + try:
678 + tab_bar = self.select_single(TabBar)
679 + except dbus.StateNotFoundError:
680 + raise ToolkitEmulatorException(_NO_TABS_ERROR)
681 + tab_bar.switch_to_next_tab()
682 + self._get_animating().wait_for(False)

Same thing here ^

684 + try:
685 + tabs_drawer_button = self.select_single('AbstractButton', objectName='tabsButton')
686 + except dbus.StateNotFoundError:
687 + raise ToolkitEmulatorException(_NO_TABS_ERROR)
688 + self.pointing_device.click_object(tabs_drawer_button)
689 +
690 + tabs_model_properties = self.select_single('QQuickItem', objectName='tabsModelProperties')
691 + next_tab_index = (tabs_model_properties.selectedIndex + 1) % tabs_model_properties.count
692 +
693 + try:
694 + tab_button = self.get_root_instance().select_single('Standard',
695 + objectName='tabButton'+str(next_tab_index))
696 + except dbus.StateNotFoundError:
697 + raise ToolkitEmulatorException("Tab button {0} not found.".format(next_tab_index))
698 +
699 + self.pointing_device.click_object(tab_button)

and here ^. Please wrap them in something like _switch_to_next_deprecated_tab, and _switch_to_next_tab_in_drawer

4 + try:
685 + tabs_drawer_button = self.select_single('AbstractButton', objectName='tabsButton')
686 + except dbus.StateNotFoundError:
687 + raise ToolkitEmulatorException(_NO_TABS_ERROR)

You can also move this ^

724 + try:
725 + tab_button = self.get_root_instance().select_single('Standard',
726 + objectName='tabButton'+str(index))
727 + except dbus.StateNotFoundError:
728 + raise ToolkitEmulatorException("Tab button {0} not found.".format(index))

and this ^ into a private methods, as you have the same statements twice.

755 +class DeprecatedTabsTestCase(TabsTestCase):

I would prefer to do it with scenarios. Take a look at http://paste.ubuntu.com/7121301/
I haven't tried it, but something like that should work.

70...

Read more...

review: Needs Fixing (code review of the autopilot tests and helpers)
Revision history for this message
Leo Arias (elopio) : Posted in a previous version of this proposal
review: Approve (code review of the autopilot tests and helpers)
964. By Tim Peeters

merge trunk

965. By Tim Peeters

revert

966. By Tim Peeters

merge optIn-newHeader

967. By Tim Peeters

link bug

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)
968. By Tim Peeters

remove unused variable

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

bug no longer present in this branch

970. By Tim Peeters

merge 20-tabbarInStyle

971. By Tim Peeters

merge 25-pageTitle

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

fix TypeError when closing StackWithTabs example

973. By Tim Peeters

update StackWithTabs example

974. By Tim Peeters

update Tabs example

975. By Tim Peeters

merge tabbarInStyle

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 :
review: Disapprove

Unmerged revisions

975. By Tim Peeters

merge tabbarInStyle

974. By Tim Peeters

update Tabs example

973. By Tim Peeters

update StackWithTabs example

972. By Tim Peeters

fix TypeError when closing StackWithTabs example

971. By Tim Peeters

merge 25-pageTitle

970. By Tim Peeters

merge 20-tabbarInStyle

969. By Tim Peeters

bug no longer present in this branch

968. By Tim Peeters

remove unused variable

967. By Tim Peeters

link bug

966. By Tim Peeters

merge optIn-newHeader

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

to status/vote changes: