You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Separated from #4208
Make teasers show dynamic data by default. Optionally users can choose to overwrite the data (old behavior)
Motivation
A teaser block currently does not change when the target-object is changed. This is breaking the expectations of most users.
Assumptions
Proposal & Implementation
All teasers are by default dynamic.
The teaser block gets a checkbox that allows to override a teaser. Checking it shows the teasers-fields that are read from the target.
The override-feature can be disabled globally in the volto registry.
A serializer in plone-restapi for the teaser block gets the data of the target to display if the block is not set to overwrite. So no additional requests are necessary to get the dynamic data on a lite with many teasers.
Extending the data is possible by adding a adapter for IJSONSummarySerializerMetadata. We could also try to configure that in the frontend by storing what is now selectedItemAttrs in the data of each teaser and using that in the serializer to add additional metadata.
Migration: We should prevent existing teaser to change only if you update Plone (volto and restapi). With the implementation in plone/plone.restapi@fb62f80 a teaser that was added before the overwrite-bool was added to the schema will be overwritten until the editor changes that.
The change in plone.restapi must not have any effect if used with a older version of Volto. That is already the case.
The change in Volto only works when used together with the updated version of restapi. I guess that is acceptable.
PLIP (Plone Improvement Proposal)
Responsible Persons
Proposer: Philip Bauer @pbauer
Seconder:
Abstract
Separated from #4208
Make teasers show dynamic data by default. Optionally users can choose to overwrite the data (old behavior)
Motivation
A teaser block currently does not change when the target-object is changed. This is breaking the expectations of most users.
Assumptions
Proposal & Implementation
All teasers are by default dynamic.
The teaser block gets a checkbox that allows to override a teaser. Checking it shows the teasers-fields that are read from the target.
The override-feature can be disabled globally in the volto registry.
A serializer in plone-restapi for the teaser block gets the data of the target to display if the block is not set to overwrite. So no additional requests are necessary to get the dynamic data on a lite with many teasers.
Extending the data is possible by adding a adapter for IJSONSummarySerializerMetadata. We could also try to configure that in the frontend by storing what is now selectedItemAttrs in the data of each teaser and using that in the serializer to add additional metadata.
Migration: We should prevent existing teaser to change only if you update Plone (volto and restapi). With the implementation in plone/plone.restapi@fb62f80 a teaser that was added before the overwrite-bool was added to the schema will be overwritten until the editor changes that.
The implementation is built based on #4790 by @steffenri, @nileshgulia1, @claudiaifrim and @pbauer and the block-serializer of @davisagli
Deliverables
Risks
The change in plone.restapi must not have any effect if used with a older version of Volto. That is already the case.
The change in Volto only works when used together with the updated version of restapi. I guess that is acceptable.
Participants
@pbauer
@pnicolli
The text was updated successfully, but these errors were encountered: