diff --git a/app/soapbox/features/groups/create/index.js b/app/soapbox/features/groups/create/index.js
deleted file mode 100644
index d7189baa4..000000000
--- a/app/soapbox/features/groups/create/index.js
+++ /dev/null
@@ -1,116 +0,0 @@
-import classNames from 'clsx';
-import PropTypes from 'prop-types';
-import React from 'react';
-import { defineMessages, injectIntl } from 'react-intl';
-import { connect } from 'react-redux';
-import { withRouter } from 'react-router-dom';
-
-import { changeValue, submit, reset } from '../../../actions/group_editor';
-
-const messages = defineMessages({
- title: { id: 'groups.form.title', defaultMessage: 'Enter a new group title' },
- description: { id: 'groups.form.description', defaultMessage: 'Enter the group description' },
- coverImage: { id: 'groups.form.coverImage', defaultMessage: 'Upload a banner image' },
- coverImageChange: { id: 'groups.form.coverImageChange', defaultMessage: 'Banner image selected' },
- create: { id: 'groups.form.create', defaultMessage: 'Create group' },
-});
-
-const mapStateToProps = state => ({
- title: state.getIn(['group_editor', 'title']),
- description: state.getIn(['group_editor', 'description']),
- coverImage: state.getIn(['group_editor', 'coverImage']),
- disabled: state.getIn(['group_editor', 'isSubmitting']),
-});
-
-const mapDispatchToProps = dispatch => ({
- onTitleChange: value => dispatch(changeValue('title', value)),
- onDescriptionChange: value => dispatch(changeValue('description', value)),
- onCoverImageChange: value => dispatch(changeValue('coverImage', value)),
- onSubmit: routerHistory => dispatch(submit(routerHistory)),
- reset: () => dispatch(reset()),
-});
-
-export default @connect(mapStateToProps, mapDispatchToProps)
-@injectIntl
-@withRouter
-class Create extends React.PureComponent {
-
- static propTypes = {
- title: PropTypes.string.isRequired,
- description: PropTypes.string.isRequired,
- coverImage: PropTypes.object,
- disabled: PropTypes.bool,
- intl: PropTypes.object.isRequired,
- onTitleChange: PropTypes.func.isRequired,
- onSubmit: PropTypes.func.isRequired,
- reset: PropTypes.func.isRequired,
- onDescriptionChange: PropTypes.func.isRequired,
- onCoverImageChange: PropTypes.func.isRequired,
- history: PropTypes.object,
- };
-
- constructor(props) {
- super(props);
- props.reset();
- }
-
- handleTitleChange = e => {
- this.props.onTitleChange(e.target.value);
- }
-
- handleDescriptionChange = e => {
- this.props.onDescriptionChange(e.target.value);
- }
-
- handleCoverImageChange = e => {
- this.props.onCoverImageChange(e.target.files[0]);
- }
-
- handleSubmit = e => {
- e.preventDefault();
- this.props.onSubmit(this.props.history);
- }
-
- render() {
- const { title, description, coverImage, disabled, intl } = this.props;
-
- return (
-
- );
- }
-
-}
diff --git a/app/soapbox/features/groups/edit/index.js b/app/soapbox/features/groups/edit/index.js
deleted file mode 100644
index 2e040aa0e..000000000
--- a/app/soapbox/features/groups/edit/index.js
+++ /dev/null
@@ -1,148 +0,0 @@
-import classNames from 'clsx';
-import PropTypes from 'prop-types';
-import React from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { defineMessages, injectIntl } from 'react-intl';
-import { connect } from 'react-redux';
-import { withRouter } from 'react-router-dom';
-
-import MissingIndicator from 'soapbox/components/missing_indicator';
-import { Column, Spinner } from 'soapbox/components/ui';
-
-import { changeValue, submit, setUp } from '../../../actions/group_editor';
-
-const messages = defineMessages({
- title: { id: 'groups.form.title', defaultMessage: 'Title' },
- description: { id: 'groups.form.description', defaultMessage: 'Description' },
- coverImage: { id: 'groups.form.coverImage', defaultMessage: 'Upload new banner image (optional)' },
- coverImageChange: { id: 'groups.form.coverImageChange', defaultMessage: 'Banner image selected' },
- update: { id: 'groups.form.update', defaultMessage: 'Update group' },
-});
-
-const mapStateToProps = (state, props) => ({
- group: state.getIn(['groups', props.params.id]),
- title: state.getIn(['group_editor', 'title']),
- description: state.getIn(['group_editor', 'description']),
- coverImage: state.getIn(['group_editor', 'coverImage']),
- disabled: state.getIn(['group_editor', 'isSubmitting']),
-});
-
-const mapDispatchToProps = dispatch => ({
- onTitleChange: value => dispatch(changeValue('title', value)),
- onDescriptionChange: value => dispatch(changeValue('description', value)),
- onCoverImageChange: value => dispatch(changeValue('coverImage', value)),
- onSubmit: routerHistory => dispatch(submit(routerHistory)),
- setUp: group => dispatch(setUp(group)),
-});
-
-export default @connect(mapStateToProps, mapDispatchToProps)
-@injectIntl
-@withRouter
-class Edit extends React.PureComponent {
-
- static propTypes = {
- group: ImmutablePropTypes.map,
- title: PropTypes.string.isRequired,
- description: PropTypes.string.isRequired,
- coverImage: PropTypes.object,
- disabled: PropTypes.bool,
- intl: PropTypes.object.isRequired,
- onTitleChange: PropTypes.func.isRequired,
- onSubmit: PropTypes.func.isRequired,
- onDescriptionChange: PropTypes.func.isRequired,
- onCoverImageChange: PropTypes.func.isRequired,
- setUp: PropTypes.func.isRequired,
- history: PropTypes.object,
- };
-
- constructor(props) {
- super(props);
- if (props.group) props.setUp(props.group);
- }
-
- componentDidUpdate(prevProps) {
- if (!prevProps.group && this.props.group) {
- this.props.setUp(this.props.group);
- }
- }
-
- handleTitleChange = e => {
- this.props.onTitleChange(e.target.value);
- }
-
- handleDescriptionChange = e => {
- this.props.onDescriptionChange(e.target.value);
- }
-
- handleCoverImageChange = e => {
- this.props.onCoverImageChange(e.target.files[0]);
- }
-
- handleSubmit = e => {
- e.preventDefault();
- this.props.onSubmit(this.props.history);
- }
-
- handleClick = () => {
- this.props.onSubmit(this.props.history);
- }
-
- render() {
- const { group, title, description, coverImage, disabled, intl } = this.props;
-
- if (typeof group === 'undefined') {
- return (
-
-
-
- );
- } else if (group === false) {
- return (
-
- );
- }
-
- return (
-
- );
- }
-
-}
diff --git a/app/soapbox/features/groups/index/card.js b/app/soapbox/features/groups/index/card.js
deleted file mode 100644
index 0632a053e..000000000
--- a/app/soapbox/features/groups/index/card.js
+++ /dev/null
@@ -1,57 +0,0 @@
-import React from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { defineMessages, injectIntl } from 'react-intl';
-import { connect } from 'react-redux';
-import { Link } from 'react-router-dom';
-
-import { shortNumberFormat } from '../../../utils/numbers';
-
-const messages = defineMessages({
- members: { id: 'groups.card.members', defaultMessage: 'Members' },
- view: { id: 'groups.card.view', defaultMessage: 'View' },
- join: { id: 'groups.card.join', defaultMessage: 'Join' },
- role_member: { id: 'groups.card.roles.member', defaultMessage: 'You\'re a member' },
- role_admin: { id: 'groups.card.roles.admin', defaultMessage: 'You\'re an admin' },
-});
-
-const mapStateToProps = (state, { id }) => ({
- group: state.getIn(['groups', id]),
- relationships: state.getIn(['group_relationships', id]),
-});
-
-export default @connect(mapStateToProps)
-@injectIntl
-class GroupCard extends ImmutablePureComponent {
-
- static propTypes = {
- group: ImmutablePropTypes.map,
- relationships: ImmutablePropTypes.map,
- }
-
- getRole() {
- const { intl, relationships } = this.props;
-
- if (relationships.get('admin')) return intl.formatMessage(messages.role_admin);
- if (relationships.get('member')) return intl.formatMessage(messages.role_member);
- return null;
- }
-
- render() {
- const { intl, group } = this.props;
- const coverImageUrl = group.get('cover_image_url');
- const role = this.getRole();
-
- return (
-
- {coverImageUrl &&

}
-
-
{group.get('title')}
-
{shortNumberFormat(group.get('member_count'))} {intl.formatMessage(messages.members)}{role && · {role}}
-
{group.get('description')}
-
-
- );
- }
-
-}
diff --git a/app/soapbox/features/groups/index/index.js b/app/soapbox/features/groups/index/index.js
deleted file mode 100644
index d661cf341..000000000
--- a/app/soapbox/features/groups/index/index.js
+++ /dev/null
@@ -1,93 +0,0 @@
-import classNames from 'clsx';
-import PropTypes from 'prop-types';
-import React from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { defineMessages, injectIntl } from 'react-intl';
-import { connect } from 'react-redux';
-import { Link } from 'react-router-dom';
-
-import { fetchGroups } from '../../../actions/groups';
-import GroupCreate from '../create';
-
-import GroupCard from './card';
-
-const messages = defineMessages({
- heading: { id: 'column.groups', defaultMessage: 'Groups' },
- create: { id: 'groups.create', defaultMessage: 'Create group' },
- tab_featured: { id: 'groups.tab_featured', defaultMessage: 'Featured' },
- tab_member: { id: 'groups.tab_member', defaultMessage: 'Member' },
- tab_admin: { id: 'groups.tab_admin', defaultMessage: 'Manage' },
-});
-
-const mapStateToProps = (state, { activeTab }) => ({
- groupIds: state.getIn(['group_lists', activeTab]),
-});
-
-export default @connect(mapStateToProps)
-@injectIntl
-class Groups extends ImmutablePureComponent {
-
- static propTypes = {
- params: PropTypes.object.isRequired,
- activeTab: PropTypes.string.isRequired,
- showCreateForm: PropTypes.bool,
- dispatch: PropTypes.func.isRequired,
- groups: ImmutablePropTypes.map,
- groupIds: ImmutablePropTypes.list,
- intl: PropTypes.object.isRequired,
- };
-
- componentDidMount() {
- this.props.dispatch(fetchGroups(this.props.activeTab));
- }
-
- componentDidUpdate(oldProps) {
- if (this.props.activeTab && this.props.activeTab !== oldProps.activeTab) {
- this.props.dispatch(fetchGroups(this.props.activeTab));
- }
- }
-
- renderHeader() {
- const { intl, activeTab } = this.props;
-
- return (
-
-
{intl.formatMessage(messages.create)}
-
{intl.formatMessage(messages.heading)}
-
-
-
-
- {intl.formatMessage(messages.tab_featured)}
-
-
-
- {intl.formatMessage(messages.tab_member)}
-
-
-
- {intl.formatMessage(messages.tab_admin)}
-
-
-
-
- );
- }
-
- render() {
- const { groupIds, showCreateForm } = this.props;
-
- return (
-
- {!showCreateForm && this.renderHeader()}
- {showCreateForm &&
}
-
-
- {groupIds.map(id => )}
-
-
- );
- }
-
-}
diff --git a/app/soapbox/features/groups/members/index.js b/app/soapbox/features/groups/members/index.js
deleted file mode 100644
index 1e9e39a4d..000000000
--- a/app/soapbox/features/groups/members/index.js
+++ /dev/null
@@ -1,76 +0,0 @@
-import debounce from 'lodash/debounce';
-import PropTypes from 'prop-types';
-import React from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { FormattedMessage } from 'react-intl';
-import { connect } from 'react-redux';
-
-import { Spinner } from 'soapbox/components/ui';
-
-import {
- fetchMembers,
- expandMembers,
-} from '../../../actions/groups';
-import ScrollableList from '../../../components/scrollable_list';
-import AccountContainer from '../../../containers/account_container';
-import Column from '../../ui/components/column';
-
-const mapStateToProps = (state, { params: { id } }) => ({
- group: state.getIn(['groups', id]),
- accountIds: state.user_lists.groups.get(id)?.items,
- hasMore: !!state.user_lists.groups.get(id)?.next,
-});
-
-export default @connect(mapStateToProps)
-class GroupMembers extends ImmutablePureComponent {
-
- static propTypes = {
- params: PropTypes.object.isRequired,
- dispatch: PropTypes.func.isRequired,
- accountIds: ImmutablePropTypes.orderedSet,
- hasMore: PropTypes.bool,
- };
-
- componentDidMount() {
- const { params: { id } } = this.props;
-
- this.props.dispatch(fetchMembers(id));
- }
-
- componentDidUpdate(prevProps) {
- if (this.props.params.id !== prevProps.params.id) {
- this.props.dispatch(fetchMembers(this.props.params.id));
- }
- }
-
- handleLoadMore = debounce(() => {
- this.props.dispatch(expandMembers(this.props.params.id));
- }, 300, { leading: true });
-
- render() {
- const { accountIds, hasMore, group } = this.props;
-
- if (!group || !accountIds) {
- return (
-
-
-
- );
- }
-
- return (
-
- }
- >
- {accountIds.map(id => )}
-
-
- );
- }
-
-}
diff --git a/app/soapbox/features/groups/removed_accounts/index.js b/app/soapbox/features/groups/removed_accounts/index.js
deleted file mode 100644
index 10aa20333..000000000
--- a/app/soapbox/features/groups/removed_accounts/index.js
+++ /dev/null
@@ -1,94 +0,0 @@
-import debounce from 'lodash/debounce';
-import PropTypes from 'prop-types';
-import React from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import { connect } from 'react-redux';
-
-import { Spinner } from 'soapbox/components/ui';
-
-import {
- fetchRemovedAccounts,
- expandRemovedAccounts,
- removeRemovedAccount,
-} from '../../../actions/groups';
-import ScrollableList from '../../../components/scrollable_list';
-import AccountContainer from '../../../containers/account_container';
-import Column from '../../ui/components/column';
-
-const messages = defineMessages({
- remove: { id: 'groups.removed_accounts', defaultMessage: 'Allow joining' },
-});
-
-const mapStateToProps = (state, { params: { id } }) => ({
- group: state.getIn(['groups', id]),
- accountIds: state.user_lists.groups_removed_accounts.get(id)?.items,
- hasMore: !!state.user_lists.groups_removed_accounts.get(id)?.next,
-});
-
-export default @connect(mapStateToProps)
-@injectIntl
-class GroupRemovedAccounts extends ImmutablePureComponent {
-
- static propTypes = {
- params: PropTypes.object.isRequired,
- dispatch: PropTypes.func.isRequired,
- accountIds: ImmutablePropTypes.orderedSet,
- hasMore: PropTypes.bool,
- };
-
- componentDidMount() {
- const { params: { id } } = this.props;
-
- this.props.dispatch(fetchRemovedAccounts(id));
- }
-
- componentDidUpdate(prevProps) {
- if (this.props.params.id !== prevProps.params.id) {
- this.props.dispatch(fetchRemovedAccounts(this.props.params.id));
- }
- }
-
- handleLoadMore = debounce(() => {
- this.props.dispatch(expandRemovedAccounts(this.props.params.id));
- }, 300, { leading: true });
-
- handleOnActionClick = (group, id) => {
- return () => {
- this.props.dispatch(removeRemovedAccount(group.get('id'), id));
- };
- }
-
- render() {
- const { accountIds, hasMore, group, intl } = this.props;
-
- if (!group || !accountIds) {
- return (
-
-
-
- );
- }
-
- return (
-
- }
- >
- {accountIds.map(id => ())}
-
-
- );
- }
-
-}
diff --git a/app/soapbox/features/groups/sidebar_panel/index.js b/app/soapbox/features/groups/sidebar_panel/index.js
deleted file mode 100644
index 088fbee73..000000000
--- a/app/soapbox/features/groups/sidebar_panel/index.js
+++ /dev/null
@@ -1,53 +0,0 @@
-import React from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { defineMessages, injectIntl } from 'react-intl';
-import { connect } from 'react-redux';
-import { Link } from 'react-router-dom';
-
-import Icon from 'soapbox/components/icon';
-
-import Item from './item';
-
-const messages = defineMessages({
- title: { id: 'groups.sidebar-panel.title', defaultMessage: 'Groups You\'re In' },
- show_all: { id: 'groups.sidebar-panel.show_all', defaultMessage: 'Show all' },
-});
-
-const mapStateToProps = (state, { id }) => ({
- groupIds: state.getIn(['group_lists', 'member']),
-});
-
-export default @connect(mapStateToProps)
-@injectIntl
-class GroupSidebarPanel extends ImmutablePureComponent {
-
- static propTypes = {
- groupIds: ImmutablePropTypes.list,
- }
-
- render() {
- const { intl, groupIds } = this.props;
- const count = groupIds.count();
-
- // Only when there are groups to show
- if (count === 0) return null;
-
- return (
-
-
-
- {intl.formatMessage(messages.title)}
-
-
-
-
- {groupIds.slice(0, 10).map(groupId => )}
- {count > 10 && {intl.formatMessage(messages.show_all)}}
-
-
-
- );
- }
-
-}
diff --git a/app/soapbox/features/groups/sidebar_panel/item.js b/app/soapbox/features/groups/sidebar_panel/item.js
deleted file mode 100644
index 40ed8d421..000000000
--- a/app/soapbox/features/groups/sidebar_panel/item.js
+++ /dev/null
@@ -1,48 +0,0 @@
-import React from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { defineMessages, injectIntl } from 'react-intl';
-import { connect } from 'react-redux';
-import { Link } from 'react-router-dom';
-
-import { shortNumberFormat } from '../../../utils/numbers';
-
-const messages = defineMessages({
- new_statuses: { id: 'groups.sidebar-panel.item.view', defaultMessage: 'new posts' },
- no_recent_activity: { id: 'groups.sidebar-panel.item.no_recent_activity', defaultMessage: 'No recent activity' },
-});
-
-const mapStateToProps = (state, { id }) => ({
- group: state.getIn(['groups', id]),
- relationships: state.getIn(['group_relationships', id]),
-});
-
-export default @connect(mapStateToProps)
-@injectIntl
-class Item extends ImmutablePureComponent {
-
- static propTypes = {
- group: ImmutablePropTypes.map,
- relationships: ImmutablePropTypes.map,
- }
-
- render() {
- const { intl, group, relationships } = this.props;
-
- // Wait for relationships
- if (!relationships) return null;
-
- const unreadCount = relationships.get('unread_count');
-
- return (
-
- {group.get('title')}
-
- {unreadCount > 0 && {shortNumberFormat(unreadCount)} {intl.formatMessage(messages.new_statuses)}}
- {unreadCount === 0 && {intl.formatMessage(messages.no_recent_activity)}}
-
-
- );
- }
-
-}
diff --git a/app/soapbox/features/groups/timeline/components/header.js b/app/soapbox/features/groups/timeline/components/header.js
deleted file mode 100644
index c08210afd..000000000
--- a/app/soapbox/features/groups/timeline/components/header.js
+++ /dev/null
@@ -1,92 +0,0 @@
-import PropTypes from 'prop-types';
-import React from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { defineMessages, injectIntl } from 'react-intl';
-import { NavLink } from 'react-router-dom';
-
-import { Button } from 'soapbox/components/ui';
-
-import DropdownMenuContainer from '../../../../containers/dropdown_menu_container';
-
-const messages = defineMessages({
- join: { id: 'groups.join', defaultMessage: 'Join group' },
- leave: { id: 'groups.leave', defaultMessage: 'Leave group' },
- removed_accounts: { id: 'groups.removed_accounts', defaultMessage: 'Removed Accounts' },
- edit: { id: 'groups.edit', defaultMessage: 'Edit' },
-});
-
-export default @injectIntl
-class Header extends ImmutablePureComponent {
-
- static propTypes = {
- group: ImmutablePropTypes.map,
- relationships: ImmutablePropTypes.map,
- toggleMembership: PropTypes.func.isRequired,
- };
-
- toggle = () => {
- const { group, relationships, toggleMembership } = this.props;
- toggleMembership(group, relationships);
- }
-
- getActionButton() {
- const { group, relationships, intl } = this.props;
-
- if (!relationships) {
- return '';
- } else if (!relationships.get('member')) {
- return ;
- } else if (relationships.get('member')) {
- return ;
- }
-
- return '';
- }
-
- getAdminMenu() {
- const { group, intl } = this.props;
-
- const menu = [
- {
- text: intl.formatMessage(messages.edit),
- to: `/groups/${group.get('id')}/edit`,
- icon: require('@tabler/icons/edit.svg'),
- },
- {
- text: intl.formatMessage(messages.removed_accounts),
- to: `/groups/${group.get('id')}/removed_accounts`,
- icon: require('@tabler/icons/trash.svg'),
- destructive: true,
- },
- ];
-
- return ;
- }
-
- render() {
- const { group, relationships } = this.props;
-
- if (!group || !relationships) {
- return null;
- }
-
- return (
-
-
-
-
})
-
-
-
- Posts
- Members
- {this.getActionButton()}
- {relationships.get('admin') && this.getAdminMenu()}
-
-
-
- );
- }
-
-}
diff --git a/app/soapbox/features/groups/timeline/components/panel.js b/app/soapbox/features/groups/timeline/components/panel.js
deleted file mode 100644
index 9009bf33e..000000000
--- a/app/soapbox/features/groups/timeline/components/panel.js
+++ /dev/null
@@ -1,38 +0,0 @@
-import React from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { injectIntl, defineMessages } from 'react-intl';
-
-import Icon from 'soapbox/components/icon';
-
-const messages = defineMessages({
- group_archived: { id: 'group.detail.archived_group', defaultMessage: 'Archived group' },
- group_admin: { id: 'groups.detail.role_admin', defaultMessage: 'You\'re an admin' },
-});
-
-export default @injectIntl
-class GroupPanel extends ImmutablePureComponent {
-
- static propTypes = {
- group: ImmutablePropTypes.map,
- relationships: ImmutablePropTypes.map,
- }
-
- render() {
- const { group, relationships, intl } = this.props;
-
- return (
-
-
- {group.get('title')}
- {group.get('archived') && }
-
-
- {relationships.get('admin') &&
{intl.formatMessage(messages.group_admin)}}
-
-
{group.get('description')}
-
- );
- }
-
-}
diff --git a/app/soapbox/features/groups/timeline/containers/header_container.js b/app/soapbox/features/groups/timeline/containers/header_container.js
deleted file mode 100644
index bce37c3a9..000000000
--- a/app/soapbox/features/groups/timeline/containers/header_container.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import { connect } from 'react-redux';
-
-import { joinGroup, leaveGroup } from '../../../../actions/groups';
-import Header from '../components/header';
-
-const mapStateToProps = (state, { groupId }) => ({
- group: state.getIn(['groups', groupId]),
- relationships: state.getIn(['group_relationships', groupId]),
-});
-
-const mapDispatchToProps = (dispatch, { intl }) => ({
- toggleMembership(group, relationships) {
- if (relationships.get('member')) {
- dispatch(leaveGroup(group.get('id')));
- } else {
- dispatch(joinGroup(group.get('id')));
- }
- },
-});
-
-export default connect(mapStateToProps, mapDispatchToProps)(Header);
diff --git a/app/soapbox/features/groups/timeline/index.js b/app/soapbox/features/groups/timeline/index.js
deleted file mode 100644
index bd85c4725..000000000
--- a/app/soapbox/features/groups/timeline/index.js
+++ /dev/null
@@ -1,107 +0,0 @@
-import PropTypes from 'prop-types';
-import React from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { FormattedMessage, injectIntl } from 'react-intl';
-import { connect } from 'react-redux';
-import { Link } from 'react-router-dom';
-
-import { Column, Spinner } from 'soapbox/components/ui';
-
-import ComposeForm from '../../../../soapbox/features/compose/components/compose-form';
-import { connectGroupStream } from '../../../actions/streaming';
-import { expandGroupTimeline } from '../../../actions/timelines';
-import Avatar from '../../../components/avatar';
-import MissingIndicator from '../../../components/missing_indicator';
-import Timeline from '../../ui/components/timeline';
-
-const mapStateToProps = (state, props) => {
- const me = state.get('me');
- return {
- account: state.getIn(['accounts', me]),
- group: state.getIn(['groups', props.params.id]),
- relationships: state.getIn(['group_relationships', props.params.id]),
- hasUnread: state.getIn(['timelines', `group:${props.params.id}`, 'unread']) > 0,
- };
-};
-
-export default @connect(mapStateToProps)
-@injectIntl
-class GroupTimeline extends React.PureComponent {
-
- static propTypes = {
- params: PropTypes.object.isRequired,
- dispatch: PropTypes.func.isRequired,
- columnId: PropTypes.string,
- hasUnread: PropTypes.bool,
- group: PropTypes.oneOfType([ImmutablePropTypes.map, PropTypes.bool]),
- relationships: ImmutablePropTypes.map,
- account: ImmutablePropTypes.record,
- intl: PropTypes.object.isRequired,
- };
-
- componentDidMount() {
- const { dispatch } = this.props;
- const { id } = this.props.params;
-
- dispatch(expandGroupTimeline(id));
-
- this.disconnect = dispatch(connectGroupStream(id));
- }
-
- componentWillUnmount() {
- if (this.disconnect) {
- this.disconnect();
- this.disconnect = null;
- }
- }
-
- handleLoadMore = maxId => {
- const { id } = this.props.params;
- this.props.dispatch(expandGroupTimeline(id, { maxId }));
- }
-
- render() {
- const { columnId, group, relationships, account } = this.props;
- const { id } = this.props.params;
-
- if (typeof group === 'undefined' || !relationships) {
- return (
-
-
-
- );
- } else if (group === false) {
- return (
-
- );
- }
-
- const acct = account ? account.get('acct') : '';
-
- return (
-
- {relationships.get('member') && (
-
- )}
-
-
- }
- />
-
-
- );
- }
-
-}
diff --git a/app/soapbox/features/introduction/index.js b/app/soapbox/features/introduction/index.js
deleted file mode 100644
index a35ba341a..000000000
--- a/app/soapbox/features/introduction/index.js
+++ /dev/null
@@ -1,172 +0,0 @@
-import classNames from 'clsx';
-import PropTypes from 'prop-types';
-import React from 'react';
-import { FormattedMessage } from 'react-intl';
-import { connect } from 'react-redux';
-import ReactSwipeableViews from 'react-swipeable-views';
-
-import { closeOnboarding } from '../../actions/onboarding';
-
-const FrameWelcome = ({ domain, onNext }) => (
-
-);
-
-FrameWelcome.propTypes = {
- domain: PropTypes.string.isRequired,
- onNext: PropTypes.func.isRequired,
-};
-
-const FrameFederation = ({ onNext }) => (
-
-);
-
-FrameFederation.propTypes = {
- onNext: PropTypes.func.isRequired,
-};
-
-const FrameInteractions = ({ onNext }) => (
-
-);
-
-FrameInteractions.propTypes = {
- onNext: PropTypes.func.isRequired,
-};
-
-export default @connect(state => ({ domain: state.getIn(['meta', 'domain']) }))
-class Introduction extends React.PureComponent {
-
- static propTypes = {
- domain: PropTypes.string.isRequired,
- dispatch: PropTypes.func.isRequired,
- };
-
- state = {
- currentIndex: 0,
- };
-
- constructor(props) {
- super(props);
- this.pages = [
- ,
- ,
- ,
- ];
- }
-
- componentDidMount() {
- window.addEventListener('keyup', this.handleKeyUp);
- }
-
- componentWillUnmount() {
- window.addEventListener('keyup', this.handleKeyUp);
- }
-
- handleDot = (e) => {
- const i = Number(e.currentTarget.getAttribute('data-index'));
- e.preventDefault();
- this.setState({ currentIndex: i });
- }
-
- handlePrev = () => {
- this.setState(({ currentIndex }) => ({
- currentIndex: Math.max(0, currentIndex - 1),
- }));
- }
-
- handleNext = () => {
- const { pages } = this;
-
- this.setState(({ currentIndex }) => ({
- currentIndex: Math.min(currentIndex + 1, pages.length - 1),
- }));
- }
-
- handleSwipe = (index) => {
- this.setState({ currentIndex: index });
- }
-
- handleFinish = () => {
- this.props.dispatch(closeOnboarding());
- }
-
- handleKeyUp = ({ key }) => {
- switch (key) {
- case 'ArrowLeft':
- this.handlePrev();
- break;
- case 'ArrowRight':
- this.handleNext();
- break;
- }
- }
-
- render() {
- const { currentIndex } = this.state;
- const { pages } = this;
-
- return (
-
-
- {pages.map((page, i) => (
- {page}
- ))}
-
-
-
- {pages.map((_, i) => (
-
- ))}
-
-
- );
- }
-
-}
diff --git a/app/soapbox/features/ui/util/async-components.ts b/app/soapbox/features/ui/util/async-components.ts
index e73efd243..43b5c16a1 100644
--- a/app/soapbox/features/ui/util/async-components.ts
+++ b/app/soapbox/features/ui/util/async-components.ts
@@ -38,30 +38,6 @@ export function ListTimeline() {
return import(/* webpackChunkName: "features/list_timeline" */'../../list_timeline');
}
-export function GroupTimeline() {
- return import(/* webpackChunkName: "features/groups/timeline" */'../../groups/timeline');
-}
-
-export function GroupMembers() {
- return import(/* webpackChunkName: "features/groups/timeline" */'../../groups/members');
-}
-
-export function GroupRemovedAccounts() {
- return import(/* webpackChunkName: "features/groups/timeline" */'../../groups/removed_accounts');
-}
-
-export function GroupCreate() {
- return import(/* webpackChunkName: "features/groups/timeline" */'../../groups/create');
-}
-
-export function GroupEdit() {
- return import(/* webpackChunkName: "features/groups/timeline" */'../../groups/edit');
-}
-
-export function Groups() {
- return import(/* webpackChunkName: "features/groups/index" */'../../groups/index');
-}
-
export function Lists() {
return import(/* webpackChunkName: "features/lists" */'../../lists');
}
diff --git a/app/soapbox/features/ui/util/schedule_idle_task.js b/app/soapbox/features/ui/util/schedule_idle_task.js
deleted file mode 100644
index b04d4a8ee..000000000
--- a/app/soapbox/features/ui/util/schedule_idle_task.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// Wrapper to call requestIdleCallback() to schedule low-priority work.
-// See https://developer.mozilla.org/en-US/docs/Web/API/Background_Tasks_API
-// for a good breakdown of the concepts behind this.
-
-import Queue from 'tiny-queue';
-
-const taskQueue = new Queue();
-let runningRequestIdleCallback = false;
-
-function runTasks(deadline) {
- while (taskQueue.length && deadline.timeRemaining() > 0) {
- taskQueue.shift()();
- }
- if (taskQueue.length) {
- requestIdleCallback(runTasks);
- } else {
- runningRequestIdleCallback = false;
- }
-}
-
-function scheduleIdleTask(task) {
- taskQueue.push(task);
- if (!runningRequestIdleCallback) {
- runningRequestIdleCallback = true;
- requestIdleCallback(runTasks);
- }
-}
-
-export default scheduleIdleTask;
diff --git a/app/soapbox/pages/group_page.js b/app/soapbox/pages/group_page.js
deleted file mode 100644
index c148c148c..000000000
--- a/app/soapbox/pages/group_page.js
+++ /dev/null
@@ -1,75 +0,0 @@
-import { PropTypes } from 'prop-types';
-import React from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { connect } from 'react-redux';
-
-import { fetchGroup } from '../actions/groups';
-import GroupSidebarPanel from '../features/groups/sidebar_panel';
-import GroupPanel from '../features/groups/timeline/components/panel';
-import HeaderContainer from '../features/groups/timeline/containers/header_container';
-import LinkFooter from '../features/ui/components/link_footer';
-import PromoPanel from '../features/ui/components/promo_panel';
-import WhoToFollowPanel from '../features/ui/components/who-to-follow-panel';
-
-const mapStateToProps = (state, { params: { id } }) => ({
- group: state.getIn(['groups', id]),
- relationships: state.getIn(['group_relationships', id]),
-});
-
-export default @connect(mapStateToProps)
-class GroupPage extends ImmutablePureComponent {
-
- static propTypes = {
- group: ImmutablePropTypes.map,
- relationships: ImmutablePropTypes.map,
- dispatch: PropTypes.func.isRequired,
- };
-
- componentDidMount() {
- const { params: { id }, dispatch } = this.props;
-
- dispatch(fetchGroup(id));
- }
-
- render() {
- const { children, group, relationships } = this.props;
-
- return (
-
- {group &&
}
-
-
-
-
-
- {group && relationships &&
-
}
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
-
-}
diff --git a/app/soapbox/pages/groups_page.js b/app/soapbox/pages/groups_page.js
deleted file mode 100644
index e11096abf..000000000
--- a/app/soapbox/pages/groups_page.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import React from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { connect } from 'react-redux';
-
-import GroupSidebarPanel from '../features/groups/sidebar_panel';
-import LinkFooter from '../features/ui/components/link_footer';
-import PromoPanel from '../features/ui/components/promo_panel';
-import UserPanel from '../features/ui/components/user_panel';
-import WhoToFollowPanel from '../features/ui/components/who-to-follow-panel';
-
-const mapStateToProps = state => {
- const me = state.get('me');
- return {
- account: state.getIn(['accounts', me]),
- };
-};
-
-export default @connect(mapStateToProps)
-class GroupsPage extends ImmutablePureComponent {
-
- static propTypes = {
- account: ImmutablePropTypes.record,
- };
-
- render() {
- const { children } = this.props;
-
- return (
-
- );
- }
-
-}
diff --git a/app/soapbox/reducers/height_cache.js b/app/soapbox/reducers/height_cache.js
deleted file mode 100644
index e69de29bb..000000000