From 51d0e1c7b4a4340a691fbcf0f0b4378519c6d21f Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 21 Nov 2020 23:19:04 +0100 Subject: [Glitch] Fix hardcoded frame rate for frame by frame video navigation in web UI Port f970e1fab6ca5d2334604b86d6e472e64510ea40 to glitch-soc Signed-off-by: Thibaut Girka --- app/javascript/flavours/glitch/components/status.js | 1 + 1 file changed, 1 insertion(+) (limited to 'app/javascript/flavours/glitch/components') diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index 1b7dce4c4..fcbf4be8c 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -628,6 +628,7 @@ class Status extends ImmutablePureComponent { {Component => ( Date: Sat, 21 Nov 2020 23:54:36 +0100 Subject: [Glitch] Remove fade-in animation from modals in web UI Signed-off-by: Thibaut Girka --- .../flavours/glitch/components/modal_root.js | 18 ++++-------------- .../flavours/glitch/styles/components/modal.scss | 2 -- 2 files changed, 4 insertions(+), 16 deletions(-) (limited to 'app/javascript/flavours/glitch/components') diff --git a/app/javascript/flavours/glitch/components/modal_root.js b/app/javascript/flavours/glitch/components/modal_root.js index 8d73a1e40..13a8e8702 100644 --- a/app/javascript/flavours/glitch/components/modal_root.js +++ b/app/javascript/flavours/glitch/components/modal_root.js @@ -14,11 +14,7 @@ export default class ModalRoot extends React.PureComponent { noEsc: PropTypes.bool, }; - state = { - revealed: !!this.props.children, - }; - - activeElement = this.state.revealed ? document.activeElement : null; + activeElement = this.props.children ? document.activeElement : null; handleKeyUp = (e) => { if ((e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27) @@ -59,8 +55,6 @@ export default class ModalRoot extends React.PureComponent { this.activeElement = document.activeElement; this.getSiblings().forEach(sibling => sibling.setAttribute('inert', true)); - } else if (!nextProps.children) { - this.setState({ revealed: false }); } } @@ -80,11 +74,8 @@ export default class ModalRoot extends React.PureComponent { this.handleModalClose(); } - if (this.props.children) { - requestAnimationFrame(() => { - this.setState({ revealed: true }); - }); - if (!prevProps.children) this.handleModalOpen(); + if (this.props.children && !prevProps.children) { + this.handleModalOpen(); } } @@ -121,7 +112,6 @@ export default class ModalRoot extends React.PureComponent { render () { const { children, onClose } = this.props; - const { revealed } = this.state; const visible = !!children; if (!visible) { @@ -131,7 +121,7 @@ export default class ModalRoot extends React.PureComponent { } return ( -
+
{children}
diff --git a/app/javascript/flavours/glitch/styles/components/modal.scss b/app/javascript/flavours/glitch/styles/components/modal.scss index bc0965864..421cbec00 100644 --- a/app/javascript/flavours/glitch/styles/components/modal.scss +++ b/app/javascript/flavours/glitch/styles/components/modal.scss @@ -4,8 +4,6 @@ .modal-root { position: relative; - transition: opacity 0.3s linear; - will-change: opacity; z-index: 9999; } -- cgit