From 161873b68cae2949c5cf3494d0e7953956168432 Mon Sep 17 00:00:00 2001 From: Sean Engelhardt Date: Fri, 14 Jun 2019 15:19:52 +0200 Subject: [PATCH] Speeds up the animations. Removed the on-transition-fade class The current way to trigger animation seemed not reliable enough. --- client/src/app/shared/animations.ts | 24 ++++------ .../head-bar/head-bar.component.html | 30 ++++-------- .../list-view-table.component.html | 2 +- .../sort-filter-bar.component.html | 2 +- .../sorting-list/sorting-list.component.html | 2 +- .../agenda-import-list.component.html | 4 +- .../list-of-speakers.component.html | 14 ++++-- .../assignment-detail.component.html | 15 ++++-- .../assignment-poll.component.html | 6 +-- .../components/error/error.component.html | 2 +- .../history-list/history-list.component.html | 4 +- .../call-list/call-list.component.html | 2 +- .../category-detail.component.html | 26 ++++------ .../category-list.component.html | 2 +- ...motion-comment-section-list.component.html | 26 ++-------- .../amendment-create-wizard.component.html | 11 +++-- .../motion-detail.component.html | 48 +++++++++---------- .../motion-poll/motion-poll.component.html | 16 ++----- .../motion-import-list.component.html | 4 +- .../workflow-detail.component.html | 20 ++++---- .../statute-import-list.component.html | 2 +- .../statute-paragraph-list.component.html | 17 +------ .../tag-list/tag-list.component.html | 2 +- .../group-list/group-list.component.html | 26 ++++++---- .../user-import-list.component.html | 4 +- client/src/styles.scss | 5 -- 26 files changed, 134 insertions(+), 182 deletions(-) diff --git a/client/src/app/shared/animations.ts b/client/src/app/shared/animations.ts index c41f83bd6..4c11aa4e9 100644 --- a/client/src/app/shared/animations.ts +++ b/client/src/app/shared/animations.ts @@ -3,7 +3,7 @@ import { trigger, animate, transition, style, query, stagger, group } from '@ang const fadeVanish = [ style({ transform: 'translateY(0%)', opacity: 1 }), animate( - '200ms ease-in-out', + '150ms ease-in-out', style({ transform: 'translateY(0%)', opacity: 0 @@ -11,16 +11,17 @@ const fadeVanish = [ ) ]; -const fadeAppear = [ - style({ transform: 'translateY(0%)', opacity: 0 }), - animate('200ms ease-in-out', style({ transform: 'translateY(0%)', opacity: 1 })) -]; +// Requires more generic way to trigger parallel animations +// const fadeAppear = [ +// style({ transform: 'translateY(0%)', opacity: 0 }), +// animate('200ms ease-in-out', style({ transform: 'translateY(0%)', opacity: 1 })) +// ]; const justEnterDom = [style({ opacity: 0 })]; const fadeMoveIn = [ style({ transform: 'translateY(30px)' }), - animate('250ms ease-in-out', style({ transform: 'translateY(0px)', opacity: 1 })) + animate('150ms ease-in-out', style({ transform: 'translateY(0px)', opacity: 1 })) ]; export const pageTransition = trigger('pageTransition', [ @@ -30,28 +31,19 @@ export const pageTransition = trigger('pageTransition', [ /** keep the dom clean - let all items "just" enter */ query(':enter mat-card', justEnterDom, { optional: true }), - query(':enter .on-transition-fade', justEnterDom, { optional: true }), query(':enter mat-row', justEnterDom, { optional: true }), - query(':enter mat-expansion-panel', justEnterDom, { optional: true }), /** parallel vanishing */ group([ - query(':leave .on-transition-fade', fadeVanish, { optional: true }), query(':leave mat-card', fadeVanish, { optional: true }), - query(':leave mat-row', fadeVanish, { optional: true }), - query(':leave mat-expansion-panel', fadeVanish, { optional: true }) + query(':leave mat-row', fadeVanish, { optional: true }) ]), /** parallel appearing */ group([ - /** animate fade in for the selected components */ - query(':enter .on-transition-fade', fadeAppear, { optional: true }), - /** Staggered appearing = "one after another" */ query(':enter mat-card', stagger(50, fadeMoveIn), { optional: true }), query(':enter mat-row', stagger(30, fadeMoveIn), { optional: true }) - // disabled for now. They somehow appear expanded which looks strange - // query(':enter mat-expansion-panel', stagger(30, fadeMoveIn), { optional: true }) ]) ]) ]); diff --git a/client/src/app/shared/components/head-bar/head-bar.component.html b/client/src/app/shared/components/head-bar/head-bar.component.html index 1b18b62aa..239f9dbdb 100644 --- a/client/src/app/shared/components/head-bar/head-bar.component.html +++ b/client/src/app/shared/components/head-bar/head-bar.component.html @@ -1,37 +1,27 @@ -
- - - -
+
@@ -39,21 +29,20 @@
-
+
-
+
- +
@@ -80,7 +68,7 @@