-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat(BrandLoadingScreen): improve lottie animations #1235
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a636d76
poc
marcoskolodny 3345c0d
format jsons
marcoskolodny 997916b
replace lottie-react by custom lottie-light
marcoskolodny 9b129f4
Merge branch 'master' of github.com:Telefonica/mistica-web into lotti…
marcoskolodny 2b28f13
add comment and code cleaup
marcoskolodny 8d379e1
add license and readme
marcoskolodny 687eb16
use yarn patch to avoid cloning the lottie lib
marcoskolodny f3c5ffa
remove unused lib
marcoskolodny 0d480bf
Merge branch 'master' of github.com:Telefonica/mistica-web into lotti…
marcoskolodny 4af27a2
add docs
marcoskolodny 6dadf8f
update readme
marcoskolodny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
diff --git a/build/index.d.ts b/build/index.d.ts | ||
index d7bcde667d3db9510ee67e27ca4e6ecdd0641e14..9b28fd02c458e524107ed3f61cd945fecc0eeeed 100644 | ||
--- a/build/index.d.ts | ||
+++ b/build/index.d.ts | ||
@@ -1,6 +1,6 @@ | ||
/// <reference types="react" /> | ||
-import { AnimationDirection, AnimationSegment, AnimationItem, RendererType, AnimationConfigWithData, AnimationEventName } from 'lottie-web'; | ||
-export { default as LottiePlayer } from 'lottie-web'; | ||
+import { AnimationDirection, AnimationSegment, AnimationItem, RendererType, AnimationConfigWithData, AnimationEventName } from 'lottie-web/build/player/lottie_light'; | ||
+export { default as LottiePlayer } from 'lottie-web/build/player/lottie_light'; | ||
import * as react from 'react'; | ||
import react__default, { RefObject, MutableRefObject, AnimationEventHandler, ReactElement, CSSProperties } from 'react'; | ||
|
||
diff --git a/build/index.es.js b/build/index.es.js | ||
index a2d9d48661a41bfb5c44df246eec19935d8a1162..1394d1116bd5a4b86ee2fdbbb9f096ad3824207f 100644 | ||
--- a/build/index.es.js | ||
+++ b/build/index.es.js | ||
@@ -1,5 +1,5 @@ | ||
-import lottie from 'lottie-web'; | ||
-export { default as LottiePlayer } from 'lottie-web'; | ||
+import lottie from 'lottie-web/build/player/lottie_light'; | ||
+export { default as LottiePlayer } from 'lottie-web/build/player/lottie_light'; | ||
import React, { useState, useRef, useEffect } from 'react'; | ||
|
||
function _iterableToArrayLimit(arr, i) { | ||
diff --git a/build/index.js b/build/index.js | ||
index ad6dbb0947b4a342383436808f2be3ab7161eaf3..3111e99f9e55e85786d971b931aedfaca419a617 100644 | ||
--- a/build/index.js | ||
+++ b/build/index.js | ||
@@ -2,7 +2,7 @@ | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
-var lottie = require('lottie-web'); | ||
+var lottie = require('lottie-web/build/player/lottie_light'); | ||
var React = require('react'); | ||
|
||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
diff --git a/build/index.umd.js b/build/index.umd.js | ||
index 05a46ac14be5f01ef400c7dda874f4d4646d8f82..077e99122143581e0154794d8ca2419881e1bd84 100644 | ||
--- a/build/index.umd.js | ||
+++ b/build/index.umd.js | ||
@@ -1,6 +1,6 @@ | ||
(function (global, factory) { | ||
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lottie-web'), require('react')) : | ||
- typeof define === 'function' && define.amd ? define(['exports', 'lottie-web', 'react'], factory) : | ||
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lottie-web/build/player/lottie_light'), require('react')) : | ||
+ typeof define === 'function' && define.amd ? define(['exports', 'lottie-web/build/player/lottie_light', 'react'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["lottie-react"] = {}, global.Lottie, global.React)); | ||
})(this, (function (exports, lottie, React) { 'use strict'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,7 +200,8 @@ | |
"react-dom": "18.2.0", | ||
"@types/react": "^18.0.26", | ||
"@types/react-dom": "^18.0.10", | ||
"@testing-library/dom": "^8.19.1" | ||
"@testing-library/dom": "^8.19.1", | ||
"lottie-react@^2.4.0": "patch:lottie-react@npm%3A2.4.0#./.yarn/patches/lottie-react-npm-2.4.0-d4d95c55aa.patch" | ||
}, | ||
"packageManager": "[email protected]", | ||
"workspaces": [ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Used https://www.lottiemizer.com/ to compress the JSON files |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
4,717 changes: 2,325 additions & 2,392 deletions
4,717
src/vivinho-loading-animation/wave-lottie.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
yarn patch
to import the light version oflottie-web
instead of the default one that the library uses. This is the main improvement