Ticket #9264 (closed PLIP: fixed)
Merge backport patches from plone.app.dexterity into Plone
Reported by: | optilude | Owned by: | optilude |
---|---|---|---|
Priority: | major | Milestone: | 4.0 |
Component: | General | Version: | |
Keywords: | Cc: | esteele, plip-advisories@… |
Description
The plone.app.dexterity package currently includes several monkey patches that are effectively backports of CMF 2.2 features that Dexterity relies upon. Some of these can be removed outright if we move to CMF 2.2, whilst others require some changes to Plone. The goal is to make it easier and safer to use Dexterity with Plone 4.0, without actually introducing a dependency.
1) The ++add++ traversal namespace
This is provided by CMF and also by plone.app.dexterity. We can probably just remove this from plone.app.dexterity.
2) Make folder_factories and the plone.contentmenu.factories menu item aware of the add_view_expr FTI property
CMF 2.2 uses a TALES expression in each FTI to calculate an add view. To use this, we need to:
- Ensure that CMFDynamicViewFTI supports this property. There's a mixin class in plone.dexterity.fti (AddViewActionCompat) which provides the necessary additional properties. Most likely, we can just remove this and make sure that the properties in CMFDynamicViewFTI are OK.
- Ensure that CMF's TypesTool.listActions() method is used (plone.app.dexterity provides a backport, which can just be removed)
- Modify the addable_types() method in the folder_factories view to use the new 'folder/add' action category in preference to trying to look up IAdding views (./+/<factory name>).
- Modify the 'action' property in the FactoriesSubMenuItem to do the same
Overall, these changes should be low risk, since existing add views (the createObject script for AT types and the IAdding view lookup for plone.app.content types) will be unaffected.
Change History
comment:4 Changed 7 years ago by erikrose
- Owner optilude deleted
Clearing Owner field of 4.0 PLIPs so we can use it to mean "implementor". (Many of these owners were automatically assigned from choosing a Component that had a default owner.)
comment:6 Changed 7 years ago by optilude
- Owner set to optilude
- Status changed from new to assigned
I think David Glick will accidentally do most of this in his Zope 2.12/CMF 2.2 work. However, I'll do the plone.app.contentmenu integration if accepted.
comment:7 Changed 7 years ago by davisagli
+1. Does the factories menu change have any performance implications?
comment:9 Changed 7 years ago by rossp
FWT Vote +1. Same as with #9259, though. I wish that this was written as a proper PLIP. I'm voting on this pretty much by pedigree and I hate to do that.
comment:10 Changed 7 years ago by raphael
FWT vote : +1
comment:11 Changed 7 years ago by calvinhp
FWT Vote: +1 based on the fact we are going to use CMF 2.2 already.
comment:12 Changed 7 years ago by esteele
Approved by FWT vote.
comment:13 Changed 7 years ago by optilude
comment:14 Changed 7 years ago by optilude
comment:15 Changed 7 years ago by optilude
comment:16 Changed 7 years ago by optilude
comment:17 Changed 7 years ago by optilude
comment:18 Changed 7 years ago by optilude
This is now ready for review.
comment:19 Changed 7 years ago by davisagli
comment:20 Changed 7 years ago by optilude
Some thoughts on the review notes:
- The slow-down is obviously disappointing. I'd like to do some more benchmarking, both to confirm the results and to figure out where the problem really lies.
- We could maybe make support for this optional somehow? Dexterity certainly needs it. AT doesn't presently.
- I think we should just rip out the IAdding guess-the-view support. It really complicates the code, and it's very easy to use the folder/add action to get a /+/foo URL to work. Since IAdding is not used by any core code, I think it can just go into the upgrade notes. It may also gain us some performance.
- It may worth raising the performance issue with the CMF guys. This is a CMF feature after all.
Martin
comment:21 Changed 7 years ago by optilude
comment:22 Changed 7 years ago by optilude
comment:23 Changed 7 years ago by optilude
comment:24 follow-up: ↓ 25 Changed 7 years ago by optilude
With the latest changes, comparing a standard 4.0 buildout with the branch using David's ab test (logged in, 100 requests) gives me between 5.2 and 5.7 requests per second for both branches. ab's not the most accurate of indicators, of course. Hoping Ross' tests will bear these results out.
comment:25 in reply to: ↑ 24 Changed 7 years ago by rossp
Replying to optilude:
With the latest changes, comparing a standard 4.0 buildout with the branch using David's ab test (logged in, 100 requests) gives me between 5.2 and 5.7 requests per second for both branches. ab's not the most accurate of indicators, of course. Hoping Ross' tests will bear these results out.
Heh, that's why I asked people to get in requests for re-runs of the load tests. But I need details.
comment:26 Changed 7 years ago by optilude
comment:27 Changed 7 years ago by esteele
Your PLIP has passed the Framework team's initial review. Feel free to discuss any suggested changes either here in the PLIP ticket or on the mailing lists. Final deadline for this PLIP is set for September 30.
comment:28 Changed 7 years ago by davisagli
comment:29 Changed 6 years ago by rossp
FWT vote: +1 for merge
comment:30 Changed 6 years ago by esteele
This PLIP has been accepted for merging into Plone 4.0
The final vote was: Alec Mitchell +1 David Glick +1 Erik Rose +1 Laurence Rowe +1 Matthew Wilkes - Ross Patterson +1
Please merge your branches into the Plone 4.0 head by end-of-day Friday Oct 16. If you need assistance with merging, please contact me.
We'll be assigning a documentation ticket to this PLIP shortly. Please assist the docs team in documenting the changes and new features that this PLIP introduces.
comment:31 Changed 6 years ago by esteele
Please assist the doc team in creating/updating documentation relating to this PLIP. See #9608.
comment:32 Changed 6 years ago by esteele
- Status changed from assigned to closed
- Resolution set to fixed