/srv/irclogs.ubuntu.com/2016/04/20/#ubuntu-app-devel.txt

cerealguyevening, all.  interested in contributing.  read this page (https://wiki.ubuntu.com/ContributeToUbuntu#Writing_Code).  not sure what it means by "Look through the list of Ubuntu specifications on Launchpad. Pick one that interests you, and hopefully there should be enough information to begin with an implementation."  can anyone clarify?01:02
=== athairus is now known as afkthairus
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
nik90davidcalle, ping08:02
davidcallenik90: pong08:13
=== sverzegnassi_ is now known as sverzegnassi
=== _salem is now known as salem_
t1mpmardy: hello14:06
t1mpmardy: I was checking out the bug that you reported https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1572525 and left a comment14:06
ubot5`Launchpad bug 1572525 in Canonical System Image "[regression] Double header height is set as flickable topMargin" [Undecided,Incomplete]14:06
t1mpoh I see there are more comments added there that I didn't see yet14:07
* t1mp reading14:07
mardyt1mp: well, I don't mind changing my app (if there is a workaround), but I think that such change should be communicated well in advance14:09
t1mphmm14:16
t1mpindeed, it seems that with the previous version the old topMargin was ignored when setting it to the header height14:16
mardyt1mp: and that's also how it's documented to work14:17
t1mpright14:18
t1mpthat needs to be updated14:18
t1mpmardy: would this work for you? https://code.launchpad.net/~tpeeters/ubuntu-ui-toolkit/topMargin-bug1572525/+merge/29238614:26
mardyt1mp: I don't think that this is the correct approach; I'm writing a comment to the bug, but in short:14:27
mardyt1mp: A) I think that the other bugs can be fixed while still retaining the old behaviour14:28
mardyt1mp: B) I have yet to see a user complaining about the old behaviour (did we have any bugs for that?)14:29
mardyt1mp: C) If you go forawrd with this, please announce it widely, inviting developers to test their apps with the new UITK version14:29
t1mpmardy: A) the change was needed to fix the attached bugs. Storing the old value and reverting it got broken in some cases where multiple PageHeaders are setting the same Flickable (which was happening in some cases even in our UITK gallery app) and it breaks the margins when they set/unset the flickable property in the wrong order (which cannot always be controlled)14:34
t1mpB) I think not, I would have linked those to the MR. But there were concerns and requests to update the behavior for when apps do set a topMargin initially and don't want that reverted by the PageHeader (mainly faenil was arguing for that, I'm not sure if he has an app that needs this)14:35
t1mpC) Right. But I think this landed already.14:35
t1mpI can still send an e-mail to the mailing list14:35
mardyt1mp: it has landed on the rc images; I guess most people are using the stable ones14:36
faenilB) is mainly about common sense. The header was previously deliberately preventing the developers from using a Flickable property14:36
faenilI don't think you need bugs for that, we all agree that shouldn't be how it works :) (I hope :D)14:37
mardyt1mp: let's put it this way: if I find a way to revert the behavioural change while still fixing those bugs, would you consider such a MP?14:38
mardyfaenil: no, I don't, it's a property nobody uses (and which nobody could have used, since it was not working right)14:38
faenilmardy: the fact nobody uses it does not justify the old behaviour, imho. It is still a property that should be left available to developers14:39
mardyfaenil: I would agree with you if we were starting from a clean plate, but not at this point14:39
faenilmardy: and in fact, you were using it...14:39
faenilmardy: I'd argue the plate is still quite clean, it's better if we fix these things sooner rather than later...but sure :)14:39
mardyfaenil: I was using it, because that was the right thing to do given the documented behaviour14:40
faenilmardy: wasn't the documentation saying that Header would set the topMargin? why were you setting it? ;)14:40
mardyfaenil: if you want to get it fixed, I would suggest: 1) file a bug and 2) let's fix it by adding an additional property to the header14:40
mardyfaenil: please have a look at the attached test case14:41
faenilmardy: I had14:41
faenilI did*14:41
mardyfaenil: I was setting the topMargin to the items, so that when they were scrolled into the view, they would already have the proper topMargin (so that the user wouldn't see the page content jump)14:42
t1mpmardy: technically, UITK 1.3 and the PageHeader are still development versions, 1.2 is the stable one.14:43
faenilt1mp: let's start from one thing, isn't it true that mardy's code should have behaved the same with the old code as well? at least by design14:44
dpmt1mp, quick question: what's the standard way of building a qmake-based app? Just run qmake $FILE.pro? Or does the build need to be set up in a different directory, etc?14:44
t1mpmardy: I saw your use case. I think it is not a very common one, but indeed it is one that we did not think of before.14:44
faenilt1mp: i.e. was mardy's code "working" before because of a bug?14:45
faenil(I put working in quotes to mean it behaved as he expected it to behave)14:45
t1mpdpm: I think you don't have to add the file parameter. Just 'qmake' in the correct directory.14:46
dpmt1mp, cool, thanks14:46
t1mpqmake && make, that is14:46
t1mpdpm: if you need out-of-source builds, I think that's possible too. But zbenjamin (and others) would know more about that than I do.14:47
faenilmardy: anyway, I agree it should have been communicated, if it was a behaviour change. Afaik your code should have produced the same behaviour before the change14:47
t1mpfaenil: uhm. Theoretically the old code should have behaved like that, but now that I look back at the changes of the MR it looks like the old code did not change the value of topMargin relatively, but just overwrote it with the header height14:47
faenilt1mp: of course it didn't actually behave like that :D but the intention was that it should have, right?14:48
faenilthe fact that mardy's code behaviour change was due to a *bug* in the old code14:48
faenilnot to the new change, right?14:48
t1mpthe old code was supposed to work with flickables that had an initial topMargin of 014:49
t1mpso let's say, the behavior for this use case would have been undefined14:49
faenilthat's quite a strong assumption :|14:49
t1mpwell, if an app has a topMargin in the flickable set, and you use a header with that flickable, in most cases, the intended behavior of the app developer would have broken14:51
faenilt1mp: so, the behaviour of mardy's code, based on your words, was expected to be "undefined"14:51
mardyt1mp: yes, as I understand the old code was *replacing* the topMargin, the new code is *adding*14:51
t1mpso you can call the old behavior a bug, but mardy is right that in this specific case he used that behavior (or bug) to get the desired behavior14:51
t1mpmardy: yes, that is correct14:51
faenilmardy: the old code was ignoring your topMargin, basically14:52
faenilt1mp: of course14:52
t1mpfaenil: it ignored until you unset Header.flickable, then it was supposed to restore the old topMargin (which was broken)14:52
t1mp(*which was broken in some corner cases)14:52
faenilyep14:52
mardyfaenil: yes, it was overriding it while the flickable was connected to the header; but that's exactly how it was documented to work, so I was not relying on any undefined behaviour14:53
faenilmardy: sorry if I repeat, wasn't the documentation saying that the header would set topMargin?14:53
mardyfaenil: correct, it was14:54
faeniland it was also saying that when changing the flickable the topMargin would be reset to 0..14:55
mardyt1mp: as a sidenote, your workaround works mostly fine; but I lost the back navigation; any way to restore it?14:55
faenilso, I'm not sure I understand why you were expecting your topMargin to have any effect14:56
t1mpmardy: I removed the PageStack from the example code because I thought it was not relevant for the bug14:56
t1mpI tried to simplify it more14:56
t1mpmardy: oh, right. The PageHeader is no longer directly in the Page on top of the PageStack.14:56
t1mpmardy: PageHeader { leadingActionBar.actions: [ Action { text: "back"; iconName: "back"; onTriggered: pageStack.pop() } ] }14:57
t1mpsomething like that14:57
mardyt1mp: ok, thanks14:57
t1mpfaenil: is this a better description?14:59
t1mp * When the header is invisible because its visible property is false, or the header14:59
t1mp * has no parent, its height for the topMargin is considered 0.14:59
mardyfaenil: sorry, I missed your last line; so, if I remove the topMargin from my snippet, when I start swiping the screen horizontally, I see the next item appear14:59
mardyfaenil: it appears anchored at the top of the screen; then, as soon as it becomes the currentItem, it jumps down (because the topMargin gets changed)15:00
mardyfaenil: by setting the topMargin to be the same as the page header, I was avoiding that jump15:01
t1mpmardy: as you can see in the example code I added to the bug, it seems like a case where you would want multiple headers (which was not possible with Ubuntu.Components 1.2)15:01
t1mpmardy: perhaps a designer could comment on what is the best way to think about this15:02
mardyt1mp: maybe; your suggestions works fine, so I'm OK with it -- I'm still not enthusiastic about it, because it makes the delegates heavier (each one has its own header), but I can live with that15:03
t1mpmardy: otherwise, the single header might still jump up/down when you change the flickable, depending on the contentY of the flickable15:03
* faenil reads15:05
t1mpfaenil: I had problems coming up with a clear description there15:06
t1mpfaenil: what I tried to say is that when you make the header invisible, the header height is subtracted from the topMargin again15:06
t1mpfaenil: basically what you requested, the header not to affect the topMargin when it is not visible15:06
t1mpso maybe you have a better description :)15:06
faenilso, just say that it behaves the same way as when you unset the flickable?15:06
faenil(and for the readers: I made that request because that's the way QtQuick layout components work, they ignore items which are !visible or have a null size, not because I'm schizo :D)15:07
faenil(it's to be consistent with what QtQuick developers are expecting)15:07
t1mpyeah, the request makes total sense :)15:08
faenilt1mp: just giving some background, as it seems like I just came and asked for random things, lol15:08
t1mpfaenil: right. That's what it usually seems to me like at first, too :)15:08
faenil(and, of course, my requests were discussed with team leads etc :D)15:08
faenilt1mp: LOL15:09
* faenil slaps t1mp with a trout15:09
faenilyou deserved that :D :P15:09
* t1mp pulls the trout out of faenil's hands and eats it15:09
t1mp:p15:09
faenilhahhaha15:09
faenilgood one15:09
t1mpfaenil:  * Making the header invisible has the same effect on the topMargin as unsetting15:12
t1mp * the flickable.15:12
* zsombi comes to check the chat about the inner-flickable vs PageHeader behavior bug15:13
faenilmardy: ok, I understand your usecase better now. Let me think (I'm also in quite of a rush with the deadline for a proto :/ )15:16
t1mpmardy, faenil, zsombi: I propose I update the docs (see the MR attached to the bug), and I send an e-mail to ubuntu-phone15:21
zsombit1mp: ok, good!15:21
t1mpI guess also to [ubuntu-touch-coreapps]15:22
faenilt1mp: better if we also find a solution to mardy's usecase, as it will be useful. (And maybe we can add that to Header's docs as well)15:23
faenila solution which is not a hack, that is :)15:23
t1mpfaenil: I proposed a solution with a link to a pastebin in my comment on the bug15:23
t1mpI don't think it is a hack15:23
zsombit1mp: commented15:23
zsombithe MR15:23
faenilt1mp: as mardy says, adding one Header for each flickable is a bit heavy :/ but sure, if we can't find anything else...15:24
t1mpfaenil: there are multiple vertical flickables that can be swiped horizontally, and they all use a single header. From UX-point-of-view that seems a bit weird to me. So I think we need UX input for the use case15:24
t1mpFemma: hello :)15:24
t1mpfaenil: perhaps you could execute mardy's code and show it to Femma?15:25
zsombimardy: I still don't get why you need to set the delegate's inner Flickable to control the header...15:25
faenilt1mp: I think that's what you're going to have to implement given the new animations of the Sections component, instead :P15:25
faenil(you remember? :D)15:25
t1mpzsombi: ok. I pushed an update.15:26
t1mpfaenil: new animations???15:27
t1mpfaenil: ah, you mean the swiping between pages15:27
faenilt1mp: sdk/design sync, a couple of weeks ago...15:27
faenilyes15:27
faenilbetween Sections .p15:27
t1mpfaenil: I think of Sections as a separate component. The swiping would be between Pages :)15:27
t1mpbut they would need to be linked to Sections15:28
faenilt1mp: doesn't matter :) it's still 1 header and multiple pages15:28
t1mpfaenil: hmm, yeah something to think about, because also each Page has its own header now..15:28
t1mpI don't remember if transitions in the header were included in the designs15:29
faenilI think there was no transition in the header, because I remember raising the problem "we're in trouble" :D15:30
faenilmardy: I thought                         topMargin: parent.ListView.isCurrentItem ? 0 : mainPage.header.height15:34
faenilwould help15:34
faeniland it does, at the beginning15:35
faenilbut then Header breaks that binding with its assignment15:35
faenilso it only works at the beginning..15:35
=== chihchun is now known as chihchun_afk
t1mpmardy: actually your code seems to work fine for me...15:39
t1mpI don't know why15:39
zsombit1mp: you hold it right then :D15:39
t1mpnevermind, I know why. Indeed with an older UITK it behaved differently15:39
faenillol :D15:43
t1mpI'm wondering whether maybe the header should just be locked in this case15:47
faenilmardy: do you see any way how to make everyone happy without changing the API?15:50
t1mpmardy: does this code in the Flickable do what you want?                         topMargin: ListView.isCurrentItem ? 0 : mainPage.header.height15:50
t1mpI think you'll get some unwanted topMarginChanged events there while the values are updating....15:51
faenilmardy: it doesn't work after Header breaks the bindinwg15:51
faenilit only works at the beginning15:51
t1mpoh right it does break the binding15:54
zsombit1mp: happrove16:05
zsombi+d16:05
t1mpzsombi: thanks16:06
t1mpI guess we'll still have some discussion about mardy's use case, but the doc fix is valid anyway16:06
t1mpI sent the e-mail on the mailing lists16:30
=== shuduo is now known as shuduo-afk
=== chihchun_afk is now known as chihchun
bzoltan_mhall119:  do you know how to convince the webapp container to start with a given zoomed mode?17:05
bzoltan_dbarth: alex_abreu: ^17:09
alex_abreubzoltan_, it is not possible atm17:10
alex_abreubzoltan_, you should add a feature request17:10
alex_abreubzoltan_, but I am not sure how useful it would be17:11
bzoltan_alex_abreu: there are silly webservices where the layout is odd...ie. for example it scales well to landscape, but does not adapt to portrait mode ... a forced double zoom would help. But it is not that important17:12
alex_abreubzoltan_, ok, I am not sure it would qualify as proper general use cases yet :)17:14
bzoltan_alex_abreu:  I appreciate your very gentle and kind  way to say that "bzoltan_ that is stupid, make up some better usecase" :D17:17
alex_abreubzoltan_, well not really that ... but it would need a stronger use case indeed :)17:20
=== chihchun is now known as chihchun_afk
=== dpm is now known as dpm-mostly-afk
t1mpmardy: did you say that the change in the PageHeader affected your app when installing rc-proposed? it looks like the last UITK version that we released is r1938 which does not include the change20:19
t1mpah no, not true. I was looking at the wrong change. This was r1931 so it is released20:20
=== afkthairus is now known as athairus
=== salem_ is now known as _salem

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