-
}
- />
-
}
- />
+
);
diff --git a/app/soapbox/features/account_timeline/index.js b/app/soapbox/features/account_timeline/index.js
index 003ab8dda..49df26d9d 100644
--- a/app/soapbox/features/account_timeline/index.js
+++ b/app/soapbox/features/account_timeline/index.js
@@ -4,7 +4,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { fetchAccount, fetchAccountByUsername } from '../../actions/accounts';
import { expandAccountFeaturedTimeline, expandAccountTimeline } from '../../actions/timelines';
-import Icon from 'soapbox/components/icon';
import StatusList from '../../components/status_list';
import LoadingIndicator from '../../components/loading_indicator';
import Column from '../ui/components/column';
@@ -19,7 +18,7 @@ import { fetchPatronAccount } from '../../actions/patron';
import { getSoapboxConfig } from 'soapbox/actions/soapbox';
import { getSettings } from 'soapbox/actions/settings';
import { makeGetStatusIds, findAccountByUsername } from 'soapbox/selectors';
-import classNames from 'classnames';
+import SubNavigation from 'soapbox/components/sub_navigation';
const makeMapStateToProps = () => {
const getStatusIds = makeGetStatusIds();
@@ -82,11 +81,6 @@ class AccountTimeline extends ImmutablePureComponent {
unavailable: PropTypes.bool,
};
- state = {
- collapsed: true,
- animating: false,
- }
-
componentDidMount() {
const { params: { username }, accountId, accountApId, withReplies, me, patronEnabled } = this.props;
@@ -135,18 +129,8 @@ class AccountTimeline extends ImmutablePureComponent {
}
}
- handleToggleClick = (e) => {
- e.stopPropagation();
- this.setState({ collapsed: !this.state.collapsed, animating: true });
- }
-
- handleTransitionEnd = () => {
- this.setState({ animating: false });
- }
-
render() {
const { statusIds, featuredStatusIds, isLoading, hasMore, isBlocked, isAccount, accountId, unavailable, accountUsername } = this.props;
- const { collapsed, animating } = this.state;
if (!isAccount && accountId !== -1) {
return (
@@ -177,6 +161,12 @@ class AccountTimeline extends ImmutablePureComponent {
return (
+
@@ -187,16 +177,6 @@ class AccountTimeline extends ImmutablePureComponent {
-
-
-
-
-
-
- {(!collapsed || animating) && }
-
+
{showSuggestions ? (
{Component => }
- ) : (
+ ) : (<>
+
}} />}
/>
- )}
+ >)}
);
}
diff --git a/app/styles/components/account-header.scss b/app/styles/components/account-header.scss
index 401e3fcc5..fe4c09b99 100644
--- a/app/styles/components/account-header.scss
+++ b/app/styles/components/account-header.scss
@@ -335,3 +335,13 @@
}
}
}
+
+.account__sub-navigation {
+ display: none;
+
+ @media (max-width: 897px) {
+ display: flex;
+ position: fixed;
+ margin: 0;
+ }
+}
diff --git a/app/styles/components/columns.scss b/app/styles/components/columns.scss
index 61c3ab489..7ae141104 100644
--- a/app/styles/components/columns.scss
+++ b/app/styles/components/columns.scss
@@ -924,8 +924,8 @@
}
// Make MaterialStatus flush against SubNavigation
-.sub-navigation ~ .slist .item-list > article:first-child .material-status__status,
-.sub-navigation ~ .material-status:not(.material-status + .material-status) .material-status__status {
+.sub-navigation:not(.sub-navigation--hidden) ~ .slist .item-list > article:first-child .material-status__status,
+.sub-navigation:not(.sub-navigation--hidden) ~ .material-status:not(.material-status + .material-status) .material-status__status {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
@@ -940,7 +940,7 @@
}
}
- .sub-navigation ~ .slist .slist__append {
+ .sub-navigation:not(.sub-navigation--hidden) ~ .slist .slist__append {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
diff --git a/app/styles/components/timeline-queue-header.scss b/app/styles/components/timeline-queue-header.scss
index 93cf73d6f..da3c6b65e 100644
--- a/app/styles/components/timeline-queue-header.scss
+++ b/app/styles/components/timeline-queue-header.scss
@@ -15,7 +15,7 @@
padding: 0 10px;
z-index: 500;
- .sub-navigation ~ & {
+ .sub-navigation:not(.sub-navigation--hidden) ~ & {
top: calc(60px + 41px);
}
diff --git a/app/styles/components/wtf-panel.scss b/app/styles/components/wtf-panel.scss
index b76e7a6e4..367cab868 100644
--- a/app/styles/components/wtf-panel.scss
+++ b/app/styles/components/wtf-panel.scss
@@ -162,7 +162,7 @@
}
}
-.column .sub-navigation ~ .wtf-panel {
+.column .sub-navigation:not(.sub-navigation--hidden) ~ .wtf-panel {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
diff --git a/app/styles/navigation.scss b/app/styles/navigation.scss
index 9a8a48a44..f097876cc 100644
--- a/app/styles/navigation.scss
+++ b/app/styles/navigation.scss
@@ -128,11 +128,22 @@
align-items: center;
justify-content: center;
z-index: 999;
+ transition: transform 0.2s, border-radius 0.2s;
- &--scrolled {
+ &--sticking {
border-radius: 0 !important;
}
+ &--show-after {
+ transform: translateY(-41px) scaleY(0);
+ margin-top: -1041px;
+ margin-bottom: 1000px;
+
+ &.sub-navigation--visible {
+ transform: translateY(0) scaleY(1);
+ }
+ }
+
&__content {
width: 100%;
height: 100%;
@@ -170,6 +181,7 @@
display: flex;
align-items: center;
justify-content: center;
+ margin-left: auto;
.svg-icon {
width: 20px;
@@ -182,3 +194,7 @@
border-top-right-radius: 10px;
}
}
+
+.home-timeline .sub-navigation__back {
+ display: none;
+}