/srv/irclogs.ubuntu.com/2016/02/24/#ubuntu-app-devel.txt

=== salem_ is now known as _salem
zsombikarni: still here?05:59
zsombikarni: sorry, dude, I was away in the past daze06:00
zsombikarni: so, if you check the docs, apl.removePage(anyPage) removes the pages added to the tree of pages which have the _anyPage_ as ancestor06:01
zsombikarni: therefore if you call it on the apl.primaryPage, that call will remove every page that has been added to the APL except the primary one.06:02
zsombikarni: and this is supposed to be done synchronously, there is no async requirement in cleanup06:03
chesedofor a js scope, where should images (emblems) be stored and how will their uri be?06:50
karnizsombi: np! yes, I was most interested if it was sync, because I added a page right after that call. in any case, it's all good now :)07:58
zsombikarni: so you got it sorted?08:24
karnizsombi: yes, thank you. works as expected :)08:25
zsombikarni: huhh.. glad to hear :D08:25
karnizsombi: I had a code that re-set the dialog in a destructor of another (which after switching to APL made no longer sense), thank you :)08:26
karni:))08:26
zsombi;)08:26
=== dbarth__ is now known as dbarth
nik90faenil, Hi, I need your opinion. In Podbird we have an episodes page which looks like http://imgur.com/GdIFII6. The listitemlayout seems like the most logical/perfect fit for this scenario. However I am not sure what to do about the little paper icon that denotes whether an episode has been downloaded or not. Do you have any suggestions?10:53
nik90faenil, if not for the little paper icon, it would be a simple title.text and subtitle.text implementation.10:53
faenilnik90: exactly...because of that Icon, you have to use SlotsLayout with a custom "mainSlot"10:54
faenilavoid using Column for the label + Row for the icon ad subtitle though, let's not slow it down :)10:54
nik90faenil, but would I still get the same performance optimization that you get with ListItemLayout?10:55
nik90that's exactly how we are doing it now, and its killing performance in this page which shows an average of 200 listitems10:55
faenilwhat do you mean? you're using SlotsLayout now?10:55
nik90No no...atm we're using a custom list delegate. And in that custom delegate I used column+row to do the positioning that you see in the screenshot which kills performance.10:56
faenilListItemLayout derives from SlotsLayout, and adds 3 labels with a kind-of hardcoded positioning to improve perf10:56
faenilnik90: ah ok, sure :)10:56
nik90When I switch to SlotsLayout, how do I go about positioning the labels + icons? Using Anchors?10:56
nik90would that help improve performance?10:56
faenilthe main performance improvement will be moving to SlotsLayout10:57
faenilinstead of the old ListITems module10:57
faenil(if you're using that module)10:57
nik90No I'm using ListItem (new ones) without ListItemLayout or SlotsLayouts10:57
faenilthen getting rid of Column and Row should be a bonus, you should get higher perf with anchors, yes10:58
faenilmmm and that's killing performance? strange...10:58
faenilcan I see the delegate?10:58
nik90sure, one sec10:58
nik90faenil, http://bazaar.launchpad.net/~michael-sheldon/podbird/trunk/view/head:/app/components/ListDelegate.qml10:58
nik90faenil, do note that it is a very generic delegate that we use in several places which is why it is big10:59
nik90however it is managed using loaders and components that are only loaded when required.10:59
faenilahm you're not using Row, you're using RowLayout and plenty of columns :D10:59
faenilRowLayout is much heavier than Row, as far as I could see11:00
nik90I figured not explicitly defined left and right anchors and using RowLayout will help code readability.11:00
nik90but I see that it comes performance drawback11:00
faenilyeah, do you need RowLayout though? or can Row be enough for you?11:01
nik90I could do that and bring back the anchor definitions.11:01
faenilwhy anchors? it's still Row11:02
nik90faenil, true but then the title text will not elide/wrap correctly with either defining the width/anchor11:02
faenilI'm asking if you can use Row instead of RowLayout11:02
faenilwithout* defining width, you mean11:02
nik90yes11:02
nik90which RowLayout takes care of automatically11:03
faenilsure, you'd have to creating a binding on width11:03
nik90okay11:03
faenilbut that's probably much better than using RowLayout, if you need it just for that11:03
faenil(but please test and let me know)11:03
nik90I needed multiple columns to show a progress bar as seen in http://imgur.com/IyTasJj11:03
nik90its a bit complicated :P since it is generic11:04
nik90I realize that now, and will stick to using specific layouts for individual pages. should make it easier to handle11:04
faenilwhich is a problem in itself :) you shouldn't be reusing the same delegate for different views with different needs11:04
nik90:)11:05
faenilyep, of course promote code reuse11:05
faeniljust don't but the burdain on pages that don't need it :)11:05
faenildon't put*11:05
nik90yes11:05
nik90I dint think RowLayouts and 2 column would hit performance so much. But I suppose saving even few ms on loading item of each delegate matters here11:06
faenilnik90: have you tried QtC profile?11:07
faenilprofiler*11:08
nik90faenil, I have used it though not as much as I should be.11:08
nik90I profiled podbird when we switched from the old listitems to the new one.11:08
faenilthat should quickly show you the difference in instantiation time11:09
* nik90 checks now11:09
nik90faenil, If I for now forget about the paper-icon and use ListItemLayout, 200 listitems just loads almost instantly :D. I will check with podbird designer if we can show the paper-icon somewhere else in the trailing slot perhaps.11:37
faenilhaha :)11:37
faenilglad to hear :)11:38
faenilI still have something in my TODO to further improve SlotsLayout (and ListItemLayout as a consequence) performance :) so that could still get a bit faster11:38
nik90wow!11:40
faenilnot sure by how much, I'm looking forward to having time to get to that :)11:42
faenilprobably just a tiny bit...but it's all good :D11:42
nik90faenil, How do I prevent title.text from being elided? I set elide: Text.ElideNone and set it to wordWrap. However now I just see it get cut off. If it helps I also set width: layout.width - trailingSlotIcon.width11:53
nik90I noticed that only summary.text wraps. Both title and subtitle just elide. Is that by design?11:53
faeniltalking about ListItemLayout?11:59
faenilnik90: ^11:59
nik90faenil, yes11:59
faenilnik90: title and subtitle have max 1 line, summary has 2, that's the default value by design12:01
faenilof course that can be customized12:01
faenil(even though you will at that point not follow the optimal design, I guess)12:02
faenilcheck out "maximumLineCount" property of Text12:02
faenil(QML Text)12:02
nik90faenil, podcast titles are quite big, cant do much about it :/12:02
nik90If I elide, we lose out quite a bit12:02
faenilnik90: and since you had this question, I guess I should add that info to ListItemLayout documentation12:03
nik90faenil, hmm..If I set maximumLineCount: 2, then the title's 2nd line and subtitle.text collide vertically.12:04
faenilnik90: that was fixed in December, I believe...I guess there hasn't been a new release since, or you don't have the updated packages :)12:04
faenilin Dec or beginning of Jan, don't remember when I fixed it12:04
nik90faenil, testing this on rc-proposed phone image..pretty sure I have updated packages..It conflicts between title and summary. Let me try changing summary to subtitle.12:05
faenilnik90: yes, that's what I fixed12:05
faenilcan you check what version of the uitk you have on the phone?12:05
nik90faenil, 1.3.1795+15.04.20160106-0ubuntu112:07
nik90will update to today's image and check again if the bug persists12:08
nik90faenil, running latest rc-proposed channel, with 1.3.1795+15.04.20160106-0ubuntu1..still has bug. Shall I report it?12:12
faenilnik90: no, wait for me to check what version has the fix12:13
nik90ack.12:13
faenilnik90: bad luck, it went in for r1800 :D12:14
nik90ah man :P12:14
faenilso, all good, you'll get the fix as soon as the uitk packages are updated12:14
faenil(we're at 1869 now)12:14
nik90yup, will wait it out. thnx for checking.12:15
faenilnik90: p12:16
faenilnp12:16
faenilnik90: just use 1 line for the moment, keep tight :D12:16
nik90faenil, sure12:17
=== _salem is now known as salem_
timpjust published: https://developer.ubuntu.com/en/blog/2016/02/24/pageheader-tutorial/12:28
Elleonik90: what about prepending the paperclip emoji character to the second line of text in the list item? Should look visually very similar, so we get to keep the paperclip and get the speed improvements :) http://emojipedia.org/paperclip/12:30
nik90Elleo, that should work! will do that now.12:33
Elleonik90: cool :)12:34
nik90Elleo, I wasn't exaggerating though..the episodes page loads really fast now :)12:34
Elleoawesome :)12:34
nik90timp, really good tutorial! Thnx! https://developer.ubuntu.com/en/blog/2016/02/24/pageheader-tutorial/13:07
timpnik90: thanks :) you are welcome.13:10
faenilnik90: oh before I forget...also try getting rid of as many "alias" as possible13:44
faenilnik90: i.e. don't alias title.text, title.here, title.there13:45
faeniljust expose title and the client components will set title.text, title.here, title.there13:45
faenilthat means many less bindings to create13:45
nik90faenil, ok. So basically create a property string title, and then use that within the client components. thnx13:52
faenilnik90: no, alias the full component, not its properties13:54
faenilproperty alias title13:54
faeniland then client will do13:54
faeniltitle.text : "bla", title.color: "boo"13:54
faenilthat saves you 1 alias creating (which is a binding, which is expensive)13:55
faenil1 alias per property13:55
faeniland that contributes to faster list scrolling :D13:55
nik90ok13:56
faeniljdstrand: I created https://bugs.launchpad.net/ubuntu/+source/click-apparmor/+bug/1549369 as we have to get it fixed, no matter what Snappy does, imho16:38
ubot5Launchpad bug 1549369 in click-apparmor (Ubuntu) "Apparmor profiles not updated after deploying an app without increasing its version" [Undecided,New]16:38
faenilwe have to get it fixed in the .click world, because that's what the developers are using :)16:39
=== davidcalle is now known as davidcalle_afk
boghisonHi! I need some help: In a Javascript scope, when changing departments, a new query isn't run, so how do I monitor this? (for some reason there's a log in the console, something about setting a nav id)20:13
=== ljp is now known as lpotter
m_jimmerHi there I am having a odd issue with qmlregisterSingletonType.  The issue has to do with signals and sending them to a Connections point in QMl.  Here is the Simple code http://pastebin.com/4H9ES2SX20:50
m_jimmerall in all it is not firing the signals for anything that is emit20:50
m_jimmerOr maybe it is but the connection point to QMl is not reviving them .  Either way I can not figure it out20:50
=== salem_ is now known as _salem
nik90ahayzen, ping21:56
ahayzennik90, pong21:56
nik90ahayzen, hey, I wanted to ask you about the Playlist support. How easy and stable is the implementation?21:57
nik90For Podbird, we just a Queue support. So no need to create/rename/delete playlist stuff21:58
nik90I was thinking of saving the queue in local storage, and then passing it to playlist var in Multimedia{}. Does that make sense?21:58
ahayzennik90, it is *pretty* stable but still some missing features22:02
ahayzennik90, i wanna fix it so you can then just do save()/load() on the playlist22:03
ahayzennik90, http://bazaar.launchpad.net/~music-app-dev/music-app/trunk/view/head:/app/components/Player.qml is the file to look at22:03
ahayzennik90, we currently save the queue to/from a localstorage db22:03
ahayzennik90, i'm gonna go in a minute, but i'll be about tomorrow afternoon onwards if you wanna run through things?22:04
nik90ahayzen, sure22:06
nik90tty later22:06
nik90will look at it22:06
ahayzenawesome :-) leave msgs on telegram if you have any immediate questions22:06
ahayzeno/22:06
m_jimmernik90, I am in the middle of exposing QSQLDatabase QSqlQuery QSQlModel QSQlRecord to QML I can hand that off in maybe 3 hours or so22:24
nik90m_jimmer, ?22:25
m_jimmerI also need almost the same thing as you.  But found that LocalStorage was missing many things and creating things like models from Arrays was not nice in the profiler22:25
nik90ah ok22:25
m_jimmernik90, give me 3 hours or so.22:26
nik90m_jimmer, I will not be online in 3hrs..its 11.30 PM here..can u link it to my email (nik90 at ubuntu dot com)22:27
m_jimmernik90, Ok will do.  I just finished QSqlDatabase.22:30
elimistevepopey: Got any estimates for how many scopes will be entering https://developer.ubuntu.com/en/showdown/ ?22:39
elimisteveAnyone? I assume there will be several JS-based scopes in particular22:39

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