-
- }
- />
- }
- />
-
+
);
diff --git a/app/soapbox/features/account_timeline/index.js b/app/soapbox/features/account_timeline/index.js
index 49df26d9d..003ab8dda 100644
--- a/app/soapbox/features/account_timeline/index.js
+++ b/app/soapbox/features/account_timeline/index.js
@@ -4,6 +4,7 @@ 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';
@@ -18,7 +19,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 SubNavigation from 'soapbox/components/sub_navigation';
+import classNames from 'classnames';
const makeMapStateToProps = () => {
const getStatusIds = makeGetStatusIds();
@@ -81,6 +82,11 @@ class AccountTimeline extends ImmutablePureComponent {
unavailable: PropTypes.bool,
};
+ state = {
+ collapsed: true,
+ animating: false,
+ }
+
componentDidMount() {
const { params: { username }, accountId, accountApId, withReplies, me, patronEnabled } = this.props;
@@ -129,8 +135,18 @@ 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 (
@@ -161,12 +177,6 @@ class AccountTimeline extends ImmutablePureComponent {
return (
-
@@ -177,6 +187,16 @@ 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 fe4c09b99..401e3fcc5 100644
--- a/app/styles/components/account-header.scss
+++ b/app/styles/components/account-header.scss
@@ -335,13 +335,3 @@
}
}
}
-
-.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 7ae141104..61c3ab489 100644
--- a/app/styles/components/columns.scss
+++ b/app/styles/components/columns.scss
@@ -924,8 +924,8 @@
}
// Make MaterialStatus flush against SubNavigation
-.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 {
+.sub-navigation ~ .slist .item-list > article:first-child .material-status__status,
+.sub-navigation ~ .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:not(.sub-navigation--hidden) ~ .slist .slist__append {
+ .sub-navigation ~ .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 da3c6b65e..93cf73d6f 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:not(.sub-navigation--hidden) ~ & {
+ .sub-navigation ~ & {
top: calc(60px + 41px);
}
diff --git a/app/styles/components/wtf-panel.scss b/app/styles/components/wtf-panel.scss
index 367cab868..b76e7a6e4 100644
--- a/app/styles/components/wtf-panel.scss
+++ b/app/styles/components/wtf-panel.scss
@@ -162,7 +162,7 @@
}
}
-.column .sub-navigation:not(.sub-navigation--hidden) ~ .wtf-panel {
+.column .sub-navigation ~ .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 f097876cc..9a8a48a44 100644
--- a/app/styles/navigation.scss
+++ b/app/styles/navigation.scss
@@ -128,22 +128,11 @@
align-items: center;
justify-content: center;
z-index: 999;
- transition: transform 0.2s, border-radius 0.2s;
- &--sticking {
+ &--scrolled {
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%;
@@ -181,7 +170,6 @@
display: flex;
align-items: center;
justify-content: center;
- margin-left: auto;
.svg-icon {
width: 20px;
@@ -194,7 +182,3 @@
border-top-right-radius: 10px;
}
}
-
-.home-timeline .sub-navigation__back {
- display: none;
-}