Merge lp://staging/~nick-dedekind/unity/phablet-greeter-indicators into lp://staging/unity/phablet

Proposed by Nick Dedekind
Status: Merged
Approved by: Michał Sawicz
Approved revision: no longer in the source branch.
Merged at revision: 686
Proposed branch: lp://staging/~nick-dedekind/unity/phablet-greeter-indicators
Merge into: lp://staging/unity/phablet
Diff against target: 177 lines (+34/-33)
6 files modified
Panel/Indicators.qml (+11/-5)
Panel/Panel.qml (+15/-11)
Panel/SearchIndicator.qml (+0/-8)
Shell.qml (+1/-2)
tests/qmltests/Panel/tst_Panel.qml (+5/-5)
tests/qmltests/Panel/tst_SearchIndicator.qml (+2/-2)
To merge this branch: bzr merge lp://staging/~nick-dedekind/unity/phablet-greeter-indicators
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
PS Jenkins bot (community) continuous-integration Approve
Albert Astals Cid (community) Needs Fixing
Katie Taylor Pending
Review via email: mp+157330@code.staging.launchpad.net

Commit message

Indicator panel now available in greeter

Description of the change

Indicator panel now available in greeter (sans Search bar)
==========================================================
Fixed some state change issues causing initial opening of dash not to have search bar (when removed from greeter).
Caused by state nor being initialized to "initial" by the dynamic assignment of the states.

To post a comment you must log in.
Revision history for this message
Michael Terry (mterry) wrote :

Is this WIP for a particular reason?

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

From Saviq:

Only thing I'm not sure of here is that it's possible to tap on the indicators to open them, looks to me like a potential "phone in pocket" issue.

Maybe we should only leave the drag gesture when over greeter?

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> Is this WIP for a particular reason?

No, was just waiting on design review on your branch from Katie.
But since we've moved here then I've added the design review here as well.

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> From Saviq:
>
> Only thing I'm not sure of here is that it's possible to tap on the indicators
> to open them, looks to me like a potential "phone in pocket" issue.
>
> Maybe we should only leave the drag gesture when over greeter?

Problem with disabling tap is that you won't be able to access the device overview page anymore.

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
Albert Astals Cid (aacid) wrote :

qmluitests don't pass

review: Needs Fixing
Revision history for this message
Michał Sawicz (saviq) wrote :

The below tests don't pass:
    qmltestrunner.Panel::test_search_click_when_disabled
    qmltestrunner.Panel::test_search_click_when_enabled
    qmltestrunner.SearchIndicator::test_hideUp
    qmltestrunner.SearchIndicator::test_show

review: Needs Fixing
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
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Katie Taylor (katie-t) wrote :

I don't think we should have tap to open on indicators in the greeter. It feels like a gesture that is too easy and would be prone to lots of accidental taps.

Tapping in the top part of the greeter screen should trigger a hint that the indicator menus open. (hint = reveal a small section of the indicator menu, and then fairly quickly hide it.)

This is similar to what we plan for the launcher, see Michael Zanetti's ~mzanetti/unity/phablet-tease-launcher

Revision history for this message
Michał Sawicz (saviq) wrote :

23 + // because of dynamic assignment of states, we need to assign state after completion.
24 + Component.onCompleted: state = "initial"

Is this really true? Why would « state: "initial" » not work?

=====

43 - property alias searchEnabled: search.enabled
44 + property bool searchVisible: true

Why this rename?

=====

