Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CoreAnimation rendering engine changed the behavior of Text providers #1949

Closed
JoeSzymanski opened this issue Feb 10, 2023 · 2 comments · Fixed by #2183
Closed

CoreAnimation rendering engine changed the behavior of Text providers #1949

JoeSzymanski opened this issue Feb 10, 2023 · 2 comments · Fixed by #2183
Labels
bug Core Animation rendering engine Regressions introduced by the Core Animation rendering engine

Comments

@JoeSzymanski
Copy link

In testing the new verison of Lottie, I ran into an issue where custom text providers were not working in automatic mode but were working in mainThread mode.

By adding a log message in DictionaryTextProvider.textFor(keypathName: String, sourceText: String), I noticed the following:

Automatic mode:
JRS - custom text for keypathName ENVELOPE-FRONT.sender_username, sourceText: sender_username
JRS - custom text for keypathName ENVELOPE-FRONT.From, sourceText: From:
JRS - custom text for keypathName ENVELOPE-BACK-TEXTBOX.LETTER-TEXTBOX.sender_username, sourceText: sender_username
JRS - custom text for keypathName ENVELOPE-BACK-TEXTBOX.LETTER-TEXTBOX.custom_text, sourceText: custom_text

MainThread mode:
JRS - custom text for keypathName sender_username, sourceText: sender_username
JRS - custom text for keypathName From, sourceText: From:
JRS - custom text for keypathName custom_text, sourceText: custom_text
JRS - custom text for keypathName sender_username, sourceText: sender_username
JRS - custom text for keypathName From, sourceText: From:
JRS - custom text for keypathName custom_text, sourceText: custom_text
JRS - custom text for keypathName sender_username, sourceText: sender_username

It looks like the new CoreAnimation enginer is using a different definition for the keypathName parameter, which means it's not possible to safely support both modes.

Which Version of Lottie are you using?

Lottie 4.1.2

Animation JSON

Working to confirm that I can share the JSON file. I will update once I have approval.

@calda calda added the bug label Feb 10, 2023
@calda
Copy link
Member

calda commented Feb 10, 2023

Yeah, the two rendering engines have different AnimationKeypath implementations which are different in some edge cases that we aren't handling correctly yet. Please share your animation json when you're able to!

@JoeSzymanski
Copy link
Author

The json for the animation is attached.

love_letter.json.zip

@calda calda added the Core Animation rendering engine Regressions introduced by the Core Animation rendering engine label Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Core Animation rendering engine Regressions introduced by the Core Animation rendering engine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants