From 2db2b870ff0af8566b98941f6ee0d936baced11c Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 12 Aug 2020 11:44:28 -0400 Subject: [PATCH] fix document layout and remove WaitUntilOnPage wrapper for related content --- ui/component/fileRender/view.jsx | 4 ++-- ui/component/recommendedContent/view.jsx | 22 ++++++++-------------- ui/scss/component/_file-render.scss | 2 ++ 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/ui/component/fileRender/view.jsx b/ui/component/fileRender/view.jsx index 93583ada7..b1390e4c8 100644 --- a/ui/component/fileRender/view.jsx +++ b/ui/component/fileRender/view.jsx @@ -1,6 +1,6 @@ // @flow import { remote } from 'electron'; -import React, { Suspense } from 'react'; +import React from 'react'; import classnames from 'classnames'; import * as RENDER_MODES from 'constants/file_render_modes'; import VideoViewer from 'component/viewers/videoViewer'; @@ -152,7 +152,7 @@ class FileRender extends React.PureComponent { 'file-render--embed': embedded, })} > - }>{this.renderViewer()} + {this.renderViewer()} ); } diff --git a/ui/component/recommendedContent/view.jsx b/ui/component/recommendedContent/view.jsx index 75504faba..eda0bb51f 100644 --- a/ui/component/recommendedContent/view.jsx +++ b/ui/component/recommendedContent/view.jsx @@ -4,7 +4,6 @@ import React from 'react'; import ClaimList from 'component/claimList'; import Ads from 'web/component/ads'; import Card from 'component/common/card'; -import WaitUntilOnPage from 'component/common/wait-until-on-page'; type Options = { related_to: string, @@ -26,7 +25,6 @@ export default class RecommendedContent extends React.PureComponent { super(); this.didSearch = undefined; - this.lastReset = undefined; } componentDidMount() { @@ -38,7 +36,6 @@ export default class RecommendedContent extends React.PureComponent { if (uri !== prevProps.uri) { this.didSearch = false; - this.lastReset = Date.now(); } if (claim && !this.didSearch) { @@ -63,7 +60,6 @@ export default class RecommendedContent extends React.PureComponent { } didSearch: ?boolean; - lastReset: ?any; render() { const { recommendedContent, isSearching, isAuthenticated } = this.props; @@ -75,16 +71,14 @@ export default class RecommendedContent extends React.PureComponent { className="file-page__recommended" title={__('Related')} body={ - - } - empty={__('No related content found')} - /> - + } + empty={__('No related content found')} + /> } /> ); diff --git a/ui/scss/component/_file-render.scss b/ui/scss/component/_file-render.scss index a1721fbf0..6252cee47 100644 --- a/ui/scss/component/_file-render.scss +++ b/ui/scss/component/_file-render.scss @@ -52,8 +52,10 @@ } .file-render--document { + height: auto; max-height: none; overflow: auto; + margin-bottom: var(--spacing-l); .markdown-preview { height: 100%;