94 - function show() {
95 - search.state = "visible"
96 + function show_state() {
97 + return "visible"
98 }
99
100 - function hideUp() {
101 - search.state = "hiddenUp"
102 + function hideUp_state() {
103 + return "hiddenUp"
104 }

169 - searchIndicator.hideUp()
170 + searchIndicator.state = searchIndicator.hideUp_state()

177 - searchIndicator.show()
178 + searchIndicator.state = searchIndicator.show_state()

This is weird, why the _state() methods at all? Either direct names or readonly props would suffice, no?

=====

116 + available: true

This is the default.

review: Needs Fixing
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> 23 + // because of dynamic assignment of states, we need to assign state
> after completion.
> 24 + Component.onCompleted: state = "initial"
>
> Is this really true? Why would « state: "initial" » not work?
>

Yes, it's a bit of a quirk with QML. It seems the dynamic assignments are computed after the static ones.

ie.
  states: pinnedModeStates
is assigned after
  state: "initial"
no matter where in the code it's placed.

so, when states property is assigned after state, it clears the state "initial".

> =====
>
> 43 - property alias searchEnabled: search.enabled
> 44 + property bool searchVisible: true
>
> Why this rename?
>

Because it's visiblily vs enabling. Previously search was always visible, only it was disabled. Now it's not visible at all.

> =====
>
> 94 - function show() {
> 95 - search.state = "visible"
> 96 + function show_state() {
> 97 + return "visible"
> 98 }
> 99
> 100 - function hideUp() {
> 101 - search.state = "hiddenUp"
> 102 + function hideUp_state() {
> 103 + return "hiddenUp"
> 104 }
>
> 169 - searchIndicator.hideUp()
> 170 + searchIndicator.state = searchIndicator.hideUp_state()
>
> 177 - searchIndicator.show()
> 178 + searchIndicator.state = searchIndicator.show_state()
>
> This is weird, why the _state() methods at all? Either direct names or
> readonly props would suffice, no?
>

Done.
Guess I'm not a fan of setting state by string from external object. :(

> =====
>
> 116 + available: true
>
> This is the default.

Done

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

W dniu 20.05.2013 16:01, Nick Dedekind pisze:
>> 23 + // because of dynamic assignment of states, we need to assign state
>> after completion.
>> 24 + Component.onCompleted: state = "initial"
>>
>> Is this really true? Why would « state: "initial" » not work?
>>
>
> Yes, it's a bit of a quirk with QML. It seems the dynamic assignments are computed after the static ones.
>
> ie.
> states: pinnedModeStates
> is assigned after
> state: "initial"
> no matter where in the code it's placed.
>
> so, when states property is assigned after state, it clears the state "initial".

I could even imagine they're evaluated in alphabetical order ;). After
all you're not supposed to rely on that order.

>> 94 - function show() {
>> 95 - search.state = "visible"
>> 96 + function show_state() {
>> 97 + return "visible"
>> 98 }
>> 99
>> 100 - function hideUp() {
>> 101 - search.state = "hiddenUp"
>> 102 + function hideUp_state() {
>> 103 + return "hiddenUp"
>> 104 }
>>
>> 169 - searchIndicator.hideUp()
>> 170 + searchIndicator.state = searchIndicator.hideUp_state()
>>
>> 177 - searchIndicator.show()
>> 178 + searchIndicator.state = searchIndicator.show_state()
>>
>> This is weird, why the _state() methods at all? Either direct names or
>> readonly props would suffice, no?
>>
>
> Done.
> Guess I'm not a fan of setting state by string from external object. :(

Well, then the previous approach (with hideUp(), show()) was one that
didn't do it, no? .state = .show_state() is IMO the same as .state =
"visible" if show_state() just returns "visible". If you want to avoid
that, a show() function that sets the state to "visible" internally was
the right way, no? Why do we need to change the hideUp() and show()
methods at all?

--
Michał Sawicz <email address hidden>
Canonical Services Ltd.

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> W dniu 20.05.2013 16:01, Nick Dedekind pisze:
> >> 23 + // because of dynamic assignment of states, we need to assign
> state
> >> after completion.
> >> 24 + Component.onCompleted: state = "initial"
> >>
> >> Is this really true? Why would « state: "initial" » not work?
> >>
> >
> > Yes, it's a bit of a quirk with QML. It seems the dynamic assignments are
> computed after the static ones.
> >
> > ie.
> > states: pinnedModeStates
> > is assigned after
> > state: "initial"
> > no matter where in the code it's placed.
> >
> > so, when states property is assigned after state, it clears the state
> "initial".
>
> I could even imagine they're evaluated in alphabetical order ;). After
> all you're not supposed to rely on that order.
>
>
> >> 94 - function show() {
> >> 95 - search.state = "visible"
> >> 96 + function show_state() {
> >> 97 + return "visible"
> >> 98 }
> >> 99
> >> 100 - function hideUp() {
> >> 101 - search.state = "hiddenUp"
> >> 102 + function hideUp_state() {
> >> 103 + return "hiddenUp"
> >> 104 }
> >>
> >> 169 - searchIndicator.hideUp()
> >> 170 + searchIndicator.state = searchIndicator.hideUp_state()
> >>
> >> 177 - searchIndicator.show()
> >> 178 + searchIndicator.state = searchIndicator.show_state()
> >>
> >> This is weird, why the _state() methods at all? Either direct names or
> >> readonly props would suffice, no?
> >>
> >
> > Done.
> > Guess I'm not a fan of setting state by string from external object. :(
>
> Well, then the previous approach (with hideUp(), show()) was one that
> didn't do it, no? .state = .show_state() is IMO the same as .state =
> "visible" if show_state() just returns "visible". If you want to avoid
> that, a show() function that sets the state to "visible" internally was
> the right way, no? Why do we need to change the hideUp() and show()
> methods at all?
>

Because the search bar state is dependant on the searchVisible flag and the width of the panel, search & indicatorbar, not the state of the Inidcators.
Thought it better to have the state determination in a single place than to have multiple entry points.
I could have had connections to the change of various items which determine the state of the search call into a function to re-interprets that state. But it's a bit messy.

> --
> Michał Sawicz <email address hidden>
> Canonical Services Ltd.

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

FYI, I believe the change for the search bar states will fix https://bugs.launchpad.net/touch-preview-images/+bug/1181249

Need to confirm though.

Revision history for this message
Michał Sawicz (saviq) wrote :

I'm not buying the s/enabled/visible/ change, but that's fine ;)

We need to later hide the search label when dash isn't focused (and even later - interface with the app to see if it supports search to determine whether to hide or not).

Also it feels like it's the search label that will hide when there's too many indicators, and it should be the other way 'round - it's the overflow indicators that should hide.

Aaand also the SEARCH label will need to get replaced (slide in from the bottom) with corresponding MUSIC, APPS, etc., or the actual search query (in double quotes).

Aaaand it should also be possible to edge-swipe the search entry down (should on the phone, not only tap on it...

Let me add those as WIs, so we don't lose them :)

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