Skip to content

feat: metadata (meta) property#175

Open
Aidosmf wants to merge 6 commits intomainfrom
Aidosmf/add-meta-prop
Open

feat: metadata (meta) property#175
Aidosmf wants to merge 6 commits intomainfrom
Aidosmf/add-meta-prop

Conversation

@Aidosmf
Copy link
Copy Markdown
Member

@Aidosmf Aidosmf commented Apr 13, 2026

Summary

  • Adds a new optional meta property to the top-level Animation object
    with structured metadata fields: g (generator), a (author),
    d (description), k (keywords)
  • Adds an custom (Custom Metadata) sub-property — an open object where
    authors can store any arbitrary data without schema constraints
  • Documents the new Metadata type in both composition.md and
    helpers.md with usage examples and implementation guidance

Test plan

  • 1 valid test animations
  • 1 invalid test animation
  • Example animation in docs/static/examples/metadata.json
  • All 33 tests passing (npx jest)

Add a  property to the top-level Animation with structured fields
(generator, author, description, keywords, theme color) and an open
sub-property for arbitrary custom data. Includes schema, docs, examples,
and valid/invalid test cases.
@Aidosmf Aidosmf self-assigned this Apr 13, 2026
@cla-bot cla-bot Bot added the cla-signed label Apr 13, 2026
@Aidosmf Aidosmf force-pushed the Aidosmf/add-meta-prop branch from 4055e91 to cb3e62c Compare April 13, 2026 13:32
@Aidosmf Aidosmf linked an issue Apr 13, 2026 that may be closed by this pull request
@mbasaglia
Copy link
Copy Markdown
Member

Do we need / want "theme color"? I'm not sure it's actually meta data

@Aidosmf
Copy link
Copy Markdown
Member Author

Aidosmf commented Apr 14, 2026

Do we need / want "theme color"? I'm not sure it's actually meta data

@mbasaglia it's a very popular property

@Aidosmf Aidosmf marked this pull request as ready for review April 14, 2026 09:03
Comment thread package-lock.json
Comment thread schema/helpers/metadata.json Outdated
Comment on lines +35 to +40
"x": {
"title": "Custom Metadata",
"description": "Object where authors can store any custom data. The contents of this property are not validated by the schema.",
"type": "object",
"additionalProperties": true
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we ok to name custom properties as x?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd avoid x as it might interfere with expressions. IMO we can move away from single letter properties when we add stuff that is not already widely implemented

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed x to custom

@mbasaglia
Copy link
Copy Markdown
Member

mbasaglia commented Apr 14, 2026

Do we need / want "theme color"? I'm not sure it's actually meta data

@mbasaglia it's a very popular property

I believe it's because there's tooling that exports it but I don't like having rendering information in the metadata.
I think that is the pre-dotlottie way of specifying background color for lottiefiles-based players. All other players ignore that property.

Aidosmf added 2 commits April 14, 2026 14:48
Add an optional  property to the top-level Animation with
structured fields (g, a, d, k, tc) and an open  sub-property
for arbitrary author data. Includes schema definition, docs, examples,
and valid/invalid test cases.
@Aidosmf Aidosmf force-pushed the Aidosmf/add-meta-prop branch from 69752d8 to a23e729 Compare April 14, 2026 09:49
Comment thread docs/specs/helpers.md
Comment on lines +290 to +291
animations. Implementations MUST NOT rely on any particular keys or structure
within `custom`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementations MUST NOT rely on any particular keys or structure

I'm not sure I understand this statement

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.

Add animation metadata

2 participants