Skip to content

Releases: sitegeist/Sitegeist.Kaleidoscope

Support for `renderDimensionAttributes`, `width`, `height`, `loading` and `format` resp. `formats`

23 Oct 14:41
35e194c
Compare
Choose a tag to compare

Kaleidoscope will now render width and height attributes whenever possible by default and thus help to prevent content reflow when images are loaded. This can be controlled via renderDimensionAttributes. Additionally the loading attribute can be used and width, height and format can be defined on the prototypes directly.

Sitegeist.Kaleidoscope:Image:

  • renderDimensionAttributes: render dimension attributes (width/height) when the data is available from the imageSource. Enabled by default
  • loading: (optional) loading attribute for the img tag
  • width: (optional) the base width, will be applied to the imageSource
  • height: (optional) the base height, will be applied to the imageSource
  • format: (optional) the image-format like webp or png, is applied to the imageSource

Sitegeist.Kaleidoscope:Picture:

  • renderDimensionAttributes: render dimension attributes (width/height) for the img-tag when the data is available from the imageSource
    if not specified dimensions will be enabled automatically for pictures that only use the formats options.
  • formats: (optional) image formats that will be rendered as sources of separate type (string or array)
  • loading: (optional) loading attribute for the img tag
  • width: (optional) the base width, will be applied to the imageSource
  • height: (optional) the base height, will be applied to the imageSource

Sitegeist.Kaleidoscope:Source:

  • format: (optional) the image-format for the source like webp or png, is applied to imageSource and type
  • width: (optional) the base width, will be applied to the imageSource
  • height: (optional) the base height, will be applied to the imageSource

In addition all Sitegeist.Kaleidoscope:Source rendered inside of a Sitegeist.Kaleidoscope:Picture
will inherit the values imageSource, srcset, sizes, width and height.

Fix a bug in ResourceImageSource

18 Aug 09:17
948e457
Compare
Choose a tag to compare
Merge pull request #23 from jonnitto/bugfix/resource_image_source

BUGFIX: Fix broken ResourceImageSource

Variant Preset and Neos 4.3 + 5 Support

29 Oct 15:46
Compare
Choose a tag to compare

Provides a new property variantPreset in the AssetImageSource and
DummyImageSource Fusion prototypes. The expect a string giving the
preset identifier and preset variant name separated by ::, like:

Acme.Com:Component.Teaser.Hero::landscape
In addition this adds a new method useVariantPreset() to the
ImageSourceHelperInterface that can be used to specify a variant to
use based on a configured asset variant preset:

useVariantPreset('Acme.Com:Component.Teaser.Hero', 'landscape')
That variant (if existing) of an asset will be used as base before any
further adjustments are applied.

Additionally the Sitegeist.Kaleidoscope:Picture now accepts to pass
afx content

VariantPreset Support

29 Oct 14:19
Compare
Choose a tag to compare

Provides a new property variantPreset in the AssetImageSource and
DummyImageSource Fusion prototypes. The expect a string giving the
preset identifier and preset variant name separated by ::, like:

Acme.Com:Component.Teaser.Hero::landscape

In addition this adds a new method useVariantPreset() to the
ImageSourceHelperInterface that can be used to specify a variant to
use based on a configured asset variant preset:

useVariantPreset('Acme.Com:Component.Teaser.Hero', 'landscape')

That variant (if existing) of an asset will be used as base before any
further adjustments are applied.

Furthermore this changes the API for using thumbnail presets:

  • renames applyPreset() to applyThumbnailPreset() in
    ImageSourceHelperInterface
  • renames preset to thumbnailPreset in Fusion prototypes

The key preset in Fusion is still used if thumbnailPreset is not
given to provide b/c.

Resolves #12

Neos 5 / Flow 6 compatibility

23 Sep 09:36
Compare
Choose a tag to compare
Merge branch 'feature/flow6-compatibility'

# Conflicts:
#	Classes/Controller/DummyImageController.php
#	composer.json

BUGFIX: Catch case where image could not be rendered but no exception is thrown

23 Sep 09:29
7f38139
Compare
Choose a tag to compare

In addition the version constraint for neos 5 was removed again because of breaking changes in the http chain. Kaleidoscope 5 for Neos 5 will be released soon.

Support `format` and add Sitegeist.Kaleidoscope:Source prototype

12 Sep 10:24
03aade5
Compare
Choose a tag to compare

Add format option for imageSources setFormat() for helpers and prototype Sitegeist.Kaleidoscope:Source

Supported formats are amongst others: webp, png, jpg, jpeg (!!! the format has to be supported by the current imagine driver)

  • the format option in the *ImageSource prototypes allows to set the format on ImageSource Definition
  • the setFormat() method of the *imageSourceHelpers allows to do this later to already define ImageSourceHelpers on the presentation side
  • the prototype Sitegeist.Kaleidoscope:Source is used inside Sitegeist.Kaleidoscope:Picture for the rendering of sources but it can may also be used standalone

In addition the dummyImageSource will now return a fallback image with statusCode 500 in case any exception occurs. This can happen if the Imagine driver does not support drawing or the chosen format.

This could have been released as feature version but since it will require adjustments in Sitegeist.Lazybones it is safer to raise the major version.

add `setDimensions` to imageSourceInterface and add second `preserveAspect` argument to `setWidth` and `setHeight

26 Jun 11:18
3528c74
Compare
Choose a tag to compare
Merge pull request #11 from sitegeist/feature/addSetDimensionsAndPres…

…erverAspect

FEATURE: add `setDimensions` to imageSourceInterface and add second `preserveAspect` argument to `setWidth` and `setHeight`

Improve rendering of small dummy images and add moiree pattern to detect browser scaling

02 May 11:43
Compare
Choose a tag to compare
TASK: Improve rendering of small images and add moiree pattern to det…

…ect browser scaling

BUGFIX: __toString must not throw an exception

01 Nov 14:48
462a6a8
Compare
Choose a tag to compare
Merge pull request #6 from daniellienert/bugfix/no-exception-in-tostring

BUGFIX: __toString must not throw an exception