Hi,

Are there any plans on creating a D8 version of this module?

Comments

Lukas von Blarer’s picture

Did anyone start working on this?

kingfisher64’s picture

I'd like to know this as well :)

minorOffense’s picture

There will be. I spent a day a year ago trying out some D8 stuff but nothing materialized.

It'll be a straight port. The big missing piece for me at the time was how to convert the ctools exportable optionsets into the new CMI system. There wasn't an upgrade path / procedure. There might be now.

If anyone wants to give it a shot let me know, I can grant access to the module on GitHub.

kingfisher64’s picture

https://www.drupal.org/project/drupalmoduleupgrader is what is supposed to help with upgrading. :)

minorOffense’s picture

Yeah, like I said, didn't exist a year ago ;-)

If you want to give it a run through try it out. Let me know how it goes. I don't plan on creating a D8 version until the fall at least. Or until the RC's are out.

manishmore’s picture

I would be like to work for D8 version.

bloomt’s picture

Has anyone started porting this module to drupal 8?

ChristianP’s picture

No response in 2 months. Just checking in if anyone knows anything about the Drupal 8 version?

amaria’s picture

Tyring it now in my sandbox.

amaria’s picture

So I was pretty far into the conversion when I realized that the api needs to be rethought. Right now flexslider_add is using drupal_add_js and drupal_add_css to add the library and js settings. However these functions have been removed in favor of #attached. In that case, the idea of simply adding the library configuration arbitrarily is no longer viable as a simple function call.

Any thoughts on replacing the api?

In the meantime, I can proceed without it.

amaria’s picture

So I have a working D8 version of this in my sandbox. It's pretty much a straight port. There are still a few things to work out...

  1. Flexslider views is not ported only Flexslider field
  2. The tests and make file need to be ported
  3. I have a minor issue with the optionset cache
  4. The codebase needs to be cleaned up. (e.g. remove D7 files and functions)
  5. The whole thing needs to be tested thoroughly

But it works so please have a look and let me know what you think!

BTW, I dealt with the API (flexslider_add) by changing it to return an #attached array that can be added to any render array.

amaria’s picture

The latest in my sandbox is pretty much fully functional. Still some things to do before it's complete and ready for review...

  1. The tests and make file need to be ported
  2. The codebase needs to be cleaned up. (e.g. remove D7 files and functions)
  3. The whole thing needs to be tested thoroughly

Hopefully someone will try it out :)

minorOffense’s picture

For #10 If #attached works on blocks in D8 then yeah we should do that instead.

minorOffense’s picture

I've copied your code into the 8.x-2.x branch of the module so people can start trying the code out. Anyone reading this comment be sure to note that the code is not ready for production use and API changes may still occur.

amaria’s picture

Ok, Great!

bloomt’s picture

Your sandbox release is working good for me, haven't run into any bugs yet

bloomt’s picture

Found a bug,

I cannot add a flexslider field inside a view. Actually I can add the field but then I cannot go back and edit it.

bloomt’s picture

Also I get "The website encountered an unexpected error. Please try again later." when trying to save a new flexslider optionset

amaria’s picture

Thanks for testing! Yes, I fixed a few bugs a couple days ago but neglected to commit them to my sandbox (although they are committed to the Github repo). In any case, please try the latest code which should fix the bugs you encountered and several more.

bloomt’s picture

I downloaded the master from https://github.com/coldfrontlabs/flexslider/tree/8.x-2.x, I assume this is the github repo that you are working on. Anyways both of my issues still exist.

amaria’s picture

No, actually I had to fork that project in order to work on it and my changes to it are pending. You can find the latest here https://github.com/amaria/flexslider/tree/8.x-2.x or in my sandbox.

bloomt’s picture

I still cannot edit a flexslider field within a view.

Thanks for all the hard work.

amaria’s picture

The latest version in my sandbox and github should fix the issue with flexslider formatter in views, among other things.

No problem. Thanks for testing!

minorOffense’s picture

I've pulled the latest from your sandbox and pushed it to github and the flexslider project.

If you open pull requests on GitHub I can keep up with merging changes in as they happen and publish them to the flexslider project.

amaria’s picture

Ok, I have created another pull request for the latest commit which ports the example module to D8 with the following changes:

- Uses D8 configuration management instead of Features
- Uses an embed View for the "slider with slider nav" example instead of Block with Context placement.
- Adds the FlexSlider example menu to the toolbar for easy access.
- Generates content when installed
- Deletes content and configuration when uninstalled
- Adds more detail to README

So I believe this is pretty much stable enough at least for a dev release. The only thing that doesn't appear to be working at the moment is the debug switch which does not load the non-minified version when set. I'll have to take another look at the library part if this since the Libraries module is not fully functional yet.

amaria’s picture

Status: Active » Needs review
amaria’s picture

Also added a new commit to fixed a problem with loading the sample files.

bloomt’s picture

Module is working great for me, it definitely can be pushed to a dev release.

Are you going to build out the integration for Responsive Images?

amaria’s picture

It's up to the project maintainer to decide if that should be part of this project. I could create a separate project if not.

amaria’s picture

The D8 dev version is now available for testing.

bloomt’s picture

Version: 7.x-2.x-dev » 8.x-2.x-dev
ecvandenberg’s picture

Just used flexslider-8.x-2.x-dev (2016-Feb-22) and it works fine in flexslider_fields use. At this moment I think flexslider is the only suitable option I know of for getting slides to work in Drupal 8. Jssor is just not ready and views slideshow is not nice in its responsive behavior. But flexslider is in dev state. So actually we do not have a nice and stable module for slides in Drupal 8.

I guess the dependency with libraries which is also in dev is blocking this module from getting released. Due to the discussion about the need for libraries in Drupal 8 I don't think they come out of dev soon.

Please consider to get rid of the libraries dependency. For the sake of getting a stable 8.x release soon of this very nice module.

minorOffense’s picture

Picture or Responsive images modules can integrate with flex slider on their own (I think picture already does). Otherwise I welcome anyone to create a new contrib module to make it happen. But I won't be adding it to flex slider directly. Too much code to maintain / debug.

darvanen’s picture

Tested using a view and it works well.

Is it the Libraries API dependency that's holding this back from at least being an alpha?

amaria’s picture

Funny you should ask :) I was just writing up a post concerning the roadmap to final release. Will be up shortly.

amaria’s picture

Roadmap here

amaria’s picture

Status: Needs review » Fixed

D8 version available since 2016

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.