Skip to content

Add Lottie animation content element - #2468

Merged
tf merged 17 commits into
codevise:masterfrom
tf:lottie
Aug 14, 2026
Merged

Add Lottie animation content element#2468
tf merged 17 commits into
codevise:masterfrom
tf:lottie

Conversation

@tf

@tf tf commented Aug 14, 2026

Copy link
Copy Markdown
Member

REDMINE-21349

tf added 2 commits August 14, 2026 09:43
Registrations do not depend on the editor seed and can thus happen
before the app is initialized. Only setting up the file types requires
the server rendered config. This allows tests to set up file types
registered by plugins together with the built in ones without having to
build a separate registry.

Options of the text track file type that read the seed are passed as
functions since the registration now happens before the editor has
booted. Icon table cells and select inputs support this just like text
table cells already support functions as default value.
Instead of building a separate registry of test doubles, set up the
global registry from fake server side configs. File types registered by
content element editors are thus available in specs and plugins only
need to provide the config the server would render.
@tf tf added this to the v17.2 milestone Aug 14, 2026
tf added 15 commits August 14, 2026 10:38
Turn any option ending in "Files" into a file collection of the seed.
Specs of content elements that come with their own file type can thus
pass files without the test helper having to know about the collection.
Since model types are only compared to associate nested files, a
placeholder derived from the collection name is used unless the spec
passes one.
Only pass the fileModelTypes seed option in specs that either assert on
the resulting model type or associate nested files with their parent.
Everywhere else the option merely restated the defaults of the
normalizeSeed test helper.
Uploadable file names are generated from the extension of the
uploaded file. Extensions like 'lottie' were rejected by the file
name validation.
The entry association of ReusableFile was resolved relative to the
namespace of the including model. File types defined by plugins that
do not live inside the Pageflow module thus failed to load.
Registers a PageflowScrolled::LottieFile file type behind the new
lottie_animation_content_element feature flag, allowing dotLottie
files to be uploaded and managed in the editor.
Uploads of dotLottie files are matched by file name since browsers do
not detect a content type for them.
Renders dotLottie animations via a canvas based player. The player is
loaded in a separate frontend pack registered behind the
lottie_animation_content_element feature flag since it depends on a
WebAssembly module.
Lets editors select an uploaded dotLottie file and choose whether the
animation shall loop. Only available if the
lottie_animation_content_element feature is enabled.
By default the player fetches its WebAssembly module from a CDN,
which would leak visitor IPs to a third party.
Analogous to the preview view rendered in the file meta data overlay,
file types can now register a Backbone view which the file thumbnail
renders on top of its box once the file is ready.
Plays the animation in a loop next to the files list. Since the editor
runs in its own bundle, the setup pointing the player at the bundled
WebAssembly module moves into a module shared with the frontend.
Animations commonly build up their scene over time, so the frame the
player draws right after loading the file tends to be close to blank.
The placeholder pictogram is no longer forced, since it would shine
through transparent parts of the animation.
Selecting another file left the previous thumbnail view behind with its
model bindings intact. File types can now render thumbnail views which
hold on to resources of their file, so the view has to be closed. Since
closing removes the element of a view, the thumbnail moves into a
container of its own.
Let entries crop lottie animations to a theme aspect ratio and round
their corners just like inline images. Since the animation is vector
based, cropping only means giving the canvas a different box and
telling the player to cover it instead of fitting the animation in.
Crop positioning stays disabled for the file input: The positioning
dialog displays the file via a CSS background image, which lottie files
do not provide a derivative for. Animations are therefore always
cropped around their center.
@tf
tf merged commit f855c62 into codevise:master Aug 14, 2026
18 checks passed
@tf
tf deleted the lottie branch August 14, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant