Merge lp:~marcustomlinson/unity8/lp-1356410 into lp:unity8

Proposed by Marcus Tomlinson
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 1184
Merged at revision: 1218
Proposed branch: lp:~marcustomlinson/unity8/lp-1356410
Merge into: lp:unity8
Diff against target: 23 lines (+13/-0)
1 file modified
qml/Dash/ScopesOverview.qml (+13/-0)
To merge this branch: bzr merge lp:~marcustomlinson/unity8/lp-1356410
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Albert Astals Cid (community) Approve
Michał Sawicz Pending
Review via email: mp+231326@code.launchpad.net

Commit message

Handle the openScope signal in "tempScopeItem" (ScopesOverview.qml) as is done with "scopeItem" (Dash.qml)

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

Should we handle gotoScope here too? I.e. can a temp scope request to go to a "favorite" scope and thus close the overview and temp scopes altogheter?

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

> Should we handle gotoScope here too? I.e. can a temp scope request to go to a "favorite" scope and thus close the overview and temp scopes altogheter?

Yeah it has to, since you can favorite any scope.

Wonder if bug #1355359 is close enough to fix in the same MP?

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

> > Should we handle gotoScope here too? I.e. can a temp scope request to go to
> a "favorite" scope and thus close the overview and temp scopes altogheter?
>
> Yeah it has to, since you can favorite any scope.

K, done.

>
> Wonder if bug #1355359 is close enough to fix in the same MP?

TBH, I don't have enough experience with this codebase to tackle that at this point. Could we rather just handle that bug separately.

Revision history for this message
Albert Astals Cid (aacid) wrote :

Have a look at the other onGotoScope implementation, calling root.favoriteSelected(scopeId); is not correct

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: Approve (continuous-integration)
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

> Have a look at the other onGotoScope implementation, calling
> root.favoriteSelected(scopeId); is not correct

Ok, I get what you're saying -there is some method to my madness I promise ;)

My intention is to achieve a logical animation back to the dash. What I do now is close the temp scope, switch back to the favourites tab, then redirect the gotoScope to the root's implementation (which in turn animates the opening of the favourited scope from there). I feel this looks quite clean.

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 :

Do you have any scope that does this?

review: Needs Information
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

> Do you have any scope that does this?

Here's how to reproduce the situation:

 * Edit /usr/share/upstart/sessions/unity8-dash.conf
 * Replace "musicaggregator" with "com.canonical.scopes.sevendigital" in UNITY_SCOPES_LIST
 * Reboot the phone
 * Open the music aggregator scope from the Dash Manager "All" tab
 * Click the "New albums from 7digital" header

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

> > Do you have any scope that does this?
>
> Here's how to reproduce the situation:
>
> * Edit /usr/share/upstart/sessions/unity8-dash.conf
> * Replace "musicaggregator" with "com.canonical.scopes.sevendigital" in
> UNITY_SCOPES_LIST
> * Reboot the phone
> * Open the music aggregator scope from the Dash Manager "All" tab
> * Click the "New albums from 7digital" header

Also, clicking the "Popular tracks on Grooveshark" header will show the onOpenScope behaviour.

Revision history for this message
Albert Astals Cid (aacid) wrote :

The animations may need some refinement later, but still this fixes stuff so let's get this merged in and polish stuff once its in hand of designers.

* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

* Did CI run pass? If not, please explain why.
Something broke in CI with 'xhost: unable to open display ":0"'

review: Approve
Revision history for this message
Albert Astals Cid (aacid) wrote :

Actually, can you add another TODO in that code with "Add tests for this", unless you want to play with our tests/fake scopes plugin to test it.

review: Needs Fixing
1184. By Marcus Tomlinson

Added "// TODO Add tests for these connections"

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

> Actually, can you add another TODO in that code with "Add tests for this",
> unless you want to play with our tests/fake scopes plugin to test it.

ok, done

Revision history for this message
Albert Astals Cid (aacid) :
review: Approve
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)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/ScopesOverview.qml'
2--- qml/Dash/ScopesOverview.qml 2014-08-15 17:37:28 +0000
3+++ qml/Dash/ScopesOverview.qml 2014-08-21 08:48:30 +0000
4@@ -535,6 +535,19 @@
5 scopesOverviewXYScaler.opacity = 0;
6 middleItems.overrideOpacity = -1;
7 }
8+ // TODO Add tests for these connections
9+ Connections {
10+ target: tempScopeItem.scope
11+ onOpenScope: {
12+ // TODO Animate the newly opened scope into the foreground (stacked on top of the current scope)
13+ tempScopeItem.scope = scope;
14+ }
15+ onGotoScope: {
16+ tempScopeItem.backClicked();
17+ root.currentTab = 0;
18+ root.scope.gotoScope(scopeId);
19+ }
20+ }
21 }
22 }
23 }

Subscribers

People subscribed via source and target branches