ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.09k stars 13.51k forks source link

bug: Slide-box inside ion-list after slide-box refactor #2544

Closed makkart closed 9 years ago

makkart commented 10 years ago

Type: bug

Platform: all

I have posted this on the forum about two weeks ago but didn't get any response.

So I'm using slide-boxes inside an ion-list to make ion-items that have three slides each. Im using ion-list to make use of the reorder and delete functionality.

Its works very well but I tried out the nightly build to get rid of the can't scroll on slide-box bug for Android I read about and to get better performance. I can see the better performance but there are some big changes that mess up everything. The height is no longer dynamic and the slide box is taking up the whole space of the ion-item putting itself over other elements, hiding them. And its not changing height when i show or hide stuff in the slider with ng-show. I can't figure this out, what am I doing wrong and what should i do to get my layout back. Please see the screenshots in my forum post and the plunker to see what I'm talking about.

http://forum.ionicframework.com/t/slide-box-inside-ion-list-in-beta-13-vs-nightly/11841

http://plnkr.co/edit/jqjrOPOPNWi30q2egXHW?p=preview

drewrygh commented 10 years ago

So you're looking to keep the header inside the item, along with the slidebox (but not inside of it), correct?

makkart commented 10 years ago

Yes! Also the slidebox has hidden content that is shown under the main content when its tapped. That makes the slidebox change height to show this content. This worked well in beta 13 but now the slidebox height seems fixed in some way and when the hidden content gets visible its not showing anyway cause the slidebox height does not change and the hidden content lays under the next slidebox.

In the plunker, if you click on the H3 header its shows more content but not all content is shown course the height is not changed to match the content.

I have tried to illustrate it in a screenshot here: https://dl.dropboxusercontent.com/u/41243414/ionic_slidebox_demo.jpg

Thank you.

makkart commented 10 years ago

Hi,

Any news on this?

//Marcus

On 13 Nov 2014, at 04:50, Drew Rygh <notifications@github.com mailto:notifications@github.com> wrote:

So you're looking to keep the header inside the item, along with the slidebox (but not inside of it), correct?

— Reply to this email directly or view it on GitHub https://github.com/driftyco/ionic/issues/2544#issuecomment-62837876.

ajoslin commented 10 years ago

Checking this out.

ajoslin commented 10 years ago

@makkart the slide box will take up the full width and height of its parent container.

Create a container: <div class="slide-container"></div> .slide-container { position: relative; height: 100px; }

http://plnkr.co/edit/SiRkwmiqGPL1rIZS2Byi?p=preview

ajoslin commented 10 years ago

Could you try it out and let me know your feedback?

makkart commented 10 years ago

@ajoslin Thanks for your reply. Sure I can set a height on the slidebox but the height will change when i show and hide more content. And before it would resize for me.

Take a look at whats happening if I just change back to Beta-13. No changes to the code. http://plnkr.co/edit/sjclzsUxkCynZyyTQbCX?p=preview If you click on "Header in slider 0" now you will see the hidden content and the slidebox height is changed to show the new content. That is what i need cause I can never know the height of the slidebox cause there is hidden dynamic content that has to be able to fit in it. I hope this makes sense to you. Thanks again for your help.

naavis commented 9 years ago

This is probably related. https://github.com/driftyco/ionic/issues/2592

ajoslin commented 9 years ago

In the latest nightly build, you don't need the containers.

ajoslin commented 9 years ago

Your plunkr works great now! Awesome.

makkart commented 9 years ago

@ajoslin Yes, That is awesome! Thank you very very much!

ionitron-bot[bot] commented 6 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.