Ticket #13270 (closed PLIP: fixed)

Opened 3 years ago

Last modified 2 years ago

Move presentation mode out of core

Reported by: MatthewWilkes Owned by:
Priority: minor Milestone: 5.0
Component: General Version:
Keywords: Cc:

Description (last modified by davisagli) (diff)

Proposer: David Glick
Seconder: Matthew Wilkes

Motivation

Presentation mode isn't used by the majority of users, and would work well as an add-on product. It's also unmaintained and isn't being kept up to date with s5 upstream.

Assumptions

  • Assumes we're not smoking crack and somebody is actually using it

Proposal & Implementation

Remove s5 code out of plone_third_party into a resource directory in a new product, perhaps plone.presentationview, and move the view into a simple browser view.

Deliverables

  • A new package in the Plone namespace that contains this functionality instead of in CMFPlone

Risks

People might be customising the presentation_view or CSS manually. I doubt it.

Participants

  • David Glick
  • JeanMichel FRANCOIS

Progress

Implementation is complete except for deleting the resources from CMFPlone. PLIP buildout is at  https://github.com/plone/buildout.coredev/blob/4.3/plips/plip13270-presentation-mode.cfg

Change History

comment:1 Changed 3 years ago by MatthewWilkes

  • Version changed from 4.2 to 4.3
  • Type changed from Bug to PLIP
  • Description modified (diff)

comment:2 Changed 3 years ago by eleddy

+1

comment:3 Changed 3 years ago by kleist

  • Status changed from new to confirmed
  • Component changed from Unknown to General

+1

comment:4 Changed 3 years ago by eleddy

  • Description modified (diff)

comment:5 Changed 3 years ago by davisagli

See also #12453 (where toutpt has already done the work to move the javascript to a different package).

comment:6 Changed 3 years ago by toutpt

implementation details should be updated into something like:

  • add schema extender to document with the presentation mode boolean field.
  • add the display in presentation link into document's actions (actions.xml)
  • move the code to plone.app.s5slideshow
  • update documentation (at least notice that it's a deprecated features moved out of the core)

Depends how you would like to see this implemented but I can help.

comment:7 Changed 3 years ago by amleczko

+1

comment:8 Changed 3 years ago by thet

+1. also, since s5 wouldn't be the first choice for web based presentations nowadays. more modern ones like

and many more.

comment:9 Changed 3 years ago by davisagli

  • Version 4.3 deleted
  • Milestone changed from 4.x to 4.4

Approved for 4.4. Need to coordinate with #12453

comment:10 Changed 3 years ago by davisagli

  • Description modified (diff)

Implementation now complete.

comment:11 Changed 3 years ago by amleczko

The PLIP was reviewed on Ubuntu 12.04 using python 2.7.3 and Chromium 23.0, Firefox 18.0.

Review steps

  • Ran buildout using the plip13270-presentation-mode.cfg file.
  • Ran tests for plone.app.layout, Products.ATContentTypes,plone.app.s5slideshow
  • Reviewed the code changes in plone.app.layout, Products.ATContentTypes, plone.app.s5slideshow

Notes and observations

  • the tests (plone.app.layout and Products.ATContentTypes) failed due to errors in plone.app.collection and Products.CMFPlone. I have used following patches to proceed with tests:
    diff --git a/plone/app/collection/collection.py b/plone/app/collection/collection.py
    index 1b45716..5584c2d 100644
    --- a/plone/app/collection/collection.py
    +++ b/plone/app/collection/collection.py
    @@ -87,7 +87,6 @@ CollectionSchema = document.ATDocumentSchema.copy() + atapi.Schema((
    ))
    
     CollectionSchema.moveField('query', after='description')
    -CollectionSchema['presentation'].widget.visible = False
     CollectionSchema['tableContents'].widget.visible = False
    

and:

diff --git a/Products/CMFPlone/setuphandlers.py b/Products/CMFPlone/setuphandlers.py
index 6c8f08d..0fdc77e 100644
--- a/Products/CMFPlone/setuphandlers.py
+++ b/Products/CMFPlone/setuphandlers.py
@@ -217,9 +217,6 @@ def setupPortalContent(p):
        fp.setLanguage(language)
        fp.setText(front_text, mimetype='text/html')
-       # Show off presentation mode
-       fp.setPresentation(True)
-
        # Mark as fully created
        fp.unmarkCreationFlag()
  • after patching the packages (plone.app.collection and Products.ATContentTypes) all tests passed.
  • code changes are minor, basically removing any presence of presentation mode.
  • I didn't noticed any problems using the plone.app.s5slideshow - it's quite simple and straightforward.
  • minor observations:

Conclusion

I would be +1 on this PLIS. However first dependency packages need to be fixed, (by removing completely the presentation mode) or a proper version pin (plone.app.colllection >= 2.0) need to be added.

comment:12 Changed 3 years ago by cah190

I reviewed the PLIP on Mac OS X 10.8.2 using python 2.7.3 and Safari 6.0.2.

Review steps

  • Ran buildout using the plip13270-presentation-mode.cfg file.
  • Made code changes per amleczko's review
  • Ran tests for plone.app.s5slideshow, plone.app.layout, and Products.ATContentTypes
  • Reviewed the code changes in plone.app.s5slideshow, plone.app.layout, and Products.ATContentTypes
  • Interactively tested plone.app.s5slideshow
  • Removed plone.app.s5slideshow from buildout and retested interactively

Notes and observations

  • the tests for plone.app.s5slideshow pass and have 74% coverage
  • the tests for plone.app.layout and Products.ATContentTypes pass (after code changes)
  • plone.app.s5slideshow implements a schemaextender to add the presentation option
  • the code in plone.app.s5slideshow and the changes to plone.app.layout and Products.ATContentTypes all look sane
  • plone.app.s5slideshow is automatically activated on all Plone sites when its ZCML is active; should it be installable per site using a browser layer-aware schema extender or are we happy with it being always active?
  • removing plone.app.s5slideshow from a site with presentation mode content has no discernable side-effects beyond loss of presentation mode
  • works as expected

Conclusion

Aside from needing minor patches to plone.app.collection and Products.CMFPlone to remove presentation mode references, everything works as expected. My only concern is whether we should make this package explicitly installable. But since that would be easy to do at a later date, I am +1 for this PLIP.

comment:13 Changed 3 years ago by davisagli

  • Status changed from confirmed to closed
  • Resolution set to fixed

Merged for 4.4!

comment:14 Changed 2 years ago by davisagli

  • Milestone changed from 4.4 to 5.0
Note: See TracTickets for help on using tickets.