From 8e4d1cba00b48bc52dc406956a245856c489e48a Mon Sep 17 00:00:00 2001 From: Sorin Davidoi Date: Wed, 24 May 2017 17:55:00 +0200 Subject: Lazy load toots using IntersectionObserver (#3191) * refactor(components/status_list): Lazy load using IntersectionObserver * refactor(components/status_list): Avoid setState bottleneck * refactor(components/status_list): Update state correctly * fix(components/status): Render if isIntersecting is undefined * refactor(components/status): Recycle timeout * refactor(components/status): Reduce animation duration * refactor(components/status): Use requestIdleCallback * chore: Split polyfill bundles * refactor(components/status_list): Increase rootMargin to 300% * fix(components/status): Check if onRef is not defined * chore: Add note about polyfill bundle splitting * fix(components/status): Reduce animation duration to 0.3 seconds --- app/javascript/styles/components.scss | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/javascript/styles') diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index 880459761..3971a85bc 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -554,6 +554,14 @@ border-bottom: 1px solid lighten($ui-base-color, 8%); cursor: default; + @keyframes fade { + 0% { opacity: 0; } + 100% { opacity: 1; } + } + + opacity: 1; + animation: fade 0.3s linear; + &.status-direct { background: lighten($ui-base-color, 8%); -- cgit