Ticket #8801 (closed PLIP: fixed)
Move action icon support into actions, deprecate CMFActionIcons
Reported by: | hannosch | Owned by: | davisagli |
---|---|---|---|
Priority: | minor | Milestone: | 4.0 |
Component: | General | Version: | |
Keywords: | Cc: | rossp, plip-advisories@… |
Description (last modified by davisagli) (diff)
Overview
Since CMF 2.1 (Plone 3.0) action objects have gained an extra attribute called icon. This allows you to specify the icons associated with an action directly on the action. As a result the CMFActionIcons product has become obsolete.
We should deprecate the portal_actionicons tool and move all our icons to be stored on the actions themselves.
Motivation
Deprecating the portal_actionicons tool paves the way to getting rid of a dependency on a package that is no longer necessary.
Implementation / Deliverables
- Plone prefers action icons set directly on the action, then falls back to portal_actionicons. (This is already in place in 3.x)
- Plone's own icons will be switched to be directly on the action, including any necessary migration from portal_actionicons.
- Use of portal_actionicons will result in a deprecation warning.
Risks
I don't think there are any significant risks to the revised proposal.
Progress
Hanno has already implemented complete removal of the portal_actionicons tool on trunk.
Participants
I (David Glick) am willing to do the work required.
Change History
comment:4 Changed 7 years ago by davisagli
- Status changed from new to assigned
- Owner changed from hannosch to davisagli
- Description modified (diff)
- Milestone changed from 5.0 to 4.0
I fleshed out the description and assigned this to 4.0 for review.
comment:5 Changed 7 years ago by pupq
Has there been a period where this has been deprecated, and product authors that use it received a strong deprecation warning that this is going away in 4.0?
If not, then this seems a mistake from integrators; good products may fail if they assume this tool is there.
Perhaps a strong warning appears in 4.0, and in 4.1 or 4.2 the tool goes away? Or 5.0?
comment:6 Changed 7 years ago by erikrose
- Owner davisagli 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:8 Changed 7 years ago by davisagli
- Status changed from assigned to new
- Owner set to davisagli
I am the implementer of this PLIP if it is accepted.
I abstain from voting as it is my PLIP.
If removing this without a deprecation period is deemed to be too risky, then we could probably make the (relatively few) places that look up icons check the action first, then fall back to portal_actionicons while emitting a deprecation warning.
comment:9 Changed 7 years ago by hannosch
A note from an outsider ;)
I think I made the required changes to prefer the actions icon attribute over the action icons tool already in the Plone 3.x codebase. A quick look revealed for example in plone.app.layout:
"Allow the use of the icon attribute on action directly instead of using the actionicons tool."
This was done in 1.1 released in April 2008.
So hopefully it is already possible for add-ons today in the Plone 3.x timeline to no longer rely on the action icons tool. Since nobody ever tested this, we cannot be certain of this, though. We have also not emitted deprecation warnings or changed Plone itself over to this yet.
This might still be relevant for a decision on how exactly to handle the deprecation period. Hopefully advising add-ons to use the new syntax allows them to stay compatible easily with Plone 3.x here. The icon attribute itself was introduced in CMF 2.1, so specifying it is possible since the very early alpha releases of Plone 3.0 without causing problems.
comment:10 Changed 7 years ago by MatthewWilkes
I'm swayed by Joel's argument on this, I'm all in favour of bringing in some deprecation warnings and making sure core and GenericSetup exporter uses the new way, but it seems that this hasn't been made clear enough to our add-on developers.
I think this can wait until 5, and we should use 4 to encourage everyone to switch to the hot new shit.
FWT Vote: -1
comment:11 Changed 7 years ago by rossp
I'd love to see this in 4.0. So my FWT vote is +1 if we can get a deprecation warning added to the 3.0 series a couple of minor releases before 4.0.
comment:12 Changed 7 years ago by alecm
I think the addition of the new API (which is already in place) and deprecation of the tool APIs is sufficient for 4.0. Removing the tool would seem to be breaking expectations for little reason.
-1
comment:13 Changed 7 years ago by raphael
FWT comment:
+1 on deprecation +1 on using the new way in Plone itself exclusively -3 on removing the tool immediately (OK in Plone 5 though)
that gives?
-1 in total
comment:14 Changed 7 years ago by calvinhp
FWT Vote: +1 only if we include the deprecation warnings in 3.x releases and only remove the BBB after 4.1 or 4.2
comment:15 Changed 7 years ago by erikrose
+1, assuming...
- We can get some DeprecationWarnings into 3.x
- This change is documented in the Developer's Upgrade Guide to Plone 4
comment:16 Changed 7 years ago by esteele
Approved by FWT vote.
comment:17 Changed 7 years ago by davisagli
- Status changed from new to assigned
- Description modified (diff)
Updated the description to reflect modifications that were proposed in conversation with the FWT.
comment:18 Changed 7 years ago by davisagli
(In [28658]) configlet action icons cleanup (refs #8801):
- added support for CMF's icon_expr setting on actions of the control panel tool
- added support for icon_expr to the control panel GS handler
- adjusted the Plone tool's getIconFor to check for an icon from the control panel tool before falling back to the action icons tool
- adjusted the default profile to assign configlet icons the new way
comment:19 Changed 7 years ago by davisagli
comment:20 Changed 7 years ago by davisagli
comment:21 Changed 7 years ago by davisagli
- Summary changed from Move action icon support into actions, remove CMFActionIcons to Move action icon support into actions, deprecate CMFActionIcons
Updating the title to more accurately reflect the nature of the revised PLIP
comment:22 Changed 7 years ago by davisagli
comment:23 Changed 7 years ago by esteele
Your PLIP has been reviewed by the Framework team. 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:24 Changed 6 years ago by esteele
Please assist the doc team in creating/updating documentation relating to this PLIP. See #9618.
comment:25 Changed 6 years ago by esteele
- Status changed from assigned to closed
- Resolution set to fixed
(In [25163]) Removed action icons tool. This refs #8801.