[Tabs/PageStack/Toolbar] Using a combination of Tabs and PageStack breaks Toolbar

Reported by Michael Zanetti on 2013-09-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Undecided
Unassigned
Ubuntu UX
Undecided
Unassigned

Bug Description

Using a combination of Tabs and PageStack breaks the Toolbar. To reproduce follow those steps:

* Take the code example below and run it
* Pull up the toolbar => You'll see toolbar 1 in Page 1 in Tab 1, which matches the code below
* switch to tab 2 => You'll see toolbar 2 in Page 2 in Tab 2, still ok
* switch back to tab 1 => You'll see toolbar 2 in Page 1 in Tab 1

Switching back to a page-only tab correctly brings up the according toolbar. It happens only the if a PageStack is embedded into a Tab.

import Ubuntu.Components 0.1
import QtQuick 2.0

MainView {
    width: units.gu(48)
    height: units.gu(60)

    Tabs {
        Tab {
            title: "Tab 1"
            page: PageStack {
                Component.onCompleted: push(page1);
                Page {
                    id: page1
                    tools: ToolbarItems { ToolbarButton { text: "toobar 1" } }
                    Label { anchors.centerIn: parent; text: "Page 1" }
                }
            }
        }
        Tab {
            title: "Tab 2"
            page: Page {
                tools: ToolbarItems { ToolbarButton { text: "toobar 2" } }
                Label { anchors.centerIn: parent; text: "Page 2" }
            }
        }
        Tab {
            title: "Tab 3"
            page: Page {
                tools: ToolbarItems { ToolbarButton { text: "toobar 3" } }
                Label { anchors.centerIn: parent; text: "Page 3" }
            }
        }
    }
}

Nekhelesh Ramananthan (nik90) wrote :

I think this is a duplicate of https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1202626. I believe the design decision was to not combine pagestacks and tabs.

Michael Zanetti (mzanetti) wrote :

> I believe the design decision was to not combine pagestacks and tabs.

That is not an option... I mean, if core apps are not using them in combination, it's fine with me. But there are applications where Tabs alone are not enough, and where a page stack alone is not enough. Ultimately the SDK allows to use them combined so app developers will do so. If all the apps doing this are broken it won't look good for the platform.

summary: [Tabs/PageStack/Toolbar] Using a combination of Tabs and PageStack
- breaks Toobar
+ breaks Toolbar
Michael Zanetti (mzanetti) wrote :

This does not affect Design. This is a bug in the SDK components.... Marking as invalid for design.

Changed in ubuntu-ux:
status: New → Invalid
Nekhelesh Ramananthan (nik90) wrote :

I understand and I agree to your reasoning as you can see from the other bug report comments :) . You will have to talk to the designers about this.

Nekhelesh Ramananthan (nik90) wrote :

Why dont you do it other way as done at http://bazaar.launchpad.net/~ubuntu-clock-dev/ubuntu-clock-app/trunk/view/head:/ubuntu-clock-app.qml. What we do is have the tabs inside a pagestack and push that as default. This way you get to use both pagestack and tabs.

Changed in ubuntu-ux:
status: Invalid → Opinion
Michael Zanetti (mzanetti) wrote :

Because when browsing a deep stack, for example a media library, I don't want to be forced to exit that just to switch to the "Now playing" view to skip one song. That would require the user to navigate all the way down in the deep stack again.

On Tue, Sep 17, 2013 at 9:46 AM, Nekhelesh Ramananthan <
<email address hidden>> wrote:

> I think this is a duplicate of https://bugs.launchpad.net/ubuntu-ui-
> toolkit/+bug/1202626. I believe the design decision was to not combine
> pagestacks and tabs.
>
>
Hi Nekhelesh,

As far as I understood it, there was no design decision on not recommending
the combination of PageStack and Tabs. Rather, the decision was that when
there is a PageStack nested within a tab, the Tab's title is replaced by
that of the PageStack's chosen page:

https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1187850

Thus I think this is a valid bug.

Michael Zanetti (mzanetti) wrote :

Also, in my opinion, while it might be true for many use cases that the PageStack's Header should replace the Tab's one, I really think that there are use cases where you don't want to force the user to go back all the way through the Pagestack before being able to switch to another tab.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers