From e3b85adb35386e16b06d73017a95a5fecf3d5b84 Mon Sep 17 00:00:00 2001 From: Torjus Date: Tue, 31 Jul 2018 14:01:22 +0200 Subject: [PATCH 1/3] Fade out fullscreen button --- app/lib/components/FullScreenView.jsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/lib/components/FullScreenView.jsx b/app/lib/components/FullScreenView.jsx index cee2dd0..ebf62f4 100644 --- a/app/lib/components/FullScreenView.jsx +++ b/app/lib/components/FullScreenView.jsx @@ -11,7 +11,8 @@ const FullScreenView = (props) => const { advancedMode, consumer, - toggleConsumerFullscreen + toggleConsumerFullscreen, + toolbarsVisible } = props; if (!consumer) @@ -39,7 +40,9 @@ const FullScreenView = (props) =>
{ e.stopPropagation(); @@ -63,13 +66,15 @@ FullScreenView.propTypes = { advancedMode : PropTypes.bool, consumer : appPropTypes.Consumer, - toggleConsumerFullscreen : PropTypes.func.isRequired + toggleConsumerFullscreen : PropTypes.func.isRequired, + toolbarsVisible : PropTypes.bool }; const mapStateToProps = (state) => { return { - consumer : state.consumers[state.room.fullScreenConsumer] + consumer : state.consumers[state.room.fullScreenConsumer], + toolbarsVisible : state.room.toolbarsVisible }; }; From b2cc744cf07df44e70c374cf452e87f9ca50d83c Mon Sep 17 00:00:00 2001 From: Torjus Date: Tue, 31 Jul 2018 14:13:42 +0200 Subject: [PATCH 2/3] Add missing keyframe file --- app/stylus/components/Room.styl | 4 ++-- app/stylus/index.styl | 1 + app/stylus/keyframes.styl | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 app/stylus/keyframes.styl diff --git a/app/stylus/components/Room.styl b/app/stylus/components/Room.styl index dcc62d5..142394e 100644 --- a/app/stylus/components/Room.styl +++ b/app/stylus/components/Room.styl @@ -179,13 +179,13 @@ .room-controls { visibility: hidden; - animation: fade-out 0.5s; + animation: fade-out 0.3s; opacity: 0; &.visible { visibility: visible; opacity: 1; - animation: fade-in 0.5s; + animation: fade-in 0.3s; } } diff --git a/app/stylus/index.styl b/app/stylus/index.styl index 5e67e46..fa63dee 100644 --- a/app/stylus/index.styl +++ b/app/stylus/index.styl @@ -5,6 +5,7 @@ global-reset(); @import './mixins'; @import './fonts'; @import './reset'; +@import './keyframes'; html { height: 100%; diff --git a/app/stylus/keyframes.styl b/app/stylus/keyframes.styl new file mode 100644 index 0000000..f6444c9 --- /dev/null +++ b/app/stylus/keyframes.styl @@ -0,0 +1,20 @@ +@keyframes fade-in { + from { + opacity: 0; + visibility: hidden; + } + to { + opacity: 1; + visibility: visible; + } +} + @keyframes fade-out { + from { + opacity: 1; + visibility: visible; + } + to { + opacity: 0; + visibility: hidden; + } +} \ No newline at end of file From b0f1e66c2ffee77894feb8ca5f517f650cda41e0 Mon Sep 17 00:00:00 2001 From: Torjus Date: Tue, 31 Jul 2018 14:17:11 +0200 Subject: [PATCH 3/3] Support fading elements with a previously set opacity without flicker --- app/stylus/keyframes.styl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/stylus/keyframes.styl b/app/stylus/keyframes.styl index f6444c9..76a728e 100644 --- a/app/stylus/keyframes.styl +++ b/app/stylus/keyframes.styl @@ -3,17 +3,18 @@ opacity: 0; visibility: hidden; } + to { - opacity: 1; visibility: visible; } } - @keyframes fade-out { + +@keyframes fade-out { from { - opacity: 1; visibility: visible; } - to { + + to { opacity: 0; visibility: hidden; }