Hi Piotr, just committed a fix. Now the parent is the right one. But I think we need something more regarding positioning since if I use for example an inner Card container I see it partially displaced to the right due to the new parent, but still showing at the bottom. I think you want to show it near the bottom of that parent right?
El mié., 21 ago. 2019 a las 11:52, Piotr Zarzycki (< piotrzarzyck...@gmail.com>) escribió: > I forgot paste link to the code [1] > > [1] https://paste.apache.org/r5gjr > > > śr., 21 sie 2019 o 11:52 Piotr Zarzycki <piotrzarzyck...@gmail.com> > napisał(a): > > > What do you propose ? > > > > I wrote my own Snackbar but it doesn't work for some reason. It seems to > > me that my snackbar ignores SnackbarView and SnacbkarController - I'm not > > sure how to force it to use - maybe the solution is just addBead(new > > SnackbarView). I will see, but in the meantime once you analyze the code > > let me know. > > > > Thanks, > > Piotr > > > > śr., 21 sie 2019 o 11:34 Piotr Zarzycki <piotrzarzyck...@gmail.com> > > napisał(a): > > > >> Look into show method and see what is actually happening with that > >> parent. > >> > >> śr., 21 sie 2019 o 11:30 Carlos Rovira <carlosrov...@apache.org> > >> napisał(a): > >> > >>> Hi Piotr, > >>> > >>> I'm looking to SnackBar and see that it already has a "parent" > property. > >>> Using that parent property does not work as expected? maybe is just a > >>> matter to see if this is a bug > >>> > >>> static public function show(message:String, duration:int = 4000, > >>> actionText: > >>> String = null, parent:Object = null) : Snackbar > >>> { > >>> var snackbar:Snackbar = new Snackbar(); > >>> snackbar.message = message; > >>> snackbar.duration = duration; > >>> snackbar.action = actionText; > >>> snackbar.show(parent); > >>> return snackbar; > >>> } > >>> > >>> El mié., 21 ago. 2019 a las 11:22, Piotr Zarzycki (< > >>> piotrzarzyck...@gmail.com>) escribió: > >>> > >>> > Not sure what do you mean, by that. I'm using Snackbar like that: > >>> > > >>> > SnackbarParent.show("My Message", 4000, null, this); > >>> > > >>> > Do you want me to provide you example with changes where parent is > >>> being > >>> > taken into account ? Where I do not add Snackbar to body, but to > >>> parent ? > >>> > > >>> > śr., 21 sie 2019 o 11:18 Carlos Rovira <carlosrov...@apache.org> > >>> > napisał(a): > >>> > > >>> > > Can you put some example code on how you'll configure a parent in > >>> > SankBar? > >>> > > > >>> > > El mié., 21 ago. 2019 a las 11:11, Piotr Zarzycki (< > >>> > > piotrzarzyck...@gmail.com>) escribió: > >>> > > > >>> > > > What kind of property do you have in mind, cause I thought rather > >>> about > >>> > > > change like: > >>> > > > > >>> > > > If parent is provided - this parent is a container for snackbar, > >>> if not > >>> > > > body is container default. - It is a breakage change rather. > >>> > > > > >>> > > > śr., 21 sie 2019 o 11:01 Carlos Rovira <carlosrov...@apache.org> > >>> > > > napisał(a): > >>> > > > > >>> > > > > Hi Piotr, > >>> > > > > > >>> > > > > I think is ok to make that change. Normally SnackBars use to be > >>> > placed > >>> > > at > >>> > > > > App level, but we can have a property to configure it and > >>> defaults to > >>> > > > > application if is not configured. Feel free to do that change. > >>> > > > > > >>> > > > > Thanks! > >>> > > > > > >>> > > > > > >>> > > > > > >>> > > > > El mié., 21 ago. 2019 a las 9:13, Piotr Zarzycki (< > >>> > > > > piotrzarzyck...@gmail.com>) > >>> > > > > escribió: > >>> > > > > > >>> > > > > > Hi Guys, > >>> > > > > > > >>> > > > > > I'm using Snackbar as an way of notification in application. > >>> The > >>> > > > problem > >>> > > > > is > >>> > > > > > that Snackbar is always showing on a body which place it in > >>> the > >>> > > bottom > >>> > > > > of > >>> > > > > > application. I think this is not good, cause for example my > >>> > > application > >>> > > > > has > >>> > > > > > footer which has similar color to this snackbar, so you > >>> basically > >>> > > > doesn't > >>> > > > > > see too much. > >>> > > > > > > >>> > > > > > It think Snackbar should have ability to show in a place > which > >>> we > >>> > > would > >>> > > > > > like to, currently when we passing parent it's basically to > >>> use for > >>> > > > > taking > >>> > > > > > "body" instead of displaying on the parent. [1]. > >>> > > > > > > >>> > > > > > I will create probably locally my own Snackbar which is > >>> displaying > >>> > on > >>> > > > my > >>> > > > > > parent, but what do you think about this actually ? Shouldn't > >>> be > >>> > > > changed > >>> > > > > ? > >>> > > > > > > >>> > > > > > [1] > >>> > > > > > > >>> > > > > > > >>> > > > > > >>> > > > > >>> > > > >>> > > >>> > https://github.com/apache/royale-asjs/blob/8171f1e8982fef9b45bfb9039749dc9910191955/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Snackbar.as#L192 > >>> > > > > > > >>> > > > > > Thanks, > >>> > > > > > -- > >>> > > > > > > >>> > > > > > Piotr Zarzycki > >>> > > > > > > >>> > > > > > Patreon: *https://www.patreon.com/piotrzarzycki > >>> > > > > > <https://www.patreon.com/piotrzarzycki>* > >>> > > > > > > >>> > > > > > >>> > > > > > >>> > > > > -- > >>> > > > > Carlos Rovira > >>> > > > > http://about.me/carlosrovira > >>> > > > > > >>> > > > > >>> > > > > >>> > > > -- > >>> > > > > >>> > > > Piotr Zarzycki > >>> > > > > >>> > > > Patreon: *https://www.patreon.com/piotrzarzycki > >>> > > > <https://www.patreon.com/piotrzarzycki>* > >>> > > > > >>> > > > >>> > > > >>> > > -- > >>> > > Carlos Rovira > >>> > > http://about.me/carlosrovira > >>> > > > >>> > > >>> > > >>> > -- > >>> > > >>> > Piotr Zarzycki > >>> > > >>> > Patreon: *https://www.patreon.com/piotrzarzycki > >>> > <https://www.patreon.com/piotrzarzycki>* > >>> > > >>> > >>> > >>> -- > >>> Carlos Rovira > >>> http://about.me/carlosrovira > >>> > >> > >> > >> -- > >> > >> Piotr Zarzycki > >> > >> Patreon: *https://www.patreon.com/piotrzarzycki > >> <https://www.patreon.com/piotrzarzycki>* > >> > > > > > > -- > > > > Piotr Zarzycki > > > > Patreon: *https://www.patreon.com/piotrzarzycki > > <https://www.patreon.com/piotrzarzycki>* > > > > > -- > > Piotr Zarzycki > > Patreon: *https://www.patreon.com/piotrzarzycki > <https://www.patreon.com/piotrzarzycki>* > -- Carlos Rovira http://about.me/carlosrovira