/srv/irclogs.ubuntu.com/2016/06/30/#ubuntu-app-devel.txt

=== _salem is now known as salem_
=== salem_ is now known as _salem
=== _salem is now known as salem_
=== chihchun_afk is now known as chihchun
=== rpadovani_ is now known as rpadovani
=== chihchun is now known as chihchun_afk
=== davmor2_ is now known as davmor2
=== diddledan__ is now known as diddledan
=== chihchun_afk is now known as chihchun
=== salem_ is now known as _salem
=== _salem is now known as salem_
t1mpkalikiana: do you agree with me adding foregroundColor and backgroundColor to ActionBarStyle? https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/159777414:05
ubot5Launchpad bug 1597774 in ubuntu-ui-toolkit (Ubuntu) "Give ActionBar a configurable foreground and background color in the style" [Undecided,New]14:05
kalikianat1mp: Will the color be used for the overflow menu as well? Or will there be a separate style for that?14:15
kalikianaIt makes sense to me, but it'd be good to consider the long term plans14:16
t1mpkalikiana: yes, could be used for the overflow menu14:19
t1mpwait, I forward you an e-mail with a video14:19
t1mpkalikiana: I mailed you a video for the toolbar design14:20
t1mpit has icon scrolling, no toolbar. That's what I'm working on now.14:20
t1mpand if it works well, maybe this pattern will be used in other places also.. so there may be a small chance that it'll replace the overflow panel.14:20
t1mpkalikiana: I could implement it for the actions that are directly in the actionbar now, and later extend it to the overflow14:22
kalikianat1mp: Right, in that use case there's no overflow. My thought was more precsely that the ActionBarStyle applies to both kinds of action bar, and one of them has overflow. And for example once we have an Action that can be active/selected/checked it could use colors in either the bar or the overflow. In other words, do we re-use the same style, or do we duplicate the properties?14:31
kalikianaSince the overflow is a part of another component it's not obvious how you'd access its StyleHints.14:34
t1mpkalikiana: right. It is in the OverflowPanel. We should make that configurable too somehow14:49
t1mpkalikiana: the overflow panel might have (slightly) different colors than the ActionBar itself14:51
t1mpso if we want properties to configure that, we'd need to add more properties in addition to the foregroundColor and backgroundColor14:51
t1mpkalikiana: but perhaps just to the style in the theme, not in Styles since the ScrollingActionBarStyle has no overflow14:52
t1mpand if the overflow would disappear in the future, we have those unused properties there14:52
t1mpkalikiana: we also have defaultNumberOfSlots, overflowIconName, overflowIconSource and overflowText which would be useless if we drop the overflow panel.14:53
t1mpfemma: hello :)14:53
t1mpfemma: do you have an opinion on that^?14:53
t1mpkalikiana, femma: I propose to add the foregroundColor and backgroundColor to the ActionBarStyle now, but not to add properties for configuring the overflow.. yet.14:53
t1mpkalikiana: or do you know of a request for that from app developers?14:54
kalikianat1mp: It's needed for selectable actions, and also section headers, in the overflow15:19
kalikianaThat's not new, I'm just bringing it into this context since you're working on the style.15:20
kalikianaRight now that's not going to be dropped, rather the opposite, we need apps to use it once it can support all use cases.15:21
kalikianat1mp: That's bug 1594281 btw15:24
ubot5bug 1594281 in ubuntu-ui-toolkit (Ubuntu) "Can't override overflow menu delegate in ActionBar" [High,Confirmed] https://launchpad.net/bugs/159428115:24
t1mpoh, right.15:25
t1mpkalikiana: I'm working on a separate style ScrollingActionBarStyle mainly.15:26
t1mpkalikiana: I think we should wait here to see what design says15:26
t1mpwhich features the overflow should have15:26
t1mpmaybe we'll need to expose the full OverflowPanel for the ActionBar, and probably introduce an OverflowPanelStyle too.15:26
t1mpI'm not sure how we can expose that though as part of the style. If we could have something like StyleHints { panel.foregroundColor: "green" } etc that would be cool.15:27
t1mphmz.. but ActionBar won't always have a style with an panel.15:28
t1mponly the current default ActionBarStyle has it, but the scrolling one won't.15:28
t1mpkalikiana: perhaps we need a separate component for the scrolling ActionBar?15:28
t1mpthe thing that we call 'toolbar'...15:28
t1mpbut it has the same API, just a different UX/style.15:29
t1mpwell we have that with the CheckBox and Switch too. So I guess it is ok to have two components.15:29
kalikianat1mp: s/won't/doesn't right now/ considering it almost looks like tabs now, which could easily grow a button showing all items ;-)15:30
t1mpkalikiana: what do you think of an ActionBar and Toolbar component?15:30
kalikianat1mp: I don't agree right now that they are distinct components.15:31
t1mpkalikiana: you imagine an ActionBar that has scrolling AND a panel?15:31
t1mpkalikiana: CheckBox and Switch are different components too15:31
t1mpkalikiana: the styles will need different API. Specifically, the ActionBarStyle needs properties for configuring the panel, and the toolbar does not.15:32
kalikianat1mp: Well, CheckBox and Switch are identical. The styles are different.15:32
kalikianaPretty much the same as we have with the action bars15:32
t1mpkalikiana: yes, that's what I meant. But it means that we will have a Toolbar component15:33
t1mpeven though the implementation will be Toolbar: ActionBar { styleName: "ToolbarStyle" }15:33
kalikianat1mp: As I said the "toolbar" almost looks like notebook tabs and could theoretically have a menu button as well. I don't see why that would never happen.15:33
t1mpit is a scrolling list of action items15:34
kalikianaSo?15:34
kalikianaIf you have 100 maybe you don't want to scroll.15:34
t1mpif it'll have an overflow then we should have just one ActionBar component that can have both scrolling and an overflow15:35
t1mpkalikiana: so, I'll propose for now,15:35
t1mpkalikiana: add foregroundColor and backgroundColor to Styles/ActionBarStyle. Those properties will be useful in any case,15:35
t1mpkalikiana: implement the toolbar only as a separate style in the theme (ScrollingActionBarStyle). No changes (yet) in ActionBar API or in Styles/ActionBarStyle.15:36
t1mpkalikiana: then we and the designers can use the toolbar for a while and see how well it goes, and they can then see if we will unify the ActionBar and toolbar, or they will diverge more.15:36
t1mpperhaps indeed maybe we'll end up with an ActionBar that can have overflow and scrolling at the same time.15:37
t1mpso that means if apps want to use the toolbar, they'll have to put ActionBar { styleName: "ScrollingActionBarStyle" }.15:38
t1mpkalikiana: hmm.. seems like we need 'labs' for the theme ;)15:38
kalikianat1mp: Hmmm what would happen if we removed the style? Would it fallback to the default ActionBarStyle?15:40
kalikianaIn that case it wouldn't be so bad15:40
kalikianaBut I don't know off head what'll happen15:40
t1mpif we just remove it it will break I think. But we can easily create ScrollingActionBarStyle that basically links to ActionBarStyle if needed15:41
t1mpkalikiana: right, they have the same functionality, but different UX.15:41
t1mpkalikiana: if the scrolling actionbar becomes super popular it would even be possible to make that the default style and then all headers will have the scrolling15:41
kalikianat1mp: Sure. My thought was, if we consider this an experimental UX design, and it's not in the public Styles API, and it ends up being dropped, falling back to a regular ActionBar wouldn't break apps.15:42
kalikianaIf it's a Toolbar component aliasing ActionBar it's about the same pain as a style alias.15:43
kalikianaAssuming we wind up maintaining it anyway15:43
kalikianat1mp: So... if we only have a different style, we still end up making it public API, which means it makes no difference in the end.15:44
t1mpwhy we make it a different API?15:45
kalikianat1mp: Public, not different.15:46
t1mponly the styles in Styles/ are stable. We can change the APIs in Themes that are not in Styles15:46
t1mpanyway the API can be the same, except for the styleName15:46
kalikianat1mp: You said it yourself, we'd end up with an alias for the style if we dropped it.15:46
t1mpyes15:47
kalikianat1mp: The only alternative would be, if it was possible to give a styleName that can fallback to the default if it's missing.15:47
t1mpfor the app developer the result would be the same as when we create an alias style15:48
kalikianaYes15:48
kalikianat1mp: I'd say let's go Switch style, it's easier for app devs.15:50
t1mpwith Switch style you mean introduce a Toolbar component?15:59
kalikianaYes16:00
kalikianaSame component, different style16:00
t1mpyou mean a new component that inherits from the other component.16:00
t1mpfor me, same component different style is ActionBar { styleName: "ScrollingActionBarStyle" } while new component is Toolbar { }16:01
t1mpnote that if we have a new component we also need to introduce a new ComponentStyle to configure the colors16:01
=== chihchun is now known as chihchun_afk
t1mpkalikiana: I could add the new Toolbar component to Ubuntu.Components.Labs16:03
kalikianat1mp: That would be nobody can use it right now. Is that what you want?16:04
t1mpthey could use it from labs16:05
kalikianaNo released app can use Labs.16:05
t1mpthen how do we properly test new components?16:06
kalikianaWith test cases...16:08
kalikianaIf you want to release an app regardless of API changes you must bundle.16:08
kalikianat1mp: Labs is defined as, can and will break at any time, ergo you can't use it in the stable release of an app.16:10
t1mpactually,16:11
t1mpwe have the Toolbar component16:11
t1mpwhich combines two ActionBars (one for the delete button, and the other one with multiple actions on the right side)16:12
t1mphmm16:12
t1mpwe can just keep that Toolbar, and set the style of the ActionBar that is on the right.16:12
t1mpso the app developer does not even have to set the styleName16:12
t1mpthat's basically the Toolbar that we discussed here, but a slightly less thin layer over the ActionBar because it contains the ActionBar, not inherits from it.16:13
t1mpit mimics the API that we have for the PageHeader.16:13
t1mpsorry I forgot about this Toolbar component.16:14
t1mpso I don't need to change any API. Just add the foregroundColor and backgroundColor to the ActionBarStyle.16:14
t1mpand when you're using Toolbar, you will automatically get the scrolling instead of overflow.16:14
ahoneybunahayzen: I have pictures that I could summit to that contest!16:20
t1mpkalikiana: so I can introduce the ScrollingActionBarStyle (same API as ActionBarStyle), and use that by default in the Toolbar that already exists.16:21
ahayzenahoneybun, \o/16:21
ahoneybunI took them on the OPO so legally I can summit them16:21
ahoneybunI have rights on them16:21
ahoneybunright?16:21
kalikianat1mp: Okay, even simpler16:22
t1mpkalikiana: ok. I'll work on that. I'll first have an MR to add the color properties to ActionBarStyle and a second MR that adds the ScrollingActionBarStyle in the theme and that updates Toolbar to use it.16:23
ahoneybunahayzen: I'm thinking https://www.flickr.com/photos/44748317@N08/27572569546/in/album-72157669534030306/16:23
ahoneybunthis one16:23
kalikianat1mp: Sounds good16:23
ahayzenahoneybun, awesome :-)16:23
t1mpflickr puts ads inbetween the photos now :s16:25
t1mpoh what has become of this world? ;)16:25
t1mpwtf.. and my flickr account disappeared16:29
t1mpI didn't use it for a year or so and I was planning to quit it.. but it is strange that it disappears without contacting/warning me about it.16:29
ahoneybunodd16:33
ahoneybunUT does not scale nicely16:35
ahoneybunwallpapers anyway16:35
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
ahoneybunahayzen: your mainView.location way does work18:02
ahoneybunbut I can't get it to do what I want18:02
ahayzenahoneybun, \o/ .... /o\18:02
ahoneybunXD18:02
ahoneybunahayzen: http://pastebin.ubuntu.com/18185579/18:03
ahoneybunthat's the issue18:03
ahoneybunonClicked needs to set the mainView.location18:04
ahayzenonClicked: { mainView.location = model.id }  or model.name or something?18:04
ahoneybunlet's see18:05
ahoneybunno wait18:05
ahoneybun locationModel.selectedIndex = index18:05
ahoneybunthat picks from the List18:05
ahoneybunI've changed the index thing18:06
ahayzenyup you have like two listmodels IIRC18:06
ahayzenso you could either put one in the mainview instead, or whenever you set the index, ensure that your location property is updated18:06
ahayzenand then make sure it reads the location when it starts18:07
ahoneybunmm18:07
ahoneybunnever is simple here with QML18:07
ahayzenheh18:07
ahayzeni would probably have one central ListModel for your locations inside the mainview18:07
ahoneybunwell the locationModel is needed to display the API output18:08
ahoneybunI don't want it in the mainview18:08
ahoneybunkeep this in the Settings.qml18:08
ahayzenisn't the other page reading from the locations as well?18:08
ahoneybunI can't just have it onClicked and that gets set to mainView.location?18:08
ahoneybunI've removd it18:09
ahayzenyeah you can do that18:09
ahayzenah ok18:09
ahoneybunI want to keep the main.qml clean of that18:09
ahayzenmaybe just do ... onClicked: { mainView.location = model }18:09
ahoneybunuse settings.qml to search and set the location then the main.qml will display that18:09
ahayzenand make sure the property in the mainview is like ... property var location;18:09
ahayzenthen you'll be able todo mainView.location.name or mainView.location.id etc to get the current one18:10
ahoneybunwell you put it as string but I can change it18:10
ahayzenthen in the settings page you need it to set the correct selectedIndex when it loads18:10
ahoneybun!!!18:11
ahoneybunwell that worked18:11
ahayzen\o/18:12
ahoneybunmm it is not storing it for the next launch18:12
ahoneybunwill need a way to tell the user to go to settings18:12
ahoneybunso city and zip code search works this way18:13
ahoneybunsweet18:13
ahayzenyeah to store it...you'll need to put that location property inside a Settings {} object as we tried before18:14
ahoneybunmm18:14
ahayzenbut remember you have something already called Settings so rename the import to like QtSettings18:14
ahoneybunwell using a new zip will kinda limit api calls18:14
ahayzenhttps://developer.ubuntu.com/api/apps/qml/sdk-15.04.5/Qt.labs.settings.Settings/18:15
ahoneybunpopey: your site is down18:15
ahayzenbut do like "import Qt.labs.settings 1.0 as QtSettings" ... and then QtSettings {}18:15
ahoneybunin the Settings.qml18:15
ahoneybun?18:16
ahoneybunoh18:17
ahoneybunmm QtSettings cannot be used as a type18:18
ahoneybunahayzen: I might have to start making a Icon finally lol18:20
ahayzenhehe :-)18:20
ahayzenahoneybun, i mean to store your mainView.location you could use the Qt.labs.settings for that... anyway gotta run18:20
ahoneybunthanks18:21
ahoneybunmm my Nexus 7 does not want to work with the SDK18:31
ahoneybunbut the N4 does18:31
ahoneybunseems it is not adding the Kit right18:32
ahoneybunmhall119: ping19:49
ahoneybunhttps://github.com/ahoneybun/uCycle/blob/master/uCycle/uCycle.png19:49
ahoneybun^19:49
=== salem_ is now known as _salem

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