Ticket #9286 (closed PLIP: fixed)

Opened 5 years ago

Last modified 6 weeks ago

Allow to show/hide portlets

Reported by: igbun Owned by: igbun
Priority: minor Milestone: 4.0
Component: General Version: 4.2
Keywords: portlets Cc: plip-advisories@…, grahamperrin@…

Description (last modified by erikrose) (diff)

Proposer: Ricardo Alves
Seconder:

Motivation

Currently, only the static text portlet can be hidden. This option should be available to all portlets in a more UI friendly away.

Assumptions

The need to hide/disable portlets is very common. Most portlets have persistent settings, so the ability to keep them configured but hidden can make a difference. The portlets themselves may implement this feature individually (as the static portlet does), but there should be a more generic solution, allowing to show/hide portlets at the management screen.

Proposal

Allow the user to hide individual portlets using the portlet management interface with a single click. Hidden portlets should be easily identified, e.g. using a different background color (gray), suggesting that the portlet is disabled.

Implementation

This can be done using a simple, clickable show/hide icon, and some AJAX to perform the server changes. The show/hide option should be stored as an annotation (not at the portlet schema as currently implemented by the static portlet).

The "hide" field should be removed from the static text portlet schema.

The GenericSetup import/export handler at plone.app.portlets should be updated, allowing to set the hidden flag to portlet assignments via GenericSetup.

In regarding to backwards compatibility, it should be fairly easy to keep old static text portlets working, based on the old value stored or, if necessary, using a specific migration.

Deliverables

A new release of plone.app.portlets including these features.

A new release of plone.portlet.static which removes the hide option.

Updated documentation about the static portlet and the portlet management screen to explain the new features.

Risks

The problem of users expecting to find the "hide" field when editing static text portlets, which is negligible considering the gains in usability.

Participants

  • Ricardo Alves (igbun)

Progress

Not implemented yet.

Branches

Change History

comment:1 Changed 5 years ago by igbun

  • Description modified (diff)

comment:2 Changed 5 years ago by igbun

  • Description modified (diff)

comment:3 Changed 5 years ago by pupq

+1. Requested by students. We have the "hide-instead-of-having-to-delete" feature in lots of parts of Plone, and they wonder why it's not here, too.

Getting orderable portlets in by default is also helpful, I think. That's the single-most-requested feature people ask for after I teach portlets. ("How can we change the order across those categories"). David's add-on product meets their expectations for this perfectly.

comment:4 Changed 5 years ago by igbun

  • Description modified (diff)

Updated description to better match the PLIP template.

comment:5 Changed 5 years ago by igbun

  • Description modified (diff)

Added mention to new release of plone.portlet.static at deliverables.

comment:6 Changed 5 years ago by jonstahl

The add-on product Joel refers to is collective.weightedportlets.

comment:7 Changed 5 years ago by vedawms

Can we also look into adding in the ability to figure out where portlets are configured? In sites that are deep, you have to pick through them to find where child level portlets are set up, and where blocking may be turned on. The portlet management screen is insufficient for getting a quick glance at portlet configuration.

comment:8 Changed 5 years ago by erikrose

  • Owner igbun 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:9 Changed 5 years ago by igbun

Veda, I think such feature would be more appropriate for PLIP #9285. At the management screen, each inherited portlet may display a path, or some other information, giving the ability to know where the portlet is coming from. It may be a problem at deep content trees though. I'll try to update the PLIP description with more information on this.

comment:10 Changed 5 years ago by smcmahon

  • Cc plip-advisories@… added

comment:11 Changed 5 years ago by MatthewWilkes

FWT Vote: +1

comment:12 Changed 5 years ago by rossp

  • Owner set to igbun

Think the owner was intentional here

comment:13 Changed 5 years ago by rossp

FWT vote +1. I've often wished for this.

comment:14 Changed 5 years ago by davisagli

FWT vote: +1.

Please make sure that the 'hidden' flag is included when exporting/importing portlet assignments via GenericSetup.

Also please implement a migration to convert the 'hide' setting from existing instances of plone.portlet.static to the new format.

comment:15 Changed 5 years ago by igbun

  • Description modified (diff)

Updated PLIP description to include the hidden flag at import/export via GenericSetup.

comment:16 Changed 5 years ago by raphael

FWT vote: +1

comment:17 Changed 5 years ago by calvinhp

FWT Vote: +1

comment:18 Changed 5 years ago by esteele

Approved by FWT vote.

comment:19 Changed 5 years ago by igbun

  • Status changed from new to assigned

comment:20 Changed 5 years ago by grahamperrin

  • Cc grahamperrin@… added

comment:21 Changed 5 years ago by igbun

(In [29092]) Creating branch of plone.portlets for plip 9286 (refs #9286).

comment:22 Changed 5 years ago by igbun

(In [29093]) Creating plone.static.portlet branch for plip 9286 (refs #9286).

comment:23 Changed 5 years ago by igbun

(In [29097]) Adding plip 9286 buildout configuration and description documento. This PLIP is ready for review (refs #9286).

comment:24 Changed 5 years ago by erikrose

  • Description modified (diff)

Linked to branches.

comment:25 Changed 5 years ago by erikrose

(In [29510]) Completed my review of the show/hide portlets PLIP. Refs #9286.

comment:26 Changed 5 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 23.

comment:27 Changed 5 years ago by igbun

(In [30100]) Handling attribute "visible" in xml import/export handler. Updated related tests and added new unit test. Refs #9286.

comment:28 Changed 5 years ago by igbun

(In [30106]) Refactored show/hide methods to use a imple toggle_visibility method. Refs #9286.

comment:29 Changed 5 years ago by igbun

(In [30107]) Updated PLIP description. This PLIP is now ready for final review. Refs #9286.

comment:30 Changed 5 years ago by erikrose

(In [30231]) Updated review. Just a few small things needed to change my -1 to a +1. Refs #9286.

comment:31 Changed 5 years ago by igbun

(In [30241]) Changed the spelling of the visual attribute to "True"/"False", as requested in the final review. Updated tests Refs #9286.

comment:32 Changed 5 years ago by erikrose

(In [30251]) The issues with #9286 were resolved, and I'm changing to +1. Refs #9286. Thanks, igbun!

comment:33 Changed 5 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:34 follow-up: ↓ 35 Changed 5 years ago by esteele

Please assist the doc team in creating/updating documentation relating to this PLIP. See #9286.

comment:35 in reply to: ↑ 34 Changed 5 years ago by esteele

That should be #9611.

comment:36 Changed 5 years ago by esteele

(In [30486]) Merge in #9286, refs #9286.

comment:37 Changed 5 years ago by esteele

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

(In [30487]) Remove PLIP branches. Closes #9286.

comment:38 Changed 22 months ago by davisagli

  • Component changed from Infrastructure to General

comment:39 Changed 6 weeks ago by anthonygerrard

  • Version set to 4.2

Note that the following part of the Plip seems to have been missed:

"In regarding to backwards compatibility, it should be fairly easy to keep old static text portlets working, based on the old value stored or, if necessary, using a specific migration. "

see #12286

Note: See TracTickets for help on using tickets.