PLIP: Teaser block in core (mark II)
PLIP (Plone Improvement Proposal)
Responsible Persons
Proposer: Víctor Fernández de Alba @sneridagh
Seconder: Steffen Ring @steffenri
Abstract
Include in core a Teaser block that showcases a site content in a summarised way (card, listing, etc).
Motivation
Historically, there has been a number of implementations of a block that it's capable of "tease" an arbitrary content from the site in a summarised and visually appealing way (as a card, listing, etc). It has been identified as a recurrent and a very valuable feature that is needed for every modern site.
Assumptions
No assumptions are required.
Proposal & Implementation
There is a PoC in the PR: https://github.com/plone/volto/pull/3706
It has been agreed to start the implementation with the Teaser block that @kitconcept/volto-blocks-grid provides, and add more features (some could be optional) to extend the feature set of the block.
Deliverables
- [x] Standalone
teaserblock - [x] Local cache of hardcoded
title,descriptionandhead_titleof the target element in block fields - [x] These cached fields are the ones that are used in the
Teaserrendering - [x] The user can override them at will
- [x] The
Teaserdoes not update until you reset it and choose another target - [x] Uses component registry for defining templates for default content types teases
- [x] Alignment widget, left, right, center using the style wrapper
- [x] Add handler for resetting the teaser completely (target and overrides)
Wishlist
- [ ] Extend the default local cache fields
- [ ] Sync the original teaser with the overrides
- [ ] The cache can be refreshed on demand by the user, overriding the current values (UX TBD)
- [ ] Optional switch that makes the data is always "live", unless override values are present (UX TBD)
- [ ] Images do not use "the shortcut" but the image cataloged data for the target object
- [ ] Extend the Teaser with "slots". These slots could be: bottom-left, bottom-middle and bottom-right.
- [ ] Improved serialization for teasers using transforms and the upcoming Relations serializers (as in the RelatedChoices fields.
- [ ] Able to extend (and show) metadata if the teaser is linked to an object then we would also be able to show Tags or any other object metadata
- [ ] Inline editing of the teaser text elements?
- [ ] Round image (variations?)
- [ ] Ribbons (variations?)
- [ ] Using SVG for images (to create a stripe of icons instead of images)
Risks
The block is completely new, so no risks are involved.
Participants
@sneridagh: I will champion this, but help is welcome!
@sneridagh @tisto @pbauer Is this what was already completed at the Beethoven Sprint for Plone 6.1, or does this go further?
@davisagli I think this can be closed, some of the whishlist are already fulfilled or outdated/no sense in the current implementation. If needed, we can open a new PLIP for the "mark III"