plone.restapi icon indicating copy to clipboard operation
plone.restapi copied to clipboard

WIP Enhance relation field serialization for image content types

Open reebalazs opened this issue 2 years ago • 4 comments

  • In better support of the preview image link
  • Reuses serialization from existing field serializers
  • Flexible adapation allows new types to be added in the future

WIP until preview_image_link has been merged into plone.volto

reebalazs avatar Jun 06 '22 14:06 reebalazs

@reebalazs thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

mister-roboto avatar Jun 06 '22 14:06 mister-roboto

Deploy Preview for plone-restapi canceled.

Name Link
Latest commit 8989fce71e69422bb732d2a31c2e95dcf65134a2
Latest deploy log https://app.netlify.com/sites/plone-restapi/deploys/635a89ab1344c90008c71584

netlify[bot] avatar Jun 06 '22 14:06 netlify[bot]

@tiberiuichim @avoinea this is what I was talking about yesterday. The idea would be that once we have this Relation serializers, we could use them in the smart fields (href, teaser's one) so if what's behind it's really an image, then pull off the enhanced serialization.

sneridagh avatar Jun 10 '22 10:06 sneridagh

+1 - this would speed up usage of referenced images a lot.

The particular implementation is maybe not exact how it should be. The core idea form Beethoven sprint is to have a general adapter in Plone core on field level. This code here then should call it or retrieve the data from the catalog.

jensens avatar Jul 04 '22 07:07 jensens