diff --git a/app/soapbox/components/column_header.js b/app/soapbox/components/column_header.js
index 9a70e16cb..bb1fce818 100644
--- a/app/soapbox/components/column_header.js
+++ b/app/soapbox/components/column_header.js
@@ -2,17 +2,17 @@
import React from 'react';
import PropTypes from 'prop-types';
-import classNames from 'classnames';
-import { injectIntl, defineMessages } from 'react-intl';
-import Icon from 'soapbox/components/icon';
+// import classNames from 'classnames';
+// import { injectIntl, defineMessages } from 'react-intl';
+// import Icon from 'soapbox/components/icon';
+import SubNavigation from 'soapbox/components/sub_navigation';
-const messages = defineMessages({
- show: { id: 'column_header.show_settings', defaultMessage: 'Show settings' },
- hide: { id: 'column_header.hide_settings', defaultMessage: 'Hide settings' },
-});
+// const messages = defineMessages({
+// show: { id: 'column_header.show_settings', defaultMessage: 'Show settings' },
+// hide: { id: 'column_header.hide_settings', defaultMessage: 'Hide settings' },
+// });
-export default @injectIntl
-class ColumnHeader extends React.PureComponent {
+export default class ColumnHeader extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,
@@ -54,69 +54,75 @@ class ColumnHeader extends React.PureComponent {
}
render() {
- const { title, icon, active, children, extraButton, intl: { formatMessage } } = this.props;
- const { collapsed, animating } = this.state;
+ const { title } = this.props;
- const wrapperClassName = classNames('column-header__wrapper', {
- 'active': active,
- });
-
- const buttonClassName = classNames('column-header', {
- 'active': active,
- });
-
- const collapsibleClassName = classNames('column-header__collapsible', {
- 'collapsed': collapsed,
- 'animating': animating,
- });
-
- const collapsibleButtonClassName = classNames('column-header__button', {
- 'active': !collapsed,
- });
-
- let extraContent, collapseButton;
-
- if (children) {
- extraContent = (
-
- {children}
-
- );
- }
-
- const collapsedContent = [
- extraContent,
- ];
-
- if (children) {
- collapseButton = ;
- }
-
- const hasTitle = icon && title;
-
- return (
-
-
- {hasTitle && (
-
- )}
-
-
- {extraButton}
- {collapseButton}
-
-
-
-
-
- {(!collapsed || animating) && collapsedContent}
-
-
-
- );
+ return ;
}
+ // render() {
+ // const { title, icon, active, children, extraButton, intl: { formatMessage } } = this.props;
+ // const { collapsed, animating } = this.state;
+ //
+ // const wrapperClassName = classNames('column-header__wrapper', {
+ // 'active': active,
+ // });
+ //
+ // const buttonClassName = classNames('column-header', {
+ // 'active': active,
+ // });
+ //
+ // const collapsibleClassName = classNames('column-header__collapsible', {
+ // 'collapsed': collapsed,
+ // 'animating': animating,
+ // });
+ //
+ // const collapsibleButtonClassName = classNames('column-header__button', {
+ // 'active': !collapsed,
+ // });
+ //
+ // let extraContent, collapseButton;
+ //
+ // if (children) {
+ // extraContent = (
+ //
+ // {children}
+ //
+ // );
+ // }
+ //
+ // const collapsedContent = [
+ // extraContent,
+ // ];
+ //
+ // if (children) {
+ // collapseButton = ;
+ // }
+ //
+ // const hasTitle = icon && title;
+ //
+ // return (
+ //
+ //
+ // {hasTitle && (
+ //
+ // )}
+ //
+ //
+ // {extraButton}
+ // {collapseButton}
+ //
+ //
+ //
+ //
+ //
+ // {(!collapsed || animating) && collapsedContent}
+ //
+ //
+ //
+ // );
+ // }
+
}
diff --git a/app/soapbox/components/sub_navigation.js b/app/soapbox/components/sub_navigation.js
index 739cdf80c..8d138dda2 100644
--- a/app/soapbox/components/sub_navigation.js
+++ b/app/soapbox/components/sub_navigation.js
@@ -1,52 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';
-import { connect } from 'react-redux';
-import { injectIntl, defineMessages, FormattedMessage } from 'react-intl';
+import { FormattedMessage } from 'react-intl';
import Icon from 'soapbox/components/icon';
-import { withRouter, matchPath } from 'react-router-dom';
-const routes = [
- ['status', { path: '/@:username/posts/:statusId' }],
- ['account', { path: '/@:username' }],
- ['local_timeline', { path: '/timeline/local' }],
- ['fediverse_timeline', { path: '/timeline/fediverse' }],
- ['remote_timeline', { path: '/timeline/:instance' }],
-];
-
-const findRoute = path => routes.find(v => matchPath(path, v[1]));
-
-const findRouteType = path => {
- const route = findRoute(path) || [];
- return route[0];
-};
-
-const findMatch = path => {
- const route = findRoute(path) || [];
- return matchPath(path, route[1]);
-};
-
-const messages = defineMessages({
- status: { id: 'sub_navigation.status', defaultMessage: 'Post' },
- account: { id: 'sub_navigation.account', defaultMessage: 'Profile' },
- local_timeline: { id: 'sub_navigation.local_timeline', defaultMessage: '{siteTitle}' },
- fediverse_timeline: { id: 'sub_navigation.fediverse_timeline', defaultMessage: 'Fediverse' },
- remote_timeline: { id: 'sub_navigation.remote_timeline', defaultMessage: '{instance}' },
-});
-
-const mapStateToProps = state => {
- return {
- siteTitle: state.getIn(['instance', 'title']),
- };
-};
-
-export default @withRouter
-@connect(mapStateToProps)
-@injectIntl
-class SubNavigation extends React.PureComponent {
+export default class SubNavigation extends React.PureComponent {
static propTypes = {
intl: PropTypes.object.isRequired,
- siteTitle: PropTypes.string,
+ message: PropTypes.string,
}
static contextTypes = {
@@ -67,24 +28,8 @@ class SubNavigation extends React.PureComponent {
}
}
- getMessage = () => {
- const path = this.context.router.history.location.pathname;
- const type = findRouteType(path);
-
- return messages[type] || null;
- }
-
- getParams = () => {
- const path = this.context.router.history.location.pathname;
- return (findMatch(path) || {}).params;
- }
-
render() {
- const { intl, siteTitle } = this.props;
- const message = this.getMessage();
- const params = this.getParams();
-
- if (!message) return null;
+ const { message } = this.props;
return (
@@ -98,7 +43,7 @@ class SubNavigation extends React.PureComponent {
- {intl.formatMessage(message, { siteTitle, ...params })}
+ {message}
diff --git a/app/soapbox/features/community_timeline/index.js b/app/soapbox/features/community_timeline/index.js
index 0ce9b3838..b3a7e8161 100644
--- a/app/soapbox/features/community_timeline/index.js
+++ b/app/soapbox/features/community_timeline/index.js
@@ -7,6 +7,7 @@ import Column from '../../components/column';
import { expandCommunityTimeline } from '../../actions/timelines';
import { connectCommunityStream } from '../../actions/streaming';
import { getSettings } from 'soapbox/actions/settings';
+import SubNavigation from 'soapbox/components/sub_navigation';
const messages = defineMessages({
title: { id: 'column.community', defaultMessage: 'Local timeline' },
@@ -73,6 +74,7 @@ class CommunityTimeline extends React.PureComponent {
return (
+
+
{showExplanationBox &&
+
{/*
Eye icon to show/hide all CWs in a thread.
I'm not convinced of the value of this. It needs a better design at the very least.
diff --git a/app/soapbox/features/ui/components/column.js b/app/soapbox/features/ui/components/column.js
index 77c18283e..4d4986cdc 100644
--- a/app/soapbox/features/ui/components/column.js
+++ b/app/soapbox/features/ui/components/column.js
@@ -1,8 +1,6 @@
import React from 'react';
import ColumnHeader from './column_header';
import PropTypes from 'prop-types';
-import ColumnBackButton from '../../../components/column_back_button';
-import ColumnBackButtonSlim from '../../../components/column_back_button_slim';
export default class Column extends React.PureComponent {
@@ -11,9 +9,7 @@ export default class Column extends React.PureComponent {
icon: PropTypes.string,
children: PropTypes.node,
active: PropTypes.bool,
- backBtnSlim: PropTypes.bool,
showBackBtn: PropTypes.bool,
- back: PropTypes.string,
};
static defaultProps = {
@@ -21,14 +17,12 @@ export default class Column extends React.PureComponent {
}
render() {
- const { heading, icon, children, active, backBtnSlim, showBackBtn, back } = this.props;
+ const { heading, icon, children, active, showBackBtn } = this.props;
const columnHeaderId = heading && heading.replace(/ /g, '-');
- const backBtn = backBtnSlim ? () : ();
return (
- {heading && }
- {showBackBtn ? backBtn : null}
+ {heading && }
{children}
);
diff --git a/app/soapbox/features/ui/components/column_header.js b/app/soapbox/features/ui/components/column_header.js
index bb027eb38..021421194 100644
--- a/app/soapbox/features/ui/components/column_header.js
+++ b/app/soapbox/features/ui/components/column_header.js
@@ -1,7 +1,8 @@
import React from 'react';
import PropTypes from 'prop-types';
-import classNames from 'classnames';
-import Icon from 'soapbox/components/icon';
+// import classNames from 'classnames';
+// import Icon from 'soapbox/components/icon';
+import SubNavigation from 'soapbox/components/sub_navigation';
export default class ColumnHeader extends React.PureComponent {
@@ -18,16 +19,21 @@ export default class ColumnHeader extends React.PureComponent {
}
render() {
- const { icon, type, active, columnHeaderId } = this.props;
-
- return (
-
-
-
- );
+ const { type } = this.props;
+ return ;
}
+ // render() {
+ // const { icon, type, active, columnHeaderId } = this.props;
+ //
+ // return (
+ //
+ //
+ //
+ // );
+ // }
+
}
diff --git a/app/soapbox/features/ui/index.js b/app/soapbox/features/ui/index.js
index 9a7a53cad..6e563da59 100644
--- a/app/soapbox/features/ui/index.js
+++ b/app/soapbox/features/ui/index.js
@@ -41,7 +41,6 @@ import { getAccessToken } from 'soapbox/utils/auth';
import { getFeatures } from 'soapbox/utils/features';
import { fetchCustomEmojis } from 'soapbox/actions/custom_emojis';
import ThumbNavigation from 'soapbox/components/thumb_navigation';
-import SubNavigation from 'soapbox/components/sub_navigation';
import { getSoapboxConfig } from 'soapbox/actions/soapbox';
import {
@@ -669,7 +668,6 @@ class UI extends React.PureComponent {
-
{children}
diff --git a/app/soapbox/pages/status_page.js b/app/soapbox/pages/status_page.js
index a3f3ece9d..f3eb5b3ab 100644
--- a/app/soapbox/pages/status_page.js
+++ b/app/soapbox/pages/status_page.js
@@ -39,7 +39,7 @@ class StatusPage extends ImmutablePureComponent {
@@ -53,7 +53,7 @@ class StatusPage extends ImmutablePureComponent {
-
+
{me ? (
{Component => }
diff --git a/app/styles/components/columns.scss b/app/styles/components/columns.scss
index 7533d7fb3..744e734d3 100644
--- a/app/styles/components/columns.scss
+++ b/app/styles/components/columns.scss
@@ -42,9 +42,11 @@
width: 100%;
max-width: 600px;
padding: 0 20px;
- @media screen and (max-width: 375px) {
- padding: 0 10px;
+
+ @media screen and (max-width: 580px) {
+ padding: 0;
}
+
@media screen and (min-width: 896px) {
margin: 0 20px;
padding: 0;
@@ -105,7 +107,9 @@
padding: 0;
}
- .autosuggest-textarea__textarea { font-size: 16px; }
+ .autosuggest-textarea__textarea {
+ font-size: 16px;
+ }
.search__input {
line-height: 18px;
@@ -116,7 +120,14 @@
background-color: var(--foreground-color);
}
- .search__icon .fa { top: 15px; }
+ .search__icon .fa {
+ top: 15px;
+ }
+
+ @media (max-width: 580px) {
+ padding: 0;
+ }
+
@media screen and (min-width: 630px) {
.detailed-status {
padding: 15px;
diff --git a/app/styles/ui.scss b/app/styles/ui.scss
index 6ef829d6f..1173bfbca 100644
--- a/app/styles/ui.scss
+++ b/app/styles/ui.scss
@@ -329,7 +329,7 @@
.ui {
display: block;
width: 100%;
- padding: 0 0 100px;
+ padding: 0 0 calc(var(--thumb-navigation-height) + 86px);
.page {
display: flex;