collective / collective.cover

A sane, working, editor-friendly way of creating front pages and other composite pages. Working now, for mere mortals.
48 stars 55 forks source link

Status on Plone 6 migration #905

Open frapell opened 2 years ago

frapell commented 2 years ago

I am trying to include cover in a Plone 6 instance, however I cannot make it work... First of all, is there some place where discussion is happening on the decisions being taken for upgrading? Maybe a document somewhere?

Several issues I'm finding:

  1. Simply including the product and pulling it from source doesn't work. When you start the instance, you get an error

    ...
    ...
    ...
    File "/trabajo/plone/buildout.coredev/src/Zope/src/Products/Five/viewlet/metaconfigure.py", line 130, in viewletDirective
    raise ConfigurationError("No such file", template)
    zope.configuration.exceptions.ConfigurationError: ('No such file', '/trabajo/plone/buildout.coredev/src/collective.cover/src/collective/cover/browser/static/resources.pt')
    File "/trabajo/plone/buildout.coredev/parts/instance/etc/site.zcml", line 16.2-16.23
    File "/trabajo/plone/buildout.coredev/src/Products.CMFPlone/Products/CMFPlone/configure.zcml", line 102.2-106.8
    File "/trabajo/plone/buildout.coredev/src/collective.cover/src/collective/cover/configure.zcml", line 32.2-32.32
    File "/trabajo/plone/buildout.coredev/src/collective.cover/src/collective/cover/browser/configure.zcml", line 162.2-170.8

    Looking inside this folder, it is in fact empty, with a README saying that content in that folder is generated by webpack automatically, and to check documentation.

  2. Looking at documentation at https://github.com/collective/collective.cover#development it mentions several scripts that are nowhere to be found. I don't see them in setup.py so I am not sure where they are coming from, nor how they are supposed to be generated. For what I can infer, it appears the files inside browser/static are generated by these missing scripts, but not sure...

  3. Going into the webpack folder, I run yarn install but the process seems to fail when installing node-gyp with

    make: *** [binding.target.mk:133: Release/obj.target/binding/src/binding.o] Error 1
    make: Leaving directory '/trabajo/plone/buildout.coredev/src/collective.cover/webpack/node_modules/node-sass/build'
    gyp ERR! build error 
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/trabajo/plone/buildout.coredev/src/collective.cover/webpack/node_modules/node-gyp/lib/build.js:262:23)
    gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
    gyp ERR! System Linux 5.10.0-1057-oem
    gyp ERR! command "/home/frapell/.nvm/versions/node/v16.13.2/bin/node" "/trabajo/plone/buildout.coredev/src/collective.cover/webpack/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
    gyp ERR! cwd /trabajo/plone/buildout.coredev/src/collective.cover/webpack/node_modules/node-sass
    gyp ERR! node -v v16.13.2

    Not sure if I'm doing something wrong?

  4. Was able to install by running npm install and I noticed that webpack 3.12 is pulled. Are there plans to use the latest version? Plone is going to be using 5.66 https://github.com/plone/mockup/blob/es6/package.json#L84

  5. Why is https://github.com/collective/sc.recipe.staticresources a dependency? can we move to maybe depend on mockup webpack config instead?

  6. Being that mockup brings jquery 3.6.0 and bootstrap 5.1.1, do we still need to depend on packages like plone.app.jquery and collective.js.bootstrap ?

  7. Speaking of bootstrap 5, is cover UI already migrated to support it? or is this pending?

I would like to contribute pushing the effort to have this product working in Plone 6... If you are already discussing all of this somewhere and you can point me to the details, that would be great !

frapell commented 2 years ago

@wesleybl Do you know the answer to some of these questions?

wesleybl commented 2 years ago

@frapell the scripts that generate the contents of the browser/static folder are generated when the package buildout is executed. To see:

https://github.com/collective/collective.cover/blob/59e7e6b934991e2e79aa8aee21327667a43e8e5e/base.cfg#L63-L72

The scripts will be in the ./bin folder after the buildout. Who does this is sc.recipe.staticresources.

In fact, when you run the buildout, the contents of the browser/static folder are already generated.

If that wasn't clear to you, maybe you can do a PR improving the documentation. It would be fantastic!

I think to work in Plone 6 it would need more love in JS and bootstrap. I'm trying to get it to work in Plone 5.2.

Now I'm treating the calendar tile: #633. When I was dealing with the calendar tile, I ran into a problem you already had: https://github.com/plone/Products.CMFPlone/pull/3012#issuecomment-1030342961. Can you take a look please?

@pbauer also wanting to make Cover work in Plone 6.

frapell commented 2 years ago

@wesleybl Ahhh, thanks for that... I was simply including the product as a dependency in my own buildout (coredev actually).

Just to be clear, I saw that this PR was merged https://github.com/collective/collective.cover/pull/900 so I assumed that support for Python 3, Plone 5.2 and Plone 6 was merged into master, this is not the case? and if so, do we have some list of missing parts? is it only the UI ?

Maybe you, me and @pbauer could join forces with this? mainly so we don't step on each other toes...

wesleybl commented 2 years ago

Just to be clear, I saw that this PR was merged https://github.com/collective/collective.cover/pull/900 so I assumed that support for Python 3, Plone 5.2 and Plone 6 was merged into master, this is not the case? and if so, do we have some list of missing parts? is it only the UI ?

Well, who did the PR was @pbauer. So he can answer better. I'm testing it on Plone 5.2, but it might be working on Plone 6.

Maybe you, me and @pbauer could join forces with this? mainly so we don't step on each other toes...

In Plone 5.2, I tested it and only the calendar tile is not working. I'm working on it. Then I'll try to make the robot test work. For now I don't have time to work on Plone 6, but I can help by reviewing something.

If you want, you can make a checklist.