From a645c4530fe31a7643d350834439acdcaeabfa66 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Wed, 27 Mar 2019 10:13:13 +0100 Subject: [PATCH] some pre-redesign tweaks to the file page --- app/src/component/relatedContent/index.js | 2 +- app/src/page/file/view.js | 12 ++++--- app/src/styles/fileList.js | 6 ++-- app/src/styles/filePage.js | 38 +++++++++++++---------- app/src/styles/relatedContent.js | 4 +-- 5 files changed, 35 insertions(+), 27 deletions(-) diff --git a/app/src/component/relatedContent/index.js b/app/src/component/relatedContent/index.js index 0bafb6e5..428c418d 100644 --- a/app/src/component/relatedContent/index.js +++ b/app/src/component/relatedContent/index.js @@ -14,7 +14,7 @@ const select = (state, props) => ({ }); const perform = dispatch => ({ - search: query => dispatch(doSearch(query, 10, undefined, true)), + search: query => dispatch(doSearch(query, 20, undefined, true)), }); export default connect( diff --git a/app/src/page/file/view.js b/app/src/page/file/view.js index d63a8067..921e5c96 100644 --- a/app/src/page/file/view.js +++ b/app/src/page/file/view.js @@ -565,7 +565,13 @@ class FilePage extends React.PureComponent { style={showActions ? filePageStyle.scrollContainerActions : filePageStyle.scrollContainer} contentContainerstyle={showActions ? null : filePageStyle.scrollContent} ref={(ref) => { this.scrollView = ref; }}> - {title} + + {title} + this.setState({ showDescription: !this.state.showDescription })}> + + + {channelName && @@ -593,10 +599,6 @@ class FilePage extends React.PureComponent { style={[filePageStyle.actionButton, filePageStyle.bellButton]} uri={fullChannelUri} name={channelName} /> - this.setState({ showDescription: !this.state.showDescription })}> - - } diff --git a/app/src/styles/fileList.js b/app/src/styles/fileList.js index 297cada7..4210db89 100644 --- a/app/src/styles/fileList.js +++ b/app/src/styles/fileList.js @@ -39,7 +39,7 @@ const fileListStyle = StyleSheet.create({ }, title: { fontFamily: 'Inter-UI-SemiBold', - fontSize: (screenWidthPixels <= 720) ? 12 : 16 + fontSize: (screenWidthPixels <= 720) ? 12 : 14 }, uri: { fontFamily: 'Inter-UI-SemiBold', @@ -48,7 +48,7 @@ const fileListStyle = StyleSheet.create({ }, publisher: { fontFamily: 'Inter-UI-SemiBold', - fontSize: (screenWidthPixels <= 720) ? 12 : 14, + fontSize: (screenWidthPixels <= 720) ? 11 : 12, marginTop: (screenWidthPixels <= 720) ? 1 : 3, color: Colors.LbryGreen }, @@ -62,7 +62,7 @@ const fileListStyle = StyleSheet.create({ }, infoText: { fontFamily: 'Inter-UI-Regular', - fontSize: (screenWidthPixels <= 720) ? 12 : 14, + fontSize: (screenWidthPixels <= 720) ? 11 : 12, color: Colors.ChannelGrey }, downloadInfo: { diff --git a/app/src/styles/filePage.js b/app/src/styles/filePage.js index c6873d8f..b5d0a789 100644 --- a/app/src/styles/filePage.js +++ b/app/src/styles/filePage.js @@ -32,7 +32,8 @@ const filePageStyle = StyleSheet.create({ alignItems: 'center', width: screenWidth, height: containedMediaHeightWithControls, - marginTop: 60 + marginTop: 60, + marginBottom: -17 }, emptyClaimText: { fontFamily: 'Inter-UI-Regular', @@ -42,8 +43,7 @@ const filePageStyle = StyleSheet.create({ marginRight: 16 }, scrollContainer: { - flex: 1, - marginTop: -16 + flex: 1 }, scrollContent: { paddingTop: 10 @@ -53,17 +53,23 @@ const filePageStyle = StyleSheet.create({ }, title: { fontFamily: 'Inter-UI-Bold', - fontSize: 20, + fontSize: 16, + flex: 18 + }, + titleRow: { + flexDirection: 'row', marginTop: 12, - marginLeft: 20, - marginRight: 20, - marginBottom: 8 + marginBottom: 2, + marginLeft: 12, + marginRight: 12, + alignItems: 'center', + justifyContent: 'center' }, channelRow: { flexDirection: 'row', justifyContent: 'space-between', - marginLeft: 20, - marginRight: 20, + marginLeft: 12, + marginRight: 12, marginBottom: 16, }, subscriptionRow: { @@ -76,7 +82,7 @@ const filePageStyle = StyleSheet.create({ }, channelName: { fontFamily: 'Inter-UI-SemiBold', - fontSize: 16, + fontSize: 14, color: Colors.LbryGreen }, publishDateText: { @@ -90,10 +96,10 @@ const filePageStyle = StyleSheet.create({ description: { color: Colors.DescriptionGrey, fontFamily: 'Inter-UI-Regular', - fontSize: 16, - lineHeight: 20, - marginLeft: 20, - marginRight: 20, + fontSize: 13, + lineHeight: 18, + marginLeft: 12, + marginRight: 12, marginBottom: 16 }, thumbnail: { @@ -171,7 +177,6 @@ const filePageStyle = StyleSheet.create({ paddingRight: 16, paddingTop: 16, paddingBottom: 8, - marginTop: -14, width: '100%', }, fileActions: { @@ -286,7 +291,8 @@ const filePageStyle = StyleSheet.create({ alignItems: 'center', justifyContent: 'center', width: 36, - height: 36 + height: 36, + marginTop: -8 }, text: { fontFamily: 'Inter-UI-Regular', diff --git a/app/src/styles/relatedContent.js b/app/src/styles/relatedContent.js index 53732f50..888c87b5 100644 --- a/app/src/styles/relatedContent.js +++ b/app/src/styles/relatedContent.js @@ -6,8 +6,8 @@ const relatedContentStyle = StyleSheet.create({ flex: 1, paddingTop: 16, paddingBottom: 16, - paddingLeft: 24, - paddingRight: 24, + paddingLeft: 16, + paddingRight: 16, borderTopColor: Colors.LighterGrey, borderTopWidth: 1 },