Skip to content

feat(Lottie): add LottieView for web + LottieViewBase API contract + setup dotlottie-react runtime - #1009

Open
aquelemiguel wants to merge 15 commits into
dls-1059from
dls-1055
Open

aquelemiguel wants to merge 15 commits into
dls-1059from
dls-1055

Conversation

@aquelemiguel

@aquelemiguel aquelemiguel commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes DLS-1055.

@aquelemiguel aquelemiguel self-assigned this Nov 24, 2026
@aquelemiguel
aquelemiguel added this pull request to stack #1010 November 24, 2026 19:07
@aquelemiguel
aquelemiguel requested a review from a team as a code owner November 24, 2026 19:07
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ldls Ready Ready Preview Nov 27, 2026 6:50pm UTC
ldls-react-native Ready Ready Preview Nov 27, 2026 6:50pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Lumen PR report

Test coverage

Libs must reach 80% on every metric. Δ is against the latest green main; italic rows did not run in this PR and show main's numbers.

Lib Lines Statements Functions Branches Gate
design-core 99.50% (±0) 99.51% (±0) 100.00% (±0) 90.90% (±0) ✅
lint-plugin 97.10% (±0) 96.00% (±0) 100.00% (±0) 93.75% (±0) ✅
migrations 89.34% (−7.10) 88.83% (−6.30) 95.07% (−4.93) 86.02% (−3.19) ✅
symbols — — — — not run
ui-react 96.59% (+0.02) 95.97% (+0.03) 94.90% (+0.09) 92.18% (−0.02) ✅
ui-rnative 94.27% (+0.08) 94.07% (+0.09) 93.59% (+0.08) 86.47% (+0.05) ✅
utils-shared 98.95% (+0.01) 99.03% (+0.01) 99.25% (+0.01) 94.32% (+0.10) ✅
Internals (reported, not gated)
Project Lines Statements Functions Branches
adoption-tool 78.12% (−0.21) 77.91% (−0.19) 84.36% (−0.07) 84.39% (−0.34)
design-build 88.30% (±0) 87.63% (±0) 92.85% (±0) 77.17% (±0)
design-sources 90.10% (±0) 88.63% (±0) 89.61% (±0) 85.94% (±0)
repo-tools 39.26% (±0) 39.22% (±0) 70.74% (±0) 41.53% (±0)
sync-figma 81.35% (±0) 81.76% (±0) 79.10% (±0) 88.39% (±0)

@aquelemiguel
aquelemiguel removed this pull request from stack #1010 November 25, 2026 13:07

This comment was marked as low quality.

@gamegee gamegee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[mid] I know the mdx is planned for another ticket. The thing is, this component needs setup before it works (the .lottie asset rule and the wasm URL, see my comment on index.ts), and right now that's only half-written in the symbols README. Could we at least put a short "setup" note in the JSDoc, or link the follow-up ticket in the PR description?

LottieSource,
LottieViewRef,
} from '@ledgerhq/lumen-utils-shared';
export { setWasmUrl as setLottieWasmUrl } from '@lottiefiles/dotlottie-react';

@gamegee gamegee Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[high] (CLAUDE) By default dotlottie-web fetches its wasm (~1.2 MB) from jsdelivr, with unpkg as a fallback, unless someone calls setWasmUrl. That worries me for our apps: CSP or offline would just give a blank animation, and loading a renderer from a public CDN at runtime in a wallet isn't great either.

The package does export @lottiefiles/dotlottie-web/dotlottie-player.wasm, so consumers can import it as an asset and call setLottieWasmUrl at startup. I'd make that the documented setup, and do the same in our Storybook preview so we don't hit the CDN from there either. Also, do we know if a failed wasm load ends up in onError?


Sim: Not sure yet how it should be handled, probably a small investigation on how its done on LW currently,

Comment thread libs/ui-react/package.json Outdated
},
"dependencies": {
"@ledgerhq/lumen-utils-shared": "0.1.20",
"@lottiefiles/dotlottie-react": "^0.22.3",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[low] Both dotlottie-react and dotlottie-web are ESM-only, and since LottieView is exported from the root barrel, every import of ui-react now loads them. Bundlers are fine since both are sideEffects: false. Jest is a different story: consumers will probably need to add @lottiefiles to their transformIgnorePatterns, like they already do for d3. Might be worth a quick consumer-impact run before release, and a line in the release notes.

@sonarqubecloud

Copy link
Copy Markdown

This branch was successfully deployed

2 active deployments
Preview – ldls-react-native — 1181323b Deployed Nov 27, 2026 by vercel[bot]
Preview – ldls — 1181323b Deployed Nov 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants