From 64f9fbb6b153d0f68b247ef58e56e9bcffb2bb37 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 14 Aug 2020 22:19:25 +0200 Subject: [PATCH 1/5] Fix closing the composer with ESC key Regression from #2161. --- js/src/forum/components/Composer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/forum/components/Composer.js b/js/src/forum/components/Composer.js index 44a8c942e0..907fb4b6f6 100644 --- a/js/src/forum/components/Composer.js +++ b/js/src/forum/components/Composer.js @@ -82,7 +82,7 @@ export default class Composer extends Component { }); // When the escape key is pressed on any inputs, close the composer. - this.$().on('keydown', ':input', 'esc', () => this.close()); + this.$().on('keydown', ':input', 'esc', () => this.state.close()); const handlers = {}; From ce3d08c643286273219a3b480f789db3e96ee5eb Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 14 Aug 2020 22:20:41 +0200 Subject: [PATCH 2/5] Remove obsolete method Regression from #2162. --- js/src/common/components/Modal.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/js/src/common/components/Modal.js b/js/src/common/components/Modal.js index e72493e667..637a100d91 100644 --- a/js/src/common/components/Modal.js +++ b/js/src/common/components/Modal.js @@ -105,8 +105,6 @@ export default class Modal extends Component { this.$('form').find('input, select, textarea').first().focus().select(); } - onhide() {} - /** * Hide the modal. */ From b5357ba46902b60a73216959c822eeeb798d5b4a Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 14 Aug 2020 22:24:50 +0200 Subject: [PATCH 3/5] Mark method as protected --- js/src/forum/components/SignUpModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/forum/components/SignUpModal.js b/js/src/forum/components/SignUpModal.js index c13d71b259..12b590e001 100644 --- a/js/src/forum/components/SignUpModal.js +++ b/js/src/forum/components/SignUpModal.js @@ -177,7 +177,7 @@ export default class SignUpModal extends Modal { * Get the data that should be submitted in the sign-up request. * * @return {Object} - * @public + * @protected */ submitData() { const data = { From 90707a4d287166db0439da396acd2e67e260cb81 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 14 Aug 2020 22:41:31 +0200 Subject: [PATCH 4/5] Fade in posts in post stream using CSS This also avoids a double-fade from the JavaScript code, which was probably introduced in #2160. --- js/src/forum/components/PostStream.js | 6 ------ less/forum/PostStream.less | 11 +++++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/js/src/forum/components/PostStream.js b/js/src/forum/components/PostStream.js index ec8c61fd4c..cc589c5fa4 100644 --- a/js/src/forum/components/PostStream.js +++ b/js/src/forum/components/PostStream.js @@ -24,11 +24,6 @@ export default class PostStream extends Component { } view() { - function fadeIn(element, isInitialized, context) { - if (!context.fadedIn) $(element).hide().fadeIn(); - context.fadedIn = true; - } - let lastTime; const viewingEnd = this.stream.viewingEnd(); @@ -45,7 +40,6 @@ export default class PostStream extends Component { content = PostComponent ? PostComponent.component({ post }) : ''; attrs.key = 'post' + post.id(); - attrs.config = fadeIn; attrs['data-time'] = time.toISOString(); attrs['data-number'] = post.number(); attrs['data-id'] = post.id(); diff --git a/less/forum/PostStream.less b/less/forum/PostStream.less index 98374e59e2..49f9299634 100644 --- a/less/forum/PostStream.less +++ b/less/forum/PostStream.less @@ -6,7 +6,18 @@ margin-top: 10px; } } + +@-webkit-keyframes fadeIn { + 0% {opacity: 0} + 100% {opacity: 1} +} +@keyframes fadeIn { + 0% {opacity: 0} + 100% {opacity: 1} +} .PostStream-item { + .animation(pulsate 1s ease-in-out); + &:not(:last-child) { border-bottom: 1px solid @control-bg; From 51706d4aaaef3ba168ff21833644adde4a9dbac3 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Sat, 15 Aug 2020 18:46:12 -0400 Subject: [PATCH 5/5] Fix fadeIn for post stream items --- less/forum/PostStream.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/less/forum/PostStream.less b/less/forum/PostStream.less index 49f9299634..06470cad54 100644 --- a/less/forum/PostStream.less +++ b/less/forum/PostStream.less @@ -16,7 +16,7 @@ 100% {opacity: 1} } .PostStream-item { - .animation(pulsate 1s ease-in-out); + .animation(fadeIn 0.6s ease-in-out); &:not(:last-child) { border-bottom: 1px solid @control-bg;