Merge lp:~mpt/libusermetrics/1286276-no-data-sources into lp:libusermetrics

Proposed by Matthew Paul Thomas
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 206
Merged at revision: 209
Proposed branch: lp:~mpt/libusermetrics/1286276-no-data-sources
Merge into: lp:libusermetrics
Diff against target: 43 lines (+4/-4)
2 files modified
src/libusermetricsoutput/UserMetricsImpl.cpp (+1/-1)
tests/unit/libusermetricsoutput/TestUserMetricsImpl.cpp (+3/-3)
To merge this branch: bzr merge lp:~mpt/libusermetrics/1286276-no-data-sources
Reviewer Review Type Date Requested Status
Sebastien Bacher Needs Information
PS Jenkins bot (community) continuous-integration Approve
Michael Terry Pending
Review via email: mp+268042@code.launchpad.net

Commit message

Fixes bug 1286276 (Lock screen whines that "No data sources available" on first use), simply by changing that string to "". First use is just the most obvious situation where this happens. There is never a situation where it would be appropriate to say "No data sources available" to someone who has bought your phone.

Description of the change

Fixes bug 1286276 (Lock screen whines that "No data sources available" on first use), simply by changing that string to "". First use is just the most obvious situation where this happens. There is never a situation where it would be appropriate to say "No data sources available" to someone who has bought your phone.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks, that makes sense to me

review: Approve
Revision history for this message
Sebastien Bacher (seb128) wrote :

Testing that change it seems the greeter doesn't display the infographic circle at all if there is no string (the phone lockscreen just displays the date at the top and the wallpaper), Matthew is that fine from a design perspective? Or do we want to display the circle? (in which case more work is needed)

review: Needs Information
Revision history for this message
Sebastien Bacher (seb128) wrote :

That's because the greeter hides the Infographics component if the string is ""
http://bazaar.launchpad.net/~unity-team/unity8/trunk/view/head:/qml/Greeter/Infographics.qml#L76

We can fix that either by not having that condition in unity8 (unsure why it was there though, subscribing Michael who seems to have added it and might know) or by changing the "" here to be " " (which feels a bit hackish but should work)

Revision history for this message
Michael Terry (mterry) wrote :

I *believe* that behavior on unity8's part (hiding circle if no message) is because: (a) it was an error (like unity8 giving a libusermetrics user that didn't exist) and (b) it looked weird, since there would be no infographic history either. So we just had a purple circle in the middle of the screen. Looked like an incomplete UI element.

I'm happy to take that check out now that a blank message is considered not-an-error-case.

However... Can I propose an alternative? Is it possible we can make libusermetrics behave the same as once the user has logged in once? i.e. show "0 texts received today" and "0 calls made" etc. It feels really weird that there's such a display difference between 1 second before first login and 1s after first login.

All those infographic templates are available at that point, eh? libusermetrics *could* show those strings...

Revision history for this message
Sebastien Bacher (seb128) wrote :

urg, the libusermetrics silo landed by error, now that it's in I would prefer pushing forward and fixing the remaining issue rather than reverting. Matthew, could you comment on what would be the right behaviour for the first boot? (cf Michael's comment)

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

I dislike the "0 texts/photos/calls today" strings because they sound whiny. "Why aren't you using the phone for this particular purpose? Why? Why?" However, that's a problem that should be fixed generally, not just some of the time.

I don't know what "before first login" means. When you turn on the phone for the first time, you go through the setup, then you enter a session that looks indistinguishable from a normal session, without having seen the lock screen anyway.

But even if you explained to me when "" stops and "0 somethings today" begins, that wouldn't explain it to everyone, so I agree with Michael's proposal of just making it behave the same way all the time.

Revision history for this message
Michael Terry (mterry) wrote :

Ah.. OK. After some research, I figured out when it stops showing "" and does "X things today". The first time any of those "things" categories happen ever, they start showing up in the infographic.

So if I receive a call, but never make a call, I won't ever see "0 calls made today", but I will see "1 call received today" today and "0 calls received today" tomorrow.

So at least there's some rhyme and reason to it.

I'm still not convinced we can't do something better in the initial-state case. And am also not convinced that accidentally landing something under discussion is a better reason for further changes rather than backing it out. But I can whip up a unity8 branch that handles "" better. Stay tuned.

Revision history for this message
Michael Terry (mterry) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/libusermetricsoutput/UserMetricsImpl.cpp'
2--- src/libusermetricsoutput/UserMetricsImpl.cpp 2014-10-15 17:12:16 +0000
3+++ src/libusermetricsoutput/UserMetricsImpl.cpp 2015-08-14 08:08:25 +0000
4@@ -195,7 +195,7 @@
5 updateMonth(*m_secondMonth, 0, secondMonthDate.daysInMonth(), dataIndex,
6 end);
7
8- setLabel(_("No data sources available"));
9+ setLabel("");
10 } else {
11 updateCurrentDataSet(0);
12 connect(m_dataSet.data(), SIGNAL(dataChanged(const QVariantList *)),
13
14=== modified file 'tests/unit/libusermetricsoutput/TestUserMetricsImpl.cpp'
15--- tests/unit/libusermetricsoutput/TestUserMetricsImpl.cpp 2014-10-15 17:12:16 +0000
16+++ tests/unit/libusermetricsoutput/TestUserMetricsImpl.cpp 2015-08-14 08:08:25 +0000
17@@ -143,7 +143,7 @@
18 model->readyForDataChangeSlot();
19
20 EXPECT_EQ("non-existing-user", model->username());
21- EXPECT_EQ(QString("No data sources available"), model->label());
22+ EXPECT_EQ(QString(""), model->label());
23
24 // the first month should be entirely empty
25 {
26@@ -169,7 +169,7 @@
27 model->readyForDataChangeSlot();
28
29 EXPECT_EQ("soon-to-exist-user", model->username());
30- EXPECT_EQ(QString("No data sources available"), model->label());
31+ EXPECT_EQ(QString(""), model->label());
32
33 // the first month should be entirely empty
34 {
35@@ -243,7 +243,7 @@
36 model->readyForDataChangeSlot();
37
38 EXPECT_EQ("existing-user", model->username());
39- EXPECT_EQ(QString("No data sources available"), model->label());
40+ EXPECT_EQ(QString(""), model->label());
41
42 // the first month should be entirely empty
43 {

Subscribers

People subscribed via source and target branches