Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ion-slides will be deprecated beginning with Ionic 6 #617

Open
alexhaller opened this issue Jun 29, 2021 · 8 comments
Open

ion-slides will be deprecated beginning with Ionic 6 #617

alexhaller opened this issue Jun 29, 2021 · 8 comments

Comments

@alexhaller
Copy link

Beginning with Ionic 6 "ion-slides" component will be deprecated (https://ionicframework.com/blog/announcing-the-ionic-framework-v6-beta/). It´s recommended to switch to SwiperJs.

@AvniAnay
Copy link

AvniAnay commented Sep 26, 2022

@twinssbc Are there any plans to replace ion-slides with swiper ?

@rbertolig
Copy link

+1 about the need to update ionic-slides to swiper inside the ionic2-calendar code

@imanz7
Copy link

imanz7 commented Jan 29, 2023

+1 to replace ionic slides with swiper

@twinssbc
Copy link
Owner

twinssbc commented Jan 30, 2023

I have published a new version 1.0.1 which only relies on Swiper instead of IonSlides, feel free to give a try. Note that Swiper has become an dependency, so needs to include it in package.json explicitly.

@imanz7
Copy link

imanz7 commented Jan 31, 2023

It works! Thanks

@rbertolig
Copy link

@twinssbc tested and it works ok with swiper instead of ion-slides.

I am just strugling not being able to display correctly the calendar component inside another swiper element ( nested ).

In my case I have a component to show several calendars from same user, so used a swiper to allow browsing all user calendars.
But It seems to be some kind of css inherited forcing a ‘display: block;’ not any problem of the new version: the child swiper height ( with ionic2-calendar component ) it is not fully displayed inside the parent swiper-slides.

Tried with autoheight=true in swiper options and also height: 100% on parent swiper and swiper slides with no sucess. With manual override of browser console css noticed that ‘align-items: center;’ on .swiper .swiper-slides is causing the undesired behaviour, if anybody have an advise it will be welcome!

@twinssbc
Copy link
Owner

twinssbc commented Feb 1, 2023

@rbertolig When I switch from IonSlides to Swiper, I notice that the css style of some slide container changes from display: block to display:flex. So I manually force it to be display: block. Maybe I need to use some alternative way. If you could provide some simple code sample, I may help to take a look. You could just fork this.
https://stackblitz.com/edit/ionic-calendar-demo-1-0?file=src%2Fapp%2Fexample.component.html

@rbertolig
Copy link

rbertolig commented Feb 2, 2023

@twinssbc thanks for the observation!, in fact noticed the real problem in my case was the 'display:flex' default style on the new ( parent ) swiper I created in my component to browse several calendars.
Once I also forced my component's swiper to 'display:block' and 'height:100%' the ionic2-calendar component was loaded and nested full size and scrollable.
Used a custom css class to set the parent swiper styles:

.user-calendars-swiper {
        display: block!important; 
        height: 100%;

        .swiper-container {
            height: 100%;
        }

        .swiper-slide {
            display: block!important;
            height: 100%;
        }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants