Ticket #12453 (closed PLIP: worksforme)

Opened 4 years ago

Last modified 2 years ago

Package plone's 3rdParty ecma scripts in their own packages

Reported by: toutpt Owned by: toutpt
Priority: minor Milestone:
Component: JavaScript Version:
Keywords: javascript Cc: toutpt@…

Description (last modified by toutpt) (diff)

Proposer: JeanMichel FRANCOIS [toutpt]
Seconder: Rok Garbas [garbas]

Motivation

Make maintenance of third party ecma scripts more easy and more independant of the rest of Plone. A second motivation is to update jquery to 1.7 already covered by #12452 and let Plone be the more up to date.

Assumptions

Libraries concerned are:

  • s5
  • sarissa
  • modernizr

These libraries has their own life outside of Plone. Having just to change a version number should help people to test the brand new jquery and report bugs on Plone using it. Making evolution of plone available throw addons in the plone namespace let me think external ecma scripts should be packaged outside of Plone.

Proposal & Implementation

We need to create paclages:

  • plone.app.sarissa
  • plone.app.s5slideshow
  • plone.app.modernizr
  • plone.app.jscalendar

Deliverables

  • packages
  • Integration tests (whell installed ?)
  • Documentation (summarize in "about XXX" what this ecma script is doing)
  • Migration step

Risks

Participants

JeanMichel FRANCOIS [toutpt]

Progress

  • plone.app.sarrissa: done
  • plone.app.s5slider: done
  • plone.app.modernizr: done
  • plone.app.jscalendar: done

Dependencies:

  • Products.CMFPlone -> plone.app.jscalendar (it has the widget)
  • Products.kupu -> plone.app.sarrissa
  • plone.app.layout -> plone.app.s5slider (it has the presentation_view)
  • plone.app.search -> plone.app.modernizr (added to plone for this view)
  • plonetheme.sunburst -> plone.app.modernizr

Plone lost the corresponding skin layer.

TODO: add migration step. Migrate repository to github/plone (I don't know why I can't add a new repo to github/plone or fork these repository from my account to plone organization.

Change History

comment:1 Changed 4 years ago by garbas

  • ECMAUnit is test framework used by Sarissa (maybe also something else), not sure we need testing framework in our resource registry
  • Sarissa is used by Kupu and KSS, i once we extract it we might want to update those packages to depend on plone.app.sarissa
  • jquery: there is already (probably minutes before you) a plip for separating jquery out -> #12452 ... i have interest of separating jquery out and i would not like to see this being blocked other things and potentially not accepted into 4.3. would you mind separating this?

comment:2 Changed 4 years ago by toutpt

The main context of this proposale was to update jquery, If you care about it, I can remove jquery from this one and do the rest

plone.app.s5slider should be extracted out to be removed in the long term.

Thanks for the history of theses libraries.

comment:3 Changed 4 years ago by toutpt

  • Description modified (diff)

comment:4 Changed 4 years ago by garbas

perfect ... tnx ... now lets get some attention from framework team now :)

comment:5 Changed 4 years ago by eleddy

The FWT started talking about this and we actually got on a bandwagon of deprecating everything possible. Is there stuff we can just pull out and not even repackage? Are there other places that we can update these? I know the scope gets a little larger with that request but personally I'd be game to help out.

comment:6 Changed 4 years ago by garbas

as said above Sarissa is used by Kupu and KSS, so i think we need to repackage it and make it a dependency of P.kupu and p.a.kss.

but we could get rid of s5slider and whole slideshow functionality.

Last edited 4 years ago by garbas (previous) (diff)

comment:7 Changed 4 years ago by toutpt

We can make plone.app.s5slider an addon which will keep the browser view and the js and removing the archetype boolean field.

I don't like removing stuff but push it to collective could be a solution.

As garbas said we plone.app.sarissa repackaging will give a way to push it outside of plone if we remove kupu (already done) and kss (in progress ?)

comment:8 Changed 4 years ago by toutpt

  • Keywords javascript added; jquery removed
  • Description modified (diff)

comment:9 Changed 4 years ago by toutpt

  • Description modified (diff)

comment:10 Changed 4 years ago by garbas

  • Description modified (diff)

its nice that modernizr is factored out but i believe it should be dependency of plonetheme.sunburst as well.

comment:11 Changed 4 years ago by toutpt

  • Description modified (diff)

comment:12 Changed 4 years ago by robgietema

I have put some comments in plip #12452 which are also applicable for this plip.

Could you please have a look at those comments and let the FWT know when this plip is ready for (initial) testing?

comment:13 Changed 4 years ago by toutpt

  • Version set to 4.1
  • severity set to Untriaged
  • Versions of packages to fit with JS version

Except for sarissa where I can't find which one it is I have fixed this

  • move migration code to plone.app.upgrade

plone.app.upgrade is not ready to welcome 4.3 stuff. who is responsible for this ? I have pushed some changes on my plone.app.upgrades fork but ... no idea if I have to do that or not.

comment:14 Changed 4 years ago by toutpt

  • Version 4.1 deleted
  • severity changed from Untriaged to Normal

comment:15 Changed 4 years ago by toutpt

  • Owner set to toutpt

comment:16 Changed 4 years ago by esteele

toutpt, plone.app.upgrade master should now be targeted for 4.3. Feel free to fork.

comment:17 Changed 4 years ago by eleddy

what is the status of this plip? For 4.3 we would like to have all implementations done by June 30 for review by July 11.

comment:18 follow-up: ↓ 20 Changed 4 years ago by toutpt

Same as #12350 how could I move that code from my github to github/plone ?

The code will be ready only if someone answer

comment:19 Changed 4 years ago by toutpt

  • Description modified (diff)

comment:20 in reply to: ↑ 18 Changed 4 years ago by eleddy

Replying to toutpt:

Same as #12350 how could I move that code from my github to github/plone ?

The code will be ready only if someone answer

same answer as the other. Also, at any time feel free to just ping an actual person in plone. Ironically, I bet garbas could handle this for you in a flash.

comment:21 Changed 4 years ago by kleist

  • Status changed from new to confirmed

Changing status to "Confirmed", to get rid of the ticket from the report "Untriaged Tickets".

comment:22 Changed 4 years ago by eleddy

haven't seen a merge so moving to 4.4

comment:23 Changed 3 years ago by davisagli

  • Milestone changed from 4.3 to 4.4

What needs to happen to complete this?

comment:24 Changed 3 years ago by toutpt

It's almost done, i'm not really used to core dev workflow, sorry. I would like to write my upgrade for the 4.4 but it seems plone.app.upgrade is not ready to have 4.4 stuff.

Last question was where could I write the migration stuff, when it was time I was booked by many projects.

I need to wait for the master of plone.app.upgrades to be ready on 4.4, so I will do the job in a branch at the moment. Let me know when it will be ready for the 4.4

Last edited 3 years ago by toutpt (previous) (diff)

comment:25 Changed 3 years ago by toutpt

I have merge all branches to be 4.4.

all is ready for a review please !

Do the review happens before I write the upgrade in plone.app.upgrades ?

comment:26 Changed 3 years ago by davisagli

Review of PLIP 12453 (Package plone's 3rdParty ecma scripts in their own packages)

Review by David Glick, 2013/04/30

This PLIP moves Plone's third party Javascripts from the plone_3rdparty skin to browser resources in various packages:

  • plone.app.sarissa
  • plone.app.s5slideshow
  • plone.app.modernizr
  • plone.app.jscalendar

For various reasons some of these should no longer be included in core:

  • plone.app.sarissa was only used by KSS and kupu, which are no longer in core.
  • PLIP 13270 already accepted plone.app.s5slideshow as a non-core package, and was merged.
  • plone.app.event uses plone.formwidget.datetime which uses the jquerytools date picker rather than jscalendar. We should probably update any other things in Plone that use jscalendar to also use the jquerytools date picker.

So I think this is now mostly about making sure plone.app.modernizr is integrated properly, and that the other js resources are unregistered properly in an upgrade step.

plone.app.modernizr looks reasonable; it includes a default build of modernizr.js, and also has a utility view that links to the modernizr download page to help with building an optimized version if desired.

Remaining tasks:

  • Add an upgrade step to plone.app.upgrade which removes event-registration.js, modernizr.js, calendar_formfield.js, and any other relevant scripts from the JS registry. It should also install plone.app.modernizr.
  • Make sure plone.app.modernizr is included as a dependency of plonetheme.sunburst and plone.app.search.
  • Update calendar_macros.pt to use the jquerytools datepicker instead of jscalendar. Remove jscalendar from CMFPlone. (Perhaps the folks working on plone.app.event can help with this.)

These can happen ASAP, as long as the rest of the framework team agrees with my assessment.

comment:27 Changed 3 years ago by esteele

  • Milestone changed from 4.4 to 5.0

The Framework Team has decided to move on to Plone 5. Updating milestones accordingly.

comment:28 Changed 3 years ago by garbas

this plip should be deprecated in favor of #13476 - New widgets for Plone (plone.app.widgets) and separated admin (plone.app.toolbar), which is actually rethinking how we integrate javascript in plone.

comment:29 Changed 2 years ago by davisagli

  • Status changed from confirmed to closed
  • Resolution set to worksforme
  • Milestone 5.0 deleted

Closing this since we're planning to use the mockup approach to integrate javascript in Plone 5.

Note: See TracTickets for help on using tickets.