/srv/irclogs.ubuntu.com/2014/01/24/#ubuntu-unity.txt

=== duflu_ is now known as duflu
Mirvkarni: oh, right, thanks (regarding savi_q)05:25
tsdgeosMacSlow: does http://s-jenkins.ubuntu-ci:8080/job/autopilot-testrunner-otto-trusty/2242/testReport/junit/unity8.shell.tests.test_notifications/InteractiveNotificationBase/test_sd_incoming_call_Desktop_Nexus_4_/ make any sense to you?08:30
sil2100jamesh, thostr_: morning! https://bugs.launchpad.net/unity-scope-mediascanner/+bug/127221808:56
ubot5Ubuntu bug 1272218 in Unity Media Scanner Scope "Latest lp:unity-scope-mediascanner scope does not work" [High,New]08:56
jameshsil2100: hi.  I discovered a problem while testing the scope today: I missed one location when fixing the scope for the API renaming08:57
jameshsil2100: trunk is now working with the new scopes API version of unity-scope-tool for me08:57
sil2100jamesh: will it now work even with the old scopes API?09:06
MacSlowtsdgeos, hm... looks like the tap/click on the button didn't happen.09:26
tsdgeosMacSlow: can you try seeing if you can repro it? it's the only failure in autopiloot we are having now (now that otto decided not to crash every other run again)09:27
MacSlowtsdgeos, I'm in NotifyOSD bug-fixing land atm... I'll give it a deeper look laster today.09:30
tsdgeosoki09:30
=== mpt_ is now known as mpt
jameshsil2100: sorry, was finishing off a meeting.  If I branch the mediascanner scope from before the updates to the new API, how difficult would it be to have packages for both?09:34
jameshsil2100: so, the  lp:unity-scope-mediascanner/saucy branch looks like what we'd want to parallel install with the new binding.  Would updating the package name of the new scope to unity-scope-mediascanner2 be enough?10:28
sil2100jamesh: hmmm, I think that maybe we should just wait for the switch to the new scopes API in overall?10:47
jameshwell, we want to be able to test out the new code.  I know thostr_ is very keen to see this land, since it has taken longer than expected.10:48
=== _salem is now known as salem_
=== MacSlow is now known as MacSlow|lunch
mzanettiCimi: if the test launches an app etc, I'd put it into the app lifecycle tests12:20
Cimiok12:23
Cimimzanetti, or upstart?+12:23
mzanettiCimi: not sure why the app lifecycle and upstart tests are not groupes12:24
mzanettigrouped12:24
mzanettiCimi: ah ok. no. thats different12:24
mzanettiCimi: test_upstart  tests if unity8 communicates correctly with upstart when unity8 is starting12:25
Cimiso app lyfecycle12:25
Cimilifecycle12:25
mzanettiCimi: the app lifecycle tests are the ones, yeah12:25
Cimiok12:25
Cimimzanetti, same check in upstart file works, not in app lifecycle12:27
CimiI'm debugging12:27
Cimiwith works I mean, it fails when it is expected to fail12:27
mzanettiCimi: hmm... dunno... actually imho the lifecycle tests should be in the unity8 directory too12:27
mzanettinot sure why we have a separate directory for that12:28
Cimilet me create a separate dir12:28
Cimidir/file12:28
seb128where is the unity8 default/user configuration stored?12:32
seb128ups12:32
seb128default *launcher* configuration12:32
Cimimzanetti, ^12:47
Cimiseb128, I think in the source code, might be wrong12:48
mzanettiseb128: in dconf12:48
seb128mzanetti, where is the schemas? is that the one from unity7?12:48
mzanettiseb128: yes12:48
seb128mzanetti, thanks12:49
mzanettiseb128: not that this is only the default config12:49
mzanettiseb128: if you change the launchers config it won't be stored in there any more12:49
seb128mzanetti, accountsservice then right?12:49
mzanettiseb128: yep12:49
seb128mzanetti, how do I reset it?12:49
mzanettiseb128: gdbus call --system --dest org.freedesktop.Accounts --object-path /org/freedesktop/Accounts/User32011 --method org.freedesktop.DBus.Properties.Set com.canonical.unity.AccountsService launcher-items "<[{'defaults' : <true>}]>"12:50
seb128mzanetti, in fact my question is "is ubuntu-system-settings in the default launcher config nowadays"12:50
seb128mzanetti, let me try that, thanks12:50
=== MacSlow|lunch is now known as MacSlow
=== dandrader is now known as dandrader|afk
karnitsdgeos: "fun" fact. while qml/Components/FilterGrid.qml and tests/qmltests/Components/tst_FilterGrid.qml are same in my branch (any seen changes would not affect that behavior), if you set maximumNumberOfColumns on the FilterGrid to 2 instead of 3 (tests contain value of 3), trunk code shows them in 2 columns, while new-scopes shows them in... *1* column, even though it should show *2* columns.13:13
karnitsdgeos: I yet have to understand why that happens. testFilterGrid with maximumNumberOfColumns set to 2 in tst_FilterGrid.qml in unity trunk and new-scopes trunk shows the problem.13:13
karnitsdgeos: oh, sorry: http://paste.ubuntu.com/6808249/13:15
karniThese changes would not affect the behavior of FilterGrid for models with the test default number of items. And I did try to manually set "1" for collapsedRowCount, did not help.13:16
=== alan_g is now known as alan_g|lunch
karnitsdgeos: I guess that would mean my previous change to ResponsiveGridView spacing/margins could break that. There's no other resonable reason.13:21
* karni reviews code13:21
Mirvtsdgeos: today's recipe got a bit easier and I might have missed the rm -rf from yesterday's: http://pastebin.ubuntu.com/6808352/13:35
Mirvtsdgeos: correction, http://pastebin.ubuntu.com/6808355/13:37
=== dandrader|afk is now known as dandrader
Mirvtsdgeos: and I got http://pastebin.ubuntu.com/6808345/13:38
karniYes. With maximumNumberOfColumns set to 2, it looks like ResponsiveGridView changes are to blame.13:39
tsdgeoskarni: i got lost to be honest :D14:01
karnitsdgeos: Looks like grid spacing fixes badly affect number of columns when maximumNumberOfColums < 3 (specifically, 2).14:02
karnitsdgeos: I'm looking into it, I just wanted to share. I found out more while I was messaging you. Sorry for the confusion.14:03
karniI must have sounded bit random.14:03
tsdgeoskarni: no worries, good you're on track :-)14:03
karni:)14:03
karnitsdgeos: I have one question though. This snippet [1] comes from ResponsiveGridView. If the last column does not contain spacing to it's right, can you tell me why would we be dividing by (delegateWidth + spacing)? [1] http://paste.ubuntu.com/6808495/14:07
tsdgeoskarni: because it's probably having spacing to its right14:08
tsdgeosand yes that may be a difference to how the vJournal is coded14:08
karnitsdgeos: I talked to Katie. If all columns have spacing to it's right, and same margin on both sides, then the free space at the right edge of the screen is larger than at left side.14:08
karnitsdgeos: I think that formula is fundamentally wrong, even if the rendering was right. Following that, spacingForColumns() would also require adjustment.14:09
tsdgeosyes14:09
karnitsdgeos: I showed her two screenshots, with and without my fix14:09
tsdgeosthe formula may be wrong14:09
tsdgeosbut it's rendering right14:09
tsdgeosif you fix the formula14:09
tsdgeosis rendering wrong14:09
tsdgeosso you'll need to fix the other stuff too14:09
karnitsdgeos: Right. I was just asking for sanity check if you consider the formula *could* be wrong. I think it is.14:10
tsdgeoslet me read it14:10
karniSure. qml/Components/ResponsiveGridView.qml14:10
karnicolumnsForSpacing function14:10
karnitsdgeos: Limiting our conversation for sake of sanity to this function only, that's what I suggest: http://paste.ubuntu.com/6808514/14:12
karnitsdgeos: basically, columnsForSpacing should return: (parent.width - bothMargins - delegateWidth) / (delegateWidth+spacing) + 1 (the last column without spacing)14:14
karniBeen a while I tried to convey mathematical reasoning over IRC.14:15
tsdgeoshe he14:17
karniDo you think what I said makes sense?14:17
tsdgeosdoing my math14:17
karnigreat14:17
=== alan_g|lunch is now known as alan_g
karnitsdgeos: I just sent you a drawing ;)14:21
tsdgeoskarni: (parent.width) / (delegateWidth + spacing) makes more sense to me14:22
tsdgeosbut let me read your drawing14:22
karnitsdgeos: I agree14:22
tsdgeosi wonder who originally did that code14:23
karnitsdgeos: bzr blame qml/Components/ResponsiveGridView.qml (I dislike the command, FWIW)14:24
tsdgeoskarni: nah that's a lie14:24
tsdgeoswe moved the code14:24
karnitsdgeos: Michal, but shows you could have touched that line.14:24
tsdgeosso it's going to say saviq14:24
tsdgeosbut he did not do it14:24
karniI see. I don't care :) as long as we can understand it.14:24
tsdgeosgerry is more acurate14:25
tsdgeoshttp://bazaar.launchpad.net/~unity-team/unity/phablet/changes?filter_file_id=responsivegrid.qml-20121121162541-qc48wqyt6pxgw0ib-114:25
tsdgeoscolumnsForSpacing has been the same since revision114:25
tsdgeoshttp://bazaar.launchpad.net/~unity-team/unity/phablet/revision/10614:25
karniyes14:25
karniI just looked, you're right.14:25
tsdgeosi'd say that what i said makes more sense that what gerry coded14:25
tsdgeosbut then he has a math phd14:25
tsdgeosso i won't say he's wrong :D14:26
karnihahahahah14:26
karniYou made me laugh.. thank you. I had some hard time recently heh.14:26
karni:)14:26
tsdgeos:)14:26
tsdgeoswhat i suggest still works on trunk14:26
tsdgeosso if it helps with your usecase14:26
karniyes, thank you14:27
tsdgeosi don't see any problem in getting it merged14:27
karnilet me see if that helps14:27
tsdgeoswe could even probably find out a width for the test that it breaks14:27
tsdgeosin current trunk14:27
karniYes. I want to check if that works for 2 columns though.14:28
karnitsdgeos: but it's a good finding. our both formulas where equivalent, yours was cleaner.14:28
karni(using the fact that spacing = 2*margin)14:29
karnitsdgeos: wohoo it works for 2 columns. Now I'll get the spacing sorted, and we should be good.14:31
tsdgeosnice14:31
=== ricmm_ is now known as ricmm
=== rachelliu_ is now known as rachelliu
tsdgeoskarni: that columns fix, you're doing it over trunk or over new-scopes?14:59
karnitsdgeos: I am over new-scopes, but I understand it applies to trunk, so once I have it ready, we can do it over trunk :) Don't want to be moving the party over in the middle.15:00
tsdgeosoki15:00
karnitsdgeos: So, yeah.. I'm actually working with trunk already. If you $ tryFilterGrid, you'll see these 3 columns are not center aligned.15:16
karniAnd that's because margins always evaluate to zero width, because "allocatable horizontal space" is spread over column spacings15:17
tsdgeosright15:17
=== alan_g is now known as alan_g|tea
=== dandrader is now known as dandrader|lunch
tsdgeosMirv: those upgrade instructions work better15:48
tsdgeosMirv: and yes, stuff is asserting in the qtubuntu QPA plugin :/15:48
=== alan_g|tea is now known as alan_g
tsdgeosMirv: after recompiling qtubuntu all works for me16:14
tsdgeosMirv: which is weird since you seem to recompile it :_S16:15
tsdgeoswell, all works until you blank the screen16:18
tsdgeosthat is16:18
tsdgeos:D16:18
tsdgeosthen you can't unblank it anymore16:18
=== dandrader|lunch is now known as dandrader
karnimhr3: Hey man, you around? Do you think you could check my math?16:59
mhr3karni, only if you use integrals17:00
mhr3karni, or at least some derivations17:00
karnimhr3: I wish ;) http://paste.ubuntu.com/6809314/17:00
karnimhr3: I had to comment the code for sanity17:00
mhr3pff, addition and division.. boring :P17:01
karniI know, right..17:01
karnimhr3: problem is, margins are still too large. if you set maximumNumberOfColumns to 2, it's always 1 column. problem does not show for 3+ columns.17:02
karniliterally, if you set it to 2 (and ResponsiveGridView has leftMargin and rightMargin = margin/2 (as in code)), it renders stuff in one column.17:03
karniThe math is sound to me.17:03
mhr3so what's the inputs?17:04
karnimhr3: for the record, I confirmed with Albert that formula for columnsForSpacing() is correct17:04
karnimhr3: maximumNumberOfColumns.17:05
karnimhr3: for 3 and above, it's correct. for value of 2, it becomes 1 column instead.17:05
karnimhr3: I assume margins for a GridView define the padding on the outside of the view?17:07
karniactually, that wouldn't even manner. parent.width doesn't change, the total width should match anyway.17:07
mhr3karni, could you console.log all the params for columnsForSpacing when max == 2?17:09
karnimhr3: in onCompleted of the gridview?17:10
mhr3karni, just print it every time the func is called17:10
karniah sure17:10
mhr3preferably when there aren't dozens of categories :)17:13
karnimhr3: spacing 8 parent.width 240 delegateWidth 48 spacing 8 columns 4 - but they're limited by Math.max(4, maxvalue=2)17:15
karniI also know the number of columns is 2, because when filtered to one collapsedRowCount (even though showing in 1 column), there's 2 items.17:15
karniSo, the number of columns is 2, and it is correct that max of 4 columns would fit.17:16
karnilet me do the same with spacing, which is where the problem seems to be17:16
mhr3now i lost track of what is actually wrong...17:17
mhr3cause it sounds like it works how it's supposed to17:17
karnimhr3: collapsedRowCount: 1, maximumNumberOfColumns: 2 ---> results in single column of 2 items.17:17
karniif I manually lower the margins (that's where the math is), these two items fit in one row.17:18
karniTests didn't catch it because the formula for column count was wrong, and tests are implemented for 3 columns.17:18
karnimhr3: Anyway, I'll print stuff out and see if it adds up.17:18
mhr3but collapsedRowCount doesn't come into play here at all17:19
karnimhr3: but ResponsiveGridView is part of FilterGrid, and testFilterGrid shows that problem.17:19
karniThe formula for calculating column count was fundamentally wrong.17:20
karniIt rendered fine, because the spacing also had a wrong formula.17:20
karniall columns had spacing (and the last one shouldn't), that's why stuff was left-aligned17:20
karniif you tryFilterGrid in unity8 trunk, you'll notice they're left aligned17:20
karniThat's because margins always evaluate to zero width, and last column of the grid also has spacing.17:21
karniFilterGrid should work independently of ResponsiveGridView margins, and it does not :)17:23
mhr3i don't get this:17:24
mhr3+            // Margin is half of the spacing, thus L + R margin = spacing.17:24
mhr3+            return Math.max(1, Math.floor(parent.width / (delegateWidth + spacing)));17:24
mhr3you say that margins == spacing, but it's not accounted for in the formula17:25
karnimhr3: check your mail for picture17:25
mhr3didn't get anythin17:25
mhr3g17:25
karnithen check now :)17:26
karnimhr3: it is, because far right delegateWidth+spacing is actually delegateWidth+(2 x (spacing/2) )17:26
karniwhere spacing/2 = one margin17:26
karniThat's where the comment came from.17:26
mhr3ah, right17:26
mhr3a sec, need to find a pen17:26
karnisure :)17:27
mhr3and some paper :)17:27
karnimhr3: I enjoyed drawing a little.17:27
mhr3btw does parent.width include the margins?17:27
karnimhr3: yes, in my understanding.17:29
karnimhr3: if I do: left/rightMargin: margin/2.4 (instead of margin/2), it works fine. which means, sum of both margins is still to large :/17:30
karnior I'm missing a detail in the layout17:30
karniparent.width is the width we have available, I assume that means: [ Lmargin | grid grid grid | Rmargin ]17:30
mhr3doesn't that just mean that spacing != 2*margin17:33
mhr3?17:33
karniwait. let me set left margin 0, right margin = spacing. if it fits, the spacing/2 should as well.17:33
karnipff.. no, stil 2 items don't fit in one row, although visually they would, with large spacing.17:34
karnimhr3: I need to grab lunch (lol), back in a sec, in case you'll still here. If not, no worries, catch you on Monday :)17:35
mhr3hm, lunch, that's a good idea...17:35
karnimhr3: heh, I seem I'm not the only one eating at weird hours ;)17:51
karni*it seems17:51
mhr3i hate myself when i do this :P17:53
karnimhr3: I think there's more of us in this company hahah17:54
karniby the way, parent with 240 = 36 margin + delegate(48) + spacing(72) + delegate(48) + 36 margin --- margin := spacing/2.017:55
karniwtf..17:55
karnisomething here has thick borders lol17:57
karniI sense a problem around cellWidth: delegateWidth + horizontalSpacing17:59
karnimhr3: Well. If the margins (as it is) has always evaluated to value 0, and it didn't bother anyone, I guess I should fix the code to just tell the truth, and assume there are no margins. That's already how tryResponsiveGridView renders.18:08
mhr3karni, well if cellWidth is calculated that way, margin has to be 0 indeed18:27
karnimhr3: I think I need to consult this with design. Margins make little sense there.18:47
karnimhr3: In any case, I'll calling this a wrap. Have a good weekend, buddy :)18:47
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader
mterrySo I have this unity8 autopilot test that fails in jenkins but works for me on the device.  How can I make my test env more like jenkins?20:43
mterrySaviq, mzanetti ^ ?20:43
=== salem_ is now known as _salem
=== _salem is now known as salem_
=== salem_ is now known as _salem

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!