From 47870606081149a1a5dd9733eacbd392961bb6db Mon Sep 17 00:00:00 2001
From: mgabdev <>
Date: Wed, 15 Jan 2020 11:14:44 -0500
Subject: [PATCH] Updated max lines of status content
Improving visibility
---
.../gabsocial/components/status_content.js | 2 +-
.../gabsocial/components/status_quote.js | 45 ++++++++++---------
.../styles/gabsocial/components.scss | 2 +-
3 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/app/javascript/gabsocial/components/status_content.js b/app/javascript/gabsocial/components/status_content.js
index 0b274e72..46a6d303 100644
--- a/app/javascript/gabsocial/components/status_content.js
+++ b/app/javascript/gabsocial/components/status_content.js
@@ -7,7 +7,7 @@ import Permalink from './permalink';
import classnames from 'classnames';
import Icon from 'gabsocial/components/icon';
-const MAX_HEIGHT = 642; // 20px * 32 (+ 2px padding at the top)
+const MAX_HEIGHT = 200;
export default class StatusContent extends React.PureComponent {
diff --git a/app/javascript/gabsocial/components/status_quote.js b/app/javascript/gabsocial/components/status_quote.js
index b4d03379..623d1eda 100644
--- a/app/javascript/gabsocial/components/status_quote.js
+++ b/app/javascript/gabsocial/components/status_quote.js
@@ -7,36 +7,37 @@ import { connect } from 'react-redux';
import { NavLink } from 'react-router-dom';
const mapStateToProps = (state, { id }) => ({
- status: state.getIn(['statuses', id]),
- account: state.getIn(['accounts', state.getIn(['statuses', id, 'account'])]),
+ status: state.getIn(['statuses', id]),
+ account: state.getIn(['accounts', state.getIn(['statuses', id, 'account'])]),
});
@connect(mapStateToProps)
export default class StatusQuote extends React.PureComponent {
- static contextTypes = {
- router: PropTypes.object,
- };
-
- static propTypes = {
- status: ImmutablePropTypes.map.isRequired,
- };
+ static contextTypes = {
+ router: PropTypes.object,
+ };
- render() {
- const { status, account } = this.props;
+ static propTypes = {
+ status: ImmutablePropTypes.map.isRequired,
+ };
- const statusUrl = `/${account.get('acct')}/posts/${status.get('id')}`;
+ render() {
+ const { status, account } = this.props;
- return (
-
-
+ const statusUrl = `/${account.get('acct')}/posts/${status.get('id')}`;
-
-
- );
- }
+ return (
+
+
+
+
+ );
+ }
}
\ No newline at end of file
diff --git a/app/javascript/styles/gabsocial/components.scss b/app/javascript/styles/gabsocial/components.scss
index fd83909d..e92bf3d5 100644
--- a/app/javascript/styles/gabsocial/components.scss
+++ b/app/javascript/styles/gabsocial/components.scss
@@ -428,7 +428,7 @@
}
.status__content.status__content--collapsed {
- max-height: 20px * 15; // 15 lines is roughly above 500 characters
+ max-height: 20px * 10; // 10 lines x 20px per line of text
}
.status__content__read-more-button {