Ticket #9938 (closed PLIP: fixed)

Opened 6 years ago

Last modified 5 years ago

factor custom output transformations out of the editors

Reported by: davisagli Owned by: davisagli
Priority: minor Milestone: 4.1
Component: General Version:
Keywords: Cc: plip-advisories@…

Description (last modified by gotcha) (diff)

Proposer: David Glick
Seconder: None as yet

Motivation

Currently there are several features we provide via hooks in the transform chain from text/html to text/x-safe-html:

  • resolveuid resolution
  • image captioning

For historical reasons, these transformations are implemented in both kupu and TinyMCE. This has been a maintenance problem, as bugfixes for these features in one of the packages usually don't get ported to the other. Worse, only one of the editor's transformations can be activated at a time, making it impossible to use both editors in the same site allowing each user to choose his or her preference, if these features are desired.

These transforms are applied at render time, not edit time, and as such are really features of the CMS, not of a particular editor.

Proposal

I propose replacing both editors' implementations of these features with a new implementation, based on both, in a new plone.outputtransforms package.

The control panel settings related to these features will be moved from the kupu and TinyMCE control panels to the Editing control panel.

Implementation & Deliverables

  • New plone.outputtransforms package based on the existing implementations
  • Update Products.kupu and Products.TinyMCE to depend on plone.outputtransforms (note: this needs to work in Plone 3 too)
  • Move the control panel settings for link-by-uid and captioning to the editing control panel.
  • Upgrade steps to uninstall the old transforms and install the new one.
  • Regression tests based on the old implementations
  • Martin Aspeli has proposed a new UUID implementation in PLIP #10778. If that is accepted, I will look into making link-by-uid support the new uuids in addition to Archetypes UIDs. (This would facilitate future support of non-AT content when linking in the editors, though support in the editors would also be needed where the resolveuid links are generated.)

Risks

  • Recent versions of Products.kupu and Products.TinyMCE are commonly used in Plone 3, so we need to make sure that plone.outputtransforms works there too.

Participants

David Glick
Hanno Schlichting said he can help ensure the link-by-uid feature remains LinguaPlone-aware.

Progress

Merged in 4.1.

Change History

comment:1 Changed 6 years ago by davisagli

  • Owner set to davisagli
  • Status changed from new to assigned
  • Description modified (diff)
  • Milestone changed from 4.x to 4.1

comment:2 Changed 6 years ago by davisagli

(In [38866]) start the plone.outputfilters package, refs #9938

comment:3 Changed 6 years ago by davisagli

(In [38867]) add PLIP .cfg, refs #9938

comment:4 Changed 6 years ago by esteele

Your PLIP has been accepted for consideration for Plone 4.1.

Framework Team voting on this PLIP was: Alec +1 Craig +1 Elizabeth +1 Laurence +1 Martijn +1 Matthew +1 Rob +1 Ross +1

The initial implementation deadline for your PLIP is October 1st, 2010. The Framework Team would certainly appreciate you finishing beforehand so that they may begin evaluating it as soon as possible. Announce its readiness here once your implementation is ready for review.

comment:5 Changed 6 years ago by optilude

(In [39400]) Add checkouts for PLIP refs #10778 to this buildout. Also refs #9938.

comment:6 Changed 6 years ago by davisagli

(In [40104]) use the new TinyMCE branch, refs #9938

comment:7 Changed 6 years ago by davisagli

(In [40107]) use new Plone branch, refs #9938

comment:8 Changed 6 years ago by davisagli

(In [40108]) the transforms each need their own module with a register method. also, define interfaces for looking up whether captioning and resolveuid are enabled (I would use p.a.registry settings, except I want this to be backwards-compatible with Plone 3 without installing p.a.registry). refs #9938

comment:9 Changed 6 years ago by cah190

  • Cc plip-advisories@… added

comment:10 Changed 6 years ago by davisagli

(In [40242]) add a bunch of image captioning tests based on the ones in kupu; support a pluggable template for the image caption like kupu does; refactor the tinymce-based transform to support the kupu-style template; refs #9938

comment:11 Changed 5 years ago by davisagli

(In [45612]) ready for review, refs #9938

comment:12 Changed 5 years ago by cah190

(In [46045]) Review for PLIP 9938. Refs #9938

comment:13 Changed 5 years ago by alecm

(In [46193]) Add review for PLIP 9938. Refs #9938

comment:14 Changed 5 years ago by esteele

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

Merged in 4.1

comment:15 Changed 5 years ago by gotcha

  • Description modified (diff)

comment:16 Changed 4 years ago by davisagli

  • Component changed from Infrastructure to General
Note: See TracTickets for help on using tickets.