From 7599876e136c8eb614d8351945ef845447eab003 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 3 Nov 2022 14:14:02 -0500 Subject: [PATCH 1/8] Refactor sensitive content overlay to work with reposts --- app/soapbox/components/quoted-status.tsx | 25 +++++++++++++------ app/soapbox/components/status.tsx | 8 +++--- .../status/components/detailed-status.tsx | 5 ++-- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/app/soapbox/components/quoted-status.tsx b/app/soapbox/components/quoted-status.tsx index d7ecfaf05d..098a4ecb2d 100644 --- a/app/soapbox/components/quoted-status.tsx +++ b/app/soapbox/components/quoted-status.tsx @@ -10,6 +10,7 @@ import { useSettings } from 'soapbox/hooks'; import { defaultMediaVisibility } from 'soapbox/utils/status'; import OutlineBox from './outline-box'; +import SensitiveContentOverlay from './statuses/sensitive-content-overlay'; import type { Account as AccountEntity, Status as StatusEntity } from 'soapbox/types/entities'; @@ -127,7 +128,7 @@ const QuotedStatus: React.FC = ({ status, onCancel, compose }) => return ( @@ -152,12 +153,22 @@ const QuotedStatus: React.FC = ({ status, onCancel, compose }) => dangerouslySetInnerHTML={{ __html: status.contentHtml }} /> - + + {status.hidden && ( + + )} + + + ); diff --git a/app/soapbox/components/status.tsx b/app/soapbox/components/status.tsx index 3e30a3032b..2a1b6ae92a 100644 --- a/app/soapbox/components/status.tsx +++ b/app/soapbox/components/status.tsx @@ -296,8 +296,8 @@ const Status: React.FC = (props) => { const accountAction = props.accountAction || reblogElement; - const inReview = status.visibility === 'self'; - const isSensitive = status.hidden; + const inReview = actualStatus.visibility === 'self'; + const isSensitive = actualStatus.hidden; return ( @@ -356,13 +356,13 @@ const Status: React.FC = (props) => { }) } > - {(inReview || isSensitive) ? ( + {(inReview || isSensitive) && ( - ) : null} + )} {!group && actualStatus.group && (
diff --git a/app/soapbox/features/status/components/detailed-status.tsx b/app/soapbox/features/status/components/detailed-status.tsx index 4896d1a91f..91fde11277 100644 --- a/app/soapbox/features/status/components/detailed-status.tsx +++ b/app/soapbox/features/status/components/detailed-status.tsx @@ -29,7 +29,6 @@ interface IDetailedStatus { const DetailedStatus: React.FC = ({ status, - onToggleHidden, onOpenCompareHistoryModal, onToggleMediaVisibility, showMedia, @@ -93,13 +92,13 @@ const DetailedStatus: React.FC = ({ }) } > - {(isUnderReview || isSensitive) ? ( + {(isUnderReview || isSensitive) && ( - ) : null} + )} From 6a864d126df4528926a985eb80ff81b8db7690c7 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 3 Nov 2022 14:57:33 -0500 Subject: [PATCH 2/8] Refactor spacing of statuses --- app/soapbox/components/quoted-status.tsx | 99 +++++------------- app/soapbox/components/status-content.css | Bin 1478 -> 1476 bytes app/soapbox/components/status.tsx | 46 ++++---- .../status/components/detailed-status.tsx | 20 ++-- app/styles/components/media-gallery.scss | 1 - app/styles/components/reply-mentions.scss | 1 - app/styles/components/status.scss | 5 - app/styles/components/video-player.scss | 1 - 8 files changed, 62 insertions(+), 111 deletions(-) diff --git a/app/soapbox/components/quoted-status.tsx b/app/soapbox/components/quoted-status.tsx index 098a4ecb2d..9755e7120a 100644 --- a/app/soapbox/components/quoted-status.tsx +++ b/app/soapbox/components/quoted-status.tsx @@ -1,15 +1,17 @@ import classNames from 'clsx'; -import React, { useState } from 'react'; -import { defineMessages, useIntl, FormattedMessage, FormattedList } from 'react-intl'; +import React, { MouseEventHandler, useState } from 'react'; +import { defineMessages, useIntl } from 'react-intl'; import { useHistory } from 'react-router-dom'; import StatusMedia from 'soapbox/components/status-media'; -import { Stack, Text } from 'soapbox/components/ui'; +import { Stack } from 'soapbox/components/ui'; import AccountContainer from 'soapbox/containers/account_container'; import { useSettings } from 'soapbox/hooks'; import { defaultMediaVisibility } from 'soapbox/utils/status'; import OutlineBox from './outline-box'; +import StatusReplyMentions from './status-reply-mentions'; +import StatusContent from './status_content'; import SensitiveContentOverlay from './statuses/sensitive-content-overlay'; import type { Account as AccountEntity, Status as StatusEntity } from 'soapbox/types/entities'; @@ -37,7 +39,7 @@ const QuotedStatus: React.FC = ({ status, onCancel, compose }) => const [showMedia, setShowMedia] = useState(defaultMediaVisibility(status, displayMedia)); - const handleExpandClick = (e: React.MouseEvent) => { + const handleExpandClick: MouseEventHandler = (e) => { if (!status) return; const account = status.account as AccountEntity; @@ -58,57 +60,6 @@ const QuotedStatus: React.FC = ({ status, onCancel, compose }) => setShowMedia(!showMedia); }; - const renderReplyMentions = () => { - if (!status?.in_reply_to_id) { - return null; - } - - const account = status.account as AccountEntity; - const to = status.mentions || []; - - if (to.size === 0) { - if (status.in_reply_to_account_id === account.id) { - return ( -
- -
- ); - } else { - return ( -
- -
- ); - } - } - - const accounts = to.slice(0, 2).map(account => <>@{account.username}).toArray(); - - if (to.size > 2) { - accounts.push( - , - ); - } - - return ( -
- , - }} - /> -
- ); - }; - if (!status) { return null; } @@ -128,7 +79,7 @@ const QuotedStatus: React.FC = ({ status, onCancel, compose }) => return ( @@ -145,16 +96,13 @@ const QuotedStatus: React.FC = ({ status, onCancel, compose }) => withLinkToProfile={!compose} /> - {renderReplyMentions()} + - - - - {status.hidden && ( + + {(status.hidden) && ( = ({ status, onCancel, compose }) => /> )} - + + + + {(status.media_attachments.size > 0) && ( + + )} + diff --git a/app/soapbox/components/status-content.css b/app/soapbox/components/status-content.css index 7c1317d16bb7dbcdc56eee2bdd66429cac7c159a..997df73f4d30f1ea42cc52b9be1f7b6c3511187d 100644 GIT binary patch delta 48 zcmX@ceS~|00;9=9Mc2uJOrjHO?=YHx7?blEXE2&<=3pvj1PatJ{{(W%SOORUbF>bI delta 51 zcmX@YeT;j80;B0fMOP+0)5#MVMJHC@VFWWK=Q7S = (props) => { hidden, featured, unread, - group, hideActionBar, variant = 'rounded', withDismiss, @@ -349,6 +348,8 @@ const Status: React.FC = (props) => {
+ + = (props) => { /> )} - {!group && actualStatus.group && ( -
- Posted in {String(actualStatus.getIn(['group', 'title']))} -
- )} + + - + {(quote || actualStatus.media_attachments.size > 0) && ( + + - - - - - {quote} + {quote} + + )} +
{!hideActionBar && ( diff --git a/app/soapbox/features/status/components/detailed-status.tsx b/app/soapbox/features/status/components/detailed-status.tsx index 91fde11277..28c2d020c1 100644 --- a/app/soapbox/features/status/components/detailed-status.tsx +++ b/app/soapbox/features/status/components/detailed-status.tsx @@ -100,15 +100,21 @@ const DetailedStatus: React.FC = ({ /> )} - + + - + {(quote || actualStatus.media_attachments.size > 0) && ( + + - {quote} + {quote} + + )} + diff --git a/app/styles/components/media-gallery.scss b/app/styles/components/media-gallery.scss index 311af3b646..e9bb144252 100644 --- a/app/styles/components/media-gallery.scss +++ b/app/styles/components/media-gallery.scss @@ -1,6 +1,5 @@ .media-gallery { box-sizing: border-box; - margin-top: 8px; overflow: hidden; border-radius: 10px; position: relative; diff --git a/app/styles/components/reply-mentions.scss b/app/styles/components/reply-mentions.scss index 39b70a585a..e767e5a03a 100644 --- a/app/styles/components/reply-mentions.scss +++ b/app/styles/components/reply-mentions.scss @@ -10,7 +10,6 @@ .detailed-status { .reply-mentions { display: block; - margin: 4px 0 0 0; span { cursor: pointer; diff --git a/app/styles/components/status.scss b/app/styles/components/status.scss index a8c8e4561f..4a2c57d3eb 100644 --- a/app/styles/components/status.scss +++ b/app/styles/components/status.scss @@ -14,11 +14,6 @@ opacity: 1; animation: fade 150ms linear; - .video-player, - .audio-player { - margin-top: 8px; - } - &.light { .display-name { strong { diff --git a/app/styles/components/video-player.scss b/app/styles/components/video-player.scss index ada5b26f5f..b4e87e9b60 100644 --- a/app/styles/components/video-player.scss +++ b/app/styles/components/video-player.scss @@ -7,7 +7,6 @@ flex-direction: column; height: 100%; justify-content: center; - margin-top: 8px; position: relative; text-align: center; z-index: 100; From dec89cb2366a7e1561c90f792776240190980af0 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 3 Nov 2022 15:52:25 -0500 Subject: [PATCH 3/8] Remove unused .js files, remove groups --- app/soapbox/actions/group_editor.ts | 143 ----- app/soapbox/actions/groups.ts | 550 ------------------ app/soapbox/components/avatar_composite.js | Bin 1866 -> 0 bytes app/soapbox/components/filter_bar.js | Bin 3716 -> 0 bytes app/soapbox/components/setting_text.js | Bin 844 -> 0 bytes .../components/column_settings.js | Bin 2233 -> 0 bytes .../containers/column_settings_container.js | Bin 542 -> 0 bytes .../components/column_settings.js | Bin 13364 -> 0 bytes .../components/follow_request.js | Bin 2049 -> 0 bytes .../components/multi_setting_toggle.js | Bin 1221 -> 0 bytes .../containers/column_settings_container.js | Bin 2064 -> 0 bytes .../containers/follow_request_container.js | Bin 704 -> 0 bytes .../ui/components/account_list_panel.js | Bin 1719 -> 0 bytes .../reducers/__tests__/group_editor.test.ts | 16 - .../reducers/__tests__/group_lists.test.ts | 13 - .../__tests__/group_relationships.test.ts | 9 - app/soapbox/reducers/__tests__/groups.test.ts | 9 - .../reducers/__tests__/list_editor-test.js | Bin 3345 -> 0 bytes .../reducers/__tests__/notifications-test.js | Bin 20432 -> 0 bytes app/soapbox/reducers/__tests__/search-test.js | Bin 3292 -> 0 bytes app/soapbox/reducers/group_editor.js | Bin 1605 -> 0 bytes app/soapbox/reducers/group_lists.js | Bin 617 -> 0 bytes app/soapbox/reducers/group_relationships.js | Bin 872 -> 0 bytes app/soapbox/reducers/groups.js | Bin 875 -> 0 bytes app/soapbox/reducers/index.ts | 8 - app/soapbox/reducers/timelines.ts | 7 - app/soapbox/reducers/user_lists.ts | 21 +- 27 files changed, 1 insertion(+), 775 deletions(-) delete mode 100644 app/soapbox/actions/group_editor.ts delete mode 100644 app/soapbox/actions/groups.ts delete mode 100644 app/soapbox/components/avatar_composite.js delete mode 100644 app/soapbox/components/filter_bar.js delete mode 100644 app/soapbox/components/setting_text.js delete mode 100644 app/soapbox/features/home_timeline/components/column_settings.js delete mode 100644 app/soapbox/features/home_timeline/containers/column_settings_container.js delete mode 100644 app/soapbox/features/notifications/components/column_settings.js delete mode 100644 app/soapbox/features/notifications/components/follow_request.js delete mode 100644 app/soapbox/features/notifications/components/multi_setting_toggle.js delete mode 100644 app/soapbox/features/notifications/containers/column_settings_container.js delete mode 100644 app/soapbox/features/notifications/containers/follow_request_container.js delete mode 100644 app/soapbox/features/ui/components/account_list_panel.js delete mode 100644 app/soapbox/reducers/__tests__/group_editor.test.ts delete mode 100644 app/soapbox/reducers/__tests__/group_lists.test.ts delete mode 100644 app/soapbox/reducers/__tests__/group_relationships.test.ts delete mode 100644 app/soapbox/reducers/__tests__/groups.test.ts delete mode 100644 app/soapbox/reducers/__tests__/list_editor-test.js delete mode 100644 app/soapbox/reducers/__tests__/notifications-test.js delete mode 100644 app/soapbox/reducers/__tests__/search-test.js delete mode 100644 app/soapbox/reducers/group_editor.js delete mode 100644 app/soapbox/reducers/group_lists.js delete mode 100644 app/soapbox/reducers/group_relationships.js delete mode 100644 app/soapbox/reducers/groups.js diff --git a/app/soapbox/actions/group_editor.ts b/app/soapbox/actions/group_editor.ts deleted file mode 100644 index 23f3491ad6..0000000000 --- a/app/soapbox/actions/group_editor.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { isLoggedIn } from 'soapbox/utils/auth'; - -import api from '../api'; - -import type { AxiosError } from 'axios'; -import type { History } from 'history'; -import type { AppDispatch, RootState } from 'soapbox/store'; -import type { APIEntity } from 'soapbox/types/entities'; - -const GROUP_CREATE_REQUEST = 'GROUP_CREATE_REQUEST'; -const GROUP_CREATE_SUCCESS = 'GROUP_CREATE_SUCCESS'; -const GROUP_CREATE_FAIL = 'GROUP_CREATE_FAIL'; - -const GROUP_UPDATE_REQUEST = 'GROUP_UPDATE_REQUEST'; -const GROUP_UPDATE_SUCCESS = 'GROUP_UPDATE_SUCCESS'; -const GROUP_UPDATE_FAIL = 'GROUP_UPDATE_FAIL'; - -const GROUP_EDITOR_VALUE_CHANGE = 'GROUP_EDITOR_VALUE_CHANGE'; -const GROUP_EDITOR_RESET = 'GROUP_EDITOR_RESET'; -const GROUP_EDITOR_SETUP = 'GROUP_EDITOR_SETUP'; - -const submit = (routerHistory: History) => - (dispatch: AppDispatch, getState: () => RootState) => { - const groupId = getState().group_editor.get('groupId') as string; - const title = getState().group_editor.get('title') as string; - const description = getState().group_editor.get('description') as string; - const coverImage = getState().group_editor.get('coverImage') as any; - - if (groupId === null) { - dispatch(create(title, description, coverImage, routerHistory)); - } else { - dispatch(update(groupId, title, description, coverImage, routerHistory)); - } - }; - -const create = (title: string, description: string, coverImage: File, routerHistory: History) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(createRequest()); - - const formData = new FormData(); - formData.append('title', title); - formData.append('description', description); - - if (coverImage !== null) { - formData.append('cover_image', coverImage); - } - - api(getState).post('/api/v1/groups', formData, { headers: { 'Content-Type': 'multipart/form-data' } }).then(({ data }) => { - dispatch(createSuccess(data)); - routerHistory.push(`/groups/${data.id}`); - }).catch(err => dispatch(createFail(err))); - }; - -const createRequest = (id?: string) => ({ - type: GROUP_CREATE_REQUEST, - id, -}); - -const createSuccess = (group: APIEntity) => ({ - type: GROUP_CREATE_SUCCESS, - group, -}); - -const createFail = (error: AxiosError) => ({ - type: GROUP_CREATE_FAIL, - error, -}); - -const update = (groupId: string, title: string, description: string, coverImage: File, routerHistory: History) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(updateRequest(groupId)); - - const formData = new FormData(); - formData.append('title', title); - formData.append('description', description); - - if (coverImage !== null) { - formData.append('cover_image', coverImage); - } - - api(getState).put(`/api/v1/groups/${groupId}`, formData, { headers: { 'Content-Type': 'multipart/form-data' } }).then(({ data }) => { - dispatch(updateSuccess(data)); - routerHistory.push(`/groups/${data.id}`); - }).catch(err => dispatch(updateFail(err))); - }; - -const updateRequest = (id: string) => ({ - type: GROUP_UPDATE_REQUEST, - id, -}); - -const updateSuccess = (group: APIEntity) => ({ - type: GROUP_UPDATE_SUCCESS, - group, -}); - -const updateFail = (error: AxiosError) => ({ - type: GROUP_UPDATE_FAIL, - error, -}); - -const changeValue = (field: string, value: string | File) => ({ - type: GROUP_EDITOR_VALUE_CHANGE, - field, - value, -}); - -const reset = () => ({ - type: GROUP_EDITOR_RESET, -}); - -const setUp = (group: string) => ({ - type: GROUP_EDITOR_SETUP, - group, -}); - -export { - GROUP_CREATE_REQUEST, - GROUP_CREATE_SUCCESS, - GROUP_CREATE_FAIL, - GROUP_UPDATE_REQUEST, - GROUP_UPDATE_SUCCESS, - GROUP_UPDATE_FAIL, - GROUP_EDITOR_VALUE_CHANGE, - GROUP_EDITOR_RESET, - GROUP_EDITOR_SETUP, - submit, - create, - createRequest, - createSuccess, - createFail, - update, - updateRequest, - updateSuccess, - updateFail, - changeValue, - reset, - setUp, -}; diff --git a/app/soapbox/actions/groups.ts b/app/soapbox/actions/groups.ts deleted file mode 100644 index 808cc3204e..0000000000 --- a/app/soapbox/actions/groups.ts +++ /dev/null @@ -1,550 +0,0 @@ -import { AxiosError } from 'axios'; - -import { isLoggedIn } from 'soapbox/utils/auth'; - -import api, { getLinks } from '../api'; - -import { fetchRelationships } from './accounts'; -import { importFetchedAccounts } from './importer'; - -import type { AppDispatch, RootState } from 'soapbox/store'; -import type { APIEntity } from 'soapbox/types/entities'; - -const GROUP_FETCH_REQUEST = 'GROUP_FETCH_REQUEST'; -const GROUP_FETCH_SUCCESS = 'GROUP_FETCH_SUCCESS'; -const GROUP_FETCH_FAIL = 'GROUP_FETCH_FAIL'; - -const GROUP_RELATIONSHIPS_FETCH_REQUEST = 'GROUP_RELATIONSHIPS_FETCH_REQUEST'; -const GROUP_RELATIONSHIPS_FETCH_SUCCESS = 'GROUP_RELATIONSHIPS_FETCH_SUCCESS'; -const GROUP_RELATIONSHIPS_FETCH_FAIL = 'GROUP_RELATIONSHIPS_FETCH_FAIL'; - -const GROUPS_FETCH_REQUEST = 'GROUPS_FETCH_REQUEST'; -const GROUPS_FETCH_SUCCESS = 'GROUPS_FETCH_SUCCESS'; -const GROUPS_FETCH_FAIL = 'GROUPS_FETCH_FAIL'; - -const GROUP_JOIN_REQUEST = 'GROUP_JOIN_REQUEST'; -const GROUP_JOIN_SUCCESS = 'GROUP_JOIN_SUCCESS'; -const GROUP_JOIN_FAIL = 'GROUP_JOIN_FAIL'; - -const GROUP_LEAVE_REQUEST = 'GROUP_LEAVE_REQUEST'; -const GROUP_LEAVE_SUCCESS = 'GROUP_LEAVE_SUCCESS'; -const GROUP_LEAVE_FAIL = 'GROUP_LEAVE_FAIL'; - -const GROUP_MEMBERS_FETCH_REQUEST = 'GROUP_MEMBERS_FETCH_REQUEST'; -const GROUP_MEMBERS_FETCH_SUCCESS = 'GROUP_MEMBERS_FETCH_SUCCESS'; -const GROUP_MEMBERS_FETCH_FAIL = 'GROUP_MEMBERS_FETCH_FAIL'; - -const GROUP_MEMBERS_EXPAND_REQUEST = 'GROUP_MEMBERS_EXPAND_REQUEST'; -const GROUP_MEMBERS_EXPAND_SUCCESS = 'GROUP_MEMBERS_EXPAND_SUCCESS'; -const GROUP_MEMBERS_EXPAND_FAIL = 'GROUP_MEMBERS_EXPAND_FAIL'; - -const GROUP_REMOVED_ACCOUNTS_FETCH_REQUEST = 'GROUP_REMOVED_ACCOUNTS_FETCH_REQUEST'; -const GROUP_REMOVED_ACCOUNTS_FETCH_SUCCESS = 'GROUP_REMOVED_ACCOUNTS_FETCH_SUCCESS'; -const GROUP_REMOVED_ACCOUNTS_FETCH_FAIL = 'GROUP_REMOVED_ACCOUNTS_FETCH_FAIL'; - -const GROUP_REMOVED_ACCOUNTS_EXPAND_REQUEST = 'GROUP_REMOVED_ACCOUNTS_EXPAND_REQUEST'; -const GROUP_REMOVED_ACCOUNTS_EXPAND_SUCCESS = 'GROUP_REMOVED_ACCOUNTS_EXPAND_SUCCESS'; -const GROUP_REMOVED_ACCOUNTS_EXPAND_FAIL = 'GROUP_REMOVED_ACCOUNTS_EXPAND_FAIL'; - -const GROUP_REMOVED_ACCOUNTS_REMOVE_REQUEST = 'GROUP_REMOVED_ACCOUNTS_REMOVE_REQUEST'; -const GROUP_REMOVED_ACCOUNTS_REMOVE_SUCCESS = 'GROUP_REMOVED_ACCOUNTS_REMOVE_SUCCESS'; -const GROUP_REMOVED_ACCOUNTS_REMOVE_FAIL = 'GROUP_REMOVED_ACCOUNTS_REMOVE_FAIL'; - -const GROUP_REMOVED_ACCOUNTS_CREATE_REQUEST = 'GROUP_REMOVED_ACCOUNTS_CREATE_REQUEST'; -const GROUP_REMOVED_ACCOUNTS_CREATE_SUCCESS = 'GROUP_REMOVED_ACCOUNTS_CREATE_SUCCESS'; -const GROUP_REMOVED_ACCOUNTS_CREATE_FAIL = 'GROUP_REMOVED_ACCOUNTS_CREATE_FAIL'; - -const GROUP_REMOVE_STATUS_REQUEST = 'GROUP_REMOVE_STATUS_REQUEST'; -const GROUP_REMOVE_STATUS_SUCCESS = 'GROUP_REMOVE_STATUS_SUCCESS'; -const GROUP_REMOVE_STATUS_FAIL = 'GROUP_REMOVE_STATUS_FAIL'; - -const fetchGroup = (id: string) => (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(fetchGroupRelationships([id])); - - if (getState().groups.get(id)) { - return; - } - - dispatch(fetchGroupRequest(id)); - - api(getState).get(`/api/v1/groups/${id}`) - .then(({ data }) => dispatch(fetchGroupSuccess(data))) - .catch(err => dispatch(fetchGroupFail(id, err))); -}; - -const fetchGroupRequest = (id: string) => ({ - type: GROUP_FETCH_REQUEST, - id, -}); - -const fetchGroupSuccess = (group: APIEntity) => ({ - type: GROUP_FETCH_SUCCESS, - group, -}); - -const fetchGroupFail = (id: string, error: AxiosError) => ({ - type: GROUP_FETCH_FAIL, - id, - error, -}); - -const fetchGroupRelationships = (groupIds: string[]) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - const loadedRelationships = getState().group_relationships; - const newGroupIds = groupIds.filter(id => loadedRelationships.get(id, null) === null); - - if (newGroupIds.length === 0) { - return; - } - - dispatch(fetchGroupRelationshipsRequest(newGroupIds)); - - api(getState).get(`/api/v1/groups/${newGroupIds[0]}/relationships?${newGroupIds.map(id => `id[]=${id}`).join('&')}`).then(response => { - dispatch(fetchGroupRelationshipsSuccess(response.data)); - }).catch(error => { - dispatch(fetchGroupRelationshipsFail(error)); - }); - }; - -const fetchGroupRelationshipsRequest = (ids: string[]) => ({ - type: GROUP_RELATIONSHIPS_FETCH_REQUEST, - ids, - skipLoading: true, -}); - -const fetchGroupRelationshipsSuccess = (relationships: APIEntity[]) => ({ - type: GROUP_RELATIONSHIPS_FETCH_SUCCESS, - relationships, - skipLoading: true, -}); - -const fetchGroupRelationshipsFail = (error: AxiosError) => ({ - type: GROUP_RELATIONSHIPS_FETCH_FAIL, - error, - skipLoading: true, -}); - -const fetchGroups = (tab: string) => (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(fetchGroupsRequest()); - - api(getState).get('/api/v1/groups?tab=' + tab) - .then(({ data }) => { - dispatch(fetchGroupsSuccess(data, tab)); - dispatch(fetchGroupRelationships(data.map((item: APIEntity) => item.id))); - }) - .catch(err => dispatch(fetchGroupsFail(err))); -}; - -const fetchGroupsRequest = () => ({ - type: GROUPS_FETCH_REQUEST, -}); - -const fetchGroupsSuccess = (groups: APIEntity[], tab: string) => ({ - type: GROUPS_FETCH_SUCCESS, - groups, - tab, -}); - -const fetchGroupsFail = (error: AxiosError) => ({ - type: GROUPS_FETCH_FAIL, - error, -}); - -const joinGroup = (id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(joinGroupRequest(id)); - - api(getState).post(`/api/v1/groups/${id}/accounts`).then(response => { - dispatch(joinGroupSuccess(response.data)); - }).catch(error => { - dispatch(joinGroupFail(id, error)); - }); - }; - -const leaveGroup = (id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(leaveGroupRequest(id)); - - api(getState).delete(`/api/v1/groups/${id}/accounts`).then(response => { - dispatch(leaveGroupSuccess(response.data)); - }).catch(error => { - dispatch(leaveGroupFail(id, error)); - }); - }; - -const joinGroupRequest = (id: string) => ({ - type: GROUP_JOIN_REQUEST, - id, -}); - -const joinGroupSuccess = (relationship: APIEntity) => ({ - type: GROUP_JOIN_SUCCESS, - relationship, -}); - -const joinGroupFail = (id: string, error: AxiosError) => ({ - type: GROUP_JOIN_FAIL, - id, - error, -}); - -const leaveGroupRequest = (id: string) => ({ - type: GROUP_LEAVE_REQUEST, - id, -}); - -const leaveGroupSuccess = (relationship: APIEntity) => ({ - type: GROUP_LEAVE_SUCCESS, - relationship, -}); - -const leaveGroupFail = (id: string, error: AxiosError) => ({ - type: GROUP_LEAVE_FAIL, - id, - error, -}); - -const fetchMembers = (id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(fetchMembersRequest(id)); - - api(getState).get(`/api/v1/groups/${id}/accounts`).then(response => { - const next = getLinks(response).refs.find(link => link.rel === 'next'); - - dispatch(importFetchedAccounts(response.data)); - dispatch(fetchMembersSuccess(id, response.data, next ? next.uri : null)); - dispatch(fetchRelationships(response.data.map((item: APIEntity) => item.id))); - }).catch(error => { - dispatch(fetchMembersFail(id, error)); - }); - }; - -const fetchMembersRequest = (id: string) => ({ - type: GROUP_MEMBERS_FETCH_REQUEST, - id, -}); - -const fetchMembersSuccess = (id: string, accounts: APIEntity[], next: string | null) => ({ - type: GROUP_MEMBERS_FETCH_SUCCESS, - id, - accounts, - next, -}); - -const fetchMembersFail = (id: string, error: AxiosError) => ({ - type: GROUP_MEMBERS_FETCH_FAIL, - id, - error, -}); - -const expandMembers = (id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - const url = getState().user_lists.groups.get(id)!.next; - - if (url === null) { - return; - } - - dispatch(expandMembersRequest(id)); - - api(getState).get(url).then(response => { - const next = getLinks(response).refs.find(link => link.rel === 'next'); - - dispatch(importFetchedAccounts(response.data)); - dispatch(expandMembersSuccess(id, response.data, next ? next.uri : null)); - dispatch(fetchRelationships(response.data.map((item: APIEntity) => item.id))); - }).catch(error => { - dispatch(expandMembersFail(id, error)); - }); - }; - -const expandMembersRequest = (id: string) => ({ - type: GROUP_MEMBERS_EXPAND_REQUEST, - id, -}); - -const expandMembersSuccess = (id: string, accounts: APIEntity[], next: string | null) => ({ - type: GROUP_MEMBERS_EXPAND_SUCCESS, - id, - accounts, - next, -}); - -const expandMembersFail = (id: string, error: AxiosError) => ({ - type: GROUP_MEMBERS_EXPAND_FAIL, - id, - error, -}); - -const fetchRemovedAccounts = (id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(fetchRemovedAccountsRequest(id)); - - api(getState).get(`/api/v1/groups/${id}/removed_accounts`).then(response => { - const next = getLinks(response).refs.find(link => link.rel === 'next'); - - dispatch(importFetchedAccounts(response.data)); - dispatch(fetchRemovedAccountsSuccess(id, response.data, next ? next.uri : null)); - dispatch(fetchRelationships(response.data.map((item: APIEntity) => item.id))); - }).catch(error => { - dispatch(fetchRemovedAccountsFail(id, error)); - }); - }; - -const fetchRemovedAccountsRequest = (id: string) => ({ - type: GROUP_REMOVED_ACCOUNTS_FETCH_REQUEST, - id, -}); - -const fetchRemovedAccountsSuccess = (id: string, accounts: APIEntity[], next: string | null) => ({ - type: GROUP_REMOVED_ACCOUNTS_FETCH_SUCCESS, - id, - accounts, - next, -}); - -const fetchRemovedAccountsFail = (id: string, error: AxiosError) => ({ - type: GROUP_REMOVED_ACCOUNTS_FETCH_FAIL, - id, - error, -}); - -const expandRemovedAccounts = (id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - const url = getState().user_lists.groups_removed_accounts.get(id)!.next; - - if (url === null) { - return; - } - - dispatch(expandRemovedAccountsRequest(id)); - - api(getState).get(url).then(response => { - const next = getLinks(response).refs.find(link => link.rel === 'next'); - - dispatch(importFetchedAccounts(response.data)); - dispatch(expandRemovedAccountsSuccess(id, response.data, next ? next.uri : null)); - dispatch(fetchRelationships(response.data.map((item: APIEntity) => item.id))); - }).catch(error => { - dispatch(expandRemovedAccountsFail(id, error)); - }); - }; - -const expandRemovedAccountsRequest = (id: string) => ({ - type: GROUP_REMOVED_ACCOUNTS_EXPAND_REQUEST, - id, -}); - -const expandRemovedAccountsSuccess = (id: string, accounts: APIEntity[], next: string | null) => ({ - type: GROUP_REMOVED_ACCOUNTS_EXPAND_SUCCESS, - id, - accounts, - next, -}); - -const expandRemovedAccountsFail = (id: string, error: AxiosError) => ({ - type: GROUP_REMOVED_ACCOUNTS_EXPAND_FAIL, - id, - error, -}); - -const removeRemovedAccount = (groupId: string, id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(removeRemovedAccountRequest(groupId, id)); - - api(getState).delete(`/api/v1/groups/${groupId}/removed_accounts?account_id=${id}`).then(response => { - dispatch(removeRemovedAccountSuccess(groupId, id)); - }).catch(error => { - dispatch(removeRemovedAccountFail(groupId, id, error)); - }); - }; - -const removeRemovedAccountRequest = (groupId: string, id: string) => ({ - type: GROUP_REMOVED_ACCOUNTS_REMOVE_REQUEST, - groupId, - id, -}); - -const removeRemovedAccountSuccess = (groupId: string, id: string) => ({ - type: GROUP_REMOVED_ACCOUNTS_REMOVE_SUCCESS, - groupId, - id, -}); - -const removeRemovedAccountFail = (groupId: string, id: string, error: AxiosError) => ({ - type: GROUP_REMOVED_ACCOUNTS_REMOVE_FAIL, - groupId, - id, - error, -}); - -const createRemovedAccount = (groupId: string, id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(createRemovedAccountRequest(groupId, id)); - - api(getState).post(`/api/v1/groups/${groupId}/removed_accounts?account_id=${id}`).then(response => { - dispatch(createRemovedAccountSuccess(groupId, id)); - }).catch(error => { - dispatch(createRemovedAccountFail(groupId, id, error)); - }); - }; - -const createRemovedAccountRequest = (groupId: string, id: string) => ({ - type: GROUP_REMOVED_ACCOUNTS_CREATE_REQUEST, - groupId, - id, -}); - -const createRemovedAccountSuccess = (groupId: string, id: string) => ({ - type: GROUP_REMOVED_ACCOUNTS_CREATE_SUCCESS, - groupId, - id, -}); - -const createRemovedAccountFail = (groupId: string, id: string, error: AxiosError) => ({ - type: GROUP_REMOVED_ACCOUNTS_CREATE_FAIL, - groupId, - id, - error, -}); - -const groupRemoveStatus = (groupId: string, id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(groupRemoveStatusRequest(groupId, id)); - - api(getState).delete(`/api/v1/groups/${groupId}/statuses/${id}`).then(response => { - dispatch(groupRemoveStatusSuccess(groupId, id)); - }).catch(error => { - dispatch(groupRemoveStatusFail(groupId, id, error)); - }); - }; - -const groupRemoveStatusRequest = (groupId: string, id: string) => ({ - type: GROUP_REMOVE_STATUS_REQUEST, - groupId, - id, -}); - -const groupRemoveStatusSuccess = (groupId: string, id: string) => ({ - type: GROUP_REMOVE_STATUS_SUCCESS, - groupId, - id, -}); - -const groupRemoveStatusFail = (groupId: string, id: string, error: AxiosError) => ({ - type: GROUP_REMOVE_STATUS_FAIL, - groupId, - id, - error, -}); - -export { - GROUP_FETCH_REQUEST, - GROUP_FETCH_SUCCESS, - GROUP_FETCH_FAIL, - GROUP_RELATIONSHIPS_FETCH_REQUEST, - GROUP_RELATIONSHIPS_FETCH_SUCCESS, - GROUP_RELATIONSHIPS_FETCH_FAIL, - GROUPS_FETCH_REQUEST, - GROUPS_FETCH_SUCCESS, - GROUPS_FETCH_FAIL, - GROUP_JOIN_REQUEST, - GROUP_JOIN_SUCCESS, - GROUP_JOIN_FAIL, - GROUP_LEAVE_REQUEST, - GROUP_LEAVE_SUCCESS, - GROUP_LEAVE_FAIL, - GROUP_MEMBERS_FETCH_REQUEST, - GROUP_MEMBERS_FETCH_SUCCESS, - GROUP_MEMBERS_FETCH_FAIL, - GROUP_MEMBERS_EXPAND_REQUEST, - GROUP_MEMBERS_EXPAND_SUCCESS, - GROUP_MEMBERS_EXPAND_FAIL, - GROUP_REMOVED_ACCOUNTS_FETCH_REQUEST, - GROUP_REMOVED_ACCOUNTS_FETCH_SUCCESS, - GROUP_REMOVED_ACCOUNTS_FETCH_FAIL, - GROUP_REMOVED_ACCOUNTS_EXPAND_REQUEST, - GROUP_REMOVED_ACCOUNTS_EXPAND_SUCCESS, - GROUP_REMOVED_ACCOUNTS_EXPAND_FAIL, - GROUP_REMOVED_ACCOUNTS_REMOVE_REQUEST, - GROUP_REMOVED_ACCOUNTS_REMOVE_SUCCESS, - GROUP_REMOVED_ACCOUNTS_REMOVE_FAIL, - GROUP_REMOVED_ACCOUNTS_CREATE_REQUEST, - GROUP_REMOVED_ACCOUNTS_CREATE_SUCCESS, - GROUP_REMOVED_ACCOUNTS_CREATE_FAIL, - GROUP_REMOVE_STATUS_REQUEST, - GROUP_REMOVE_STATUS_SUCCESS, - GROUP_REMOVE_STATUS_FAIL, - fetchGroup, - fetchGroupRequest, - fetchGroupSuccess, - fetchGroupFail, - fetchGroupRelationships, - fetchGroupRelationshipsRequest, - fetchGroupRelationshipsSuccess, - fetchGroupRelationshipsFail, - fetchGroups, - fetchGroupsRequest, - fetchGroupsSuccess, - fetchGroupsFail, - joinGroup, - leaveGroup, - joinGroupRequest, - joinGroupSuccess, - joinGroupFail, - leaveGroupRequest, - leaveGroupSuccess, - leaveGroupFail, - fetchMembers, - fetchMembersRequest, - fetchMembersSuccess, - fetchMembersFail, - expandMembers, - expandMembersRequest, - expandMembersSuccess, - expandMembersFail, - fetchRemovedAccounts, - fetchRemovedAccountsRequest, - fetchRemovedAccountsSuccess, - fetchRemovedAccountsFail, - expandRemovedAccounts, - expandRemovedAccountsRequest, - expandRemovedAccountsSuccess, - expandRemovedAccountsFail, - removeRemovedAccount, - removeRemovedAccountRequest, - removeRemovedAccountSuccess, - removeRemovedAccountFail, - createRemovedAccount, - createRemovedAccountRequest, - createRemovedAccountSuccess, - createRemovedAccountFail, - groupRemoveStatus, - groupRemoveStatusRequest, - groupRemoveStatusSuccess, - groupRemoveStatusFail, -}; diff --git a/app/soapbox/components/avatar_composite.js b/app/soapbox/components/avatar_composite.js deleted file mode 100644 index 59e4bab96e77e4a6d70e261c1d3f52e04479473f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1866 zcmbVNOLN*V5We#(_Rz-m3>fmdI59Jwp15=}Y43?J0yMF)YpqjK$N#-rJ&+Aa+9@Y_ zpWl93eTbqeYlOSHtbV*yT*A683kWLpJwY-AHzQ$U?m5fQ`fECS*P&m*i-%;fGqF@_ti_4N#%W^->O4WGBcPOWlVjctqsjefw*Qi%~&6*q`%bAq$ z<(VO?zfzJE$bs*X?^Y5t?)a{$x%N>(Xh$Oei3~*sgvrdFDm$nj%d)ajZ4)>hEY5|* zSjc<+vk^64jdg|;zj@+WjCW13Wlr;r2G3KXvw$cxbS83Uz{K`6&QGS~oej_^yY za0`&a_3TFXA>)>d%@&pMeAcsKSrPOU0@h%uNTM$a&-ohPbSz6mb=RjEwXWZD=vrb8 zA>o8HRjmmobpVU8ho++`0S56`@cPqy1E2$*OMbvk3@LUL1%n`s--ZsxxbzMFv$Id5!T$=xa_qB?$OrJZI2ggq z>GS6OD+8cy`RA#xJWgMbfXwJtJ^j6Vd5?ax8fH0s;`y*nkLC9+=!BPB7tA61LJbr5Rsr&rs zJmx8AmpLAMMn_0Vu&H+tS~6~XLi)sC($>mLyx|xIViiOk$T~Z+Gp(B1M`Na~p0k#{cooG3t3t23B7$^o(7q+g?q49b R>KsL#V|uD481mDN{s5z@5`KqRnfoq%ozp_Mbw+-((s|k} zkHczjcVYDUahq?b~)FrC8Ksjo2ik-X|7i=KcG9w zI;SFSE31C$j~&QO)T^?Bk7ub-bZ4o~8zo_ri`LL{jZ4*3TeUqnP^z)1Ei=Wby3}V_ zSNN2cR?VsE?v$j)q?@E{=JZEf8pFR(aqA&wr)J#WhzmiM?Y)RceH*uz}bCTgqJXe`0UnwHcK z&cs`$>jni-6%}@ZvgdY*iqBjY*JPgxs+Z~Fyw1xE71H%vM2USel59ivEs96+R&}6o zl*!nu9NBT$4x-=6s(M$;p?gp=w9+^9pMlDC)~*0@a<88+p(PdV({;sgPy(7jw-_nU zo(yZ-0U@w_2|ee0qJB6zL2;xK)}&>Hemzx!9oBr2I<(MG@76g3y*6~id}u;zm4%8W zDAT7&92eB#Yz97gQ@Ko|z_UslBBZ=P)~(`(k$I7*`<-?-jIozop$ zh^qv|qPt&V_$iYWn?dz7=ZAr&D-+xe_Kf9dXpL}qvXZr9DnU%%d8#hmNvz$iLh;F3v~? zd^2;u{SP(i`5gQ?N)Ic1=(oP=Vmy?&FP+>Zx+oym%y!4t0B}FGgC(l-3{Q_7;{?r( zuASo{!+euY>mVHsefBAYN0;Yhp6(5PZMq2^;*O3ZPpKL|<7gZx_KJ6wmpATYq+M{)e=OeTVY-mus(2U*E{vE>IH>ni?fOc$l}-*=L>8njSIX5PHK_Yze# zwIw*%x;Z@>ba1hC1!=?k1^Gg{PSk)oqAY0aTfcs__EpuAJZpUC3Alxt+6&J+(I$8g zXP0=9ttKe6bPj%yNSW&i?*#m#DIJ89#i6yht67UdL(nA&fFnt&0M9z8&$$l#xq-#4 z;8U8YWFwS2;%}=gmh*Vv3m>aj7(!YrA0JpP&!}UVBg>LMaJAXpq`6`Yy|kuy1NLig zg^{JkVE}T-a0dBybVE1ggg5EL#F<64(JX790}7J%iX{G|ZgI9|=HAm=4iarP8ySn* zIL`2y(|lS5l3);emhn0zi1a+vS_4@K4PXD`j0TlyT6*%p@EX2lg?T#qTM)m8G=c<+c{km)VB33>z0#QV5qJtN?}Dc| c?ij{$3%u2u!^%ggPm<*%ce9LaPZ{^gKlLyYng9R* diff --git a/app/soapbox/features/home_timeline/components/column_settings.js b/app/soapbox/features/home_timeline/components/column_settings.js deleted file mode 100644 index a643c7e17bf378ae6ec269795d467a28ca03cf8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2233 zcmdT_O>f&U488kT@TL?KDWXw}?5HO#<9s~Sjy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z9k(SFo$O#-Yks`SuJ|if^E9b49D$U)FS#sm9?e^sUSV)8_}5FEvxa_9KY>94VF#A$ z0xk4QNVeXETxkd^Iuw-hVNIV6*isla7-pEa!Kq>u%EFeEb9=k=3mjmaghqZB)ONq3^xZ+$h@`@chENhh)%yxU1P7s&7p z^>Mr`@B6YpO-#}`rPG}bfiHOcr2fcL#P54pojZ4q72MoFxEYtFt*g&Udm_Vs{4Y%} fFD^USjsX2;<@Vdm>aDL zxr1u3Xdel-#hDuQnJMI!&l*|Zna3%yDx>YR;#)i7E>Sk;#;K*sr3X#GqB~Kg!>0GR z%cF+|Bf7QJD?BQ(aTcV7+<#xRc0Ka3m$)Y6?Oyg3x+`=}=@pf)qYmGD2`Lwk9|lP@ zCn#OppnYN2I#t@~GF%VJyD(*2>F7T6E6b+2p*CsM&eBhY+zwnGQ0uIND)b!YJ0cLz z2LL&@;0MZr@|uxOR562ORD;YzZr2?qnJ|lNOBb|6@C9?g$S8r$B(nFwH`poErD`fK zg4bLeH3(0p1xt1FKmJPXz!|8KthfT@Q=&Rx zQj_-lz~kd3H)De+7~z9RJ3r$-rQ9X}mVQLfhEcsT6T!r`HSZSty)yUel6QxlK@2#< z?P=#B!oR7;tqb`y1mDFohHefI=zm+!V`XdU^7Xc)q6kM57OY=kDOZ>TP4-4F{M-w& zTJxl0{(waq>Z6w6FRnk{zA)?4_I1+7hZn1 zDu3wq+J0xD0pfZ*fF#8%%Q%~x7ybqTQ|CJeBB2pT(s4wrKK|Ru?>}5_xJQ#vX`Xx$ ztJib)Z-Gb_KhIB2FV8547=a>b&q%aXk_JWc)yX^B*i$~XQ*5NgCbNH5Nst*p*gP}e z>TGFvO@y5y;&SVjRM=y^Ww?EZW#H>ADHz^I@335S$lj9V7j3C9q{_Z3evh6HA1{#x qvrX46E~{TA_~@VQuxSU6wV=TGITqD;(M*62j>nUdit)3-KK=pBoWz9y diff --git a/app/soapbox/features/notifications/containers/follow_request_container.js b/app/soapbox/features/notifications/containers/follow_request_container.js deleted file mode 100644 index c793ac3dee025c1bbf2757a049bf34486812a3fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 704 zcmZva!A`?442JK03g4DWrMoi?X%d1H5*pl5XgwBan4Dd#K1-tQZck@zlc1qptYIW8Lj$i!3w4obGr_-u&VNH4Xi&@w>yo1$g|F_~hk@ z6-c{x+RcS%$Od^<)L9M!K5<+9g^$Rq{?kP?U?X_)F*AgwhxOWJIj=}uEee0WNse#6 zmyA)V85rVWPujh(W_+b*PcFa`R1V8K*k=%bhD?2&b(Se|_EWjAhPn2V6e76*7s-jL zA{OA-{C31vGc_EXBp6`)6Z{_TX>LNRgnz(xtoaSmfDpDU`6|z`U3oRB)3S?Kq z0;O&*HB77PyH(;OIwDoX&SckV)tB)rS74k?op6`#Ta6ptH9Xupb!8z%to^TBt|mJd Ft3N^D@~8j+ diff --git a/app/soapbox/features/ui/components/account_list_panel.js b/app/soapbox/features/ui/components/account_list_panel.js deleted file mode 100644 index 61b703e4fd6edfdb8a19e865ec02b47feaeb7d8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1719 zcmaJ>O>f&U487-9aF-?l{BiH%0!7h7fNm(d-2=sDTA{X-N%Ypv^?x5F*_E9x%_))| zA0Hn{%jT#J!M)MPpRY%>a4@=o<&n=Rxr^o3g$$Sn6eSJs#{G{^+oowr>}x#b@wilu z&#B`*p^dSv!5huF6slRCX*^@nas)*I9o$Lv4EcB9IM!tS`8?x#c{7+ z@^?O)OMZ>4*JY_&MK@ZJkP6L*xZ&RBA|Q7h9-uBGzIbmdJcza?C~ILY44ik;(!Eev z1HKTd%EB2Ry2S#(k|0@vb1!tMfR3*LNK%cLv3;4+6=u>t;ICF1tP+nJ)NLz!IY~2; zW!hB8*dItABAp*odP_#C#}BYtHj<_|)i!%HAv#x44UOqrjTncsTwQ#PPD7d&7F1##vT*b7Rm46X7p`7&~ZOF9pSpYVb{2gZZyJ)aj z{-Hz4Rb#!p8W5jg(kB$`?*z(Vzk=43Md$qO|4Tju?sg8cggoYA0?YY7kE+FfCeZCl z=a;2_7tKVuV~W(9oNJvN&sDzjd(K~}d0pq>HE;V2%W5WFAn}YVKUwRn5y#jdD6U}a zgDb)PHrJ { - it('should return the initial state', () => { - expect(reducer(undefined, {} as any)).toEqual(ImmutableMap({ - groupId: null, - isSubmitting: false, - isChanged: false, - title: '', - description: '', - coverImage: null, - })); - }); -}); diff --git a/app/soapbox/reducers/__tests__/group_lists.test.ts b/app/soapbox/reducers/__tests__/group_lists.test.ts deleted file mode 100644 index 46527f6829..0000000000 --- a/app/soapbox/reducers/__tests__/group_lists.test.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Map as ImmutableMap, List as ImmutableList } from 'immutable'; - -import reducer from '../group_lists'; - -describe('group_lists reducer', () => { - it('should return the initial state', () => { - expect(reducer(undefined, {} as any)).toEqual(ImmutableMap({ - featured: ImmutableList(), - member: ImmutableList(), - admin: ImmutableList(), - })); - }); -}); diff --git a/app/soapbox/reducers/__tests__/group_relationships.test.ts b/app/soapbox/reducers/__tests__/group_relationships.test.ts deleted file mode 100644 index 31e3e354fb..0000000000 --- a/app/soapbox/reducers/__tests__/group_relationships.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Map as ImmutableMap } from 'immutable'; - -import reducer from '../group_relationships'; - -describe('group_relationships reducer', () => { - it('should return the initial state', () => { - expect(reducer(undefined, {} as any)).toEqual(ImmutableMap()); - }); -}); diff --git a/app/soapbox/reducers/__tests__/groups.test.ts b/app/soapbox/reducers/__tests__/groups.test.ts deleted file mode 100644 index 05b88402f6..0000000000 --- a/app/soapbox/reducers/__tests__/groups.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Map as ImmutableMap } from 'immutable'; - -import reducer from '../groups'; - -describe('groups reducer', () => { - it('should return the initial state', () => { - expect(reducer(undefined, {} as any)).toEqual(ImmutableMap()); - }); -}); diff --git a/app/soapbox/reducers/__tests__/list_editor-test.js b/app/soapbox/reducers/__tests__/list_editor-test.js deleted file mode 100644 index 1b351bca1e9ad8a20471b88ceb29ed4322ca424d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3345 zcmeHJ-*4J55Ps*cxVI!zM72IrbrNc`EfZZk2+znQ20Y~liZ4?q#Q(l??1Tgg4P7^B zTJw-7w$JzZ`|f-vl696NY~YTqfl2U_q(C;0IsLmZ5)xaZYQTjt53@XKO_-rAEb=S? zOH|ufSG}IlKHez<7NW>fX_m>1t>@X}g&DnwX?xi)$$3dlQ(9MF(3G6>>xqhhVm~ zGg&N`T$VyL{rzBZVNhuRiq=yQXh*eh>s--Sz3I~sf{q@=97g^mn0dE;a6g`ny@?m> z2@z7fpq2=(cc;}6_cxiZiQaSl91Z6y;V2o6@+~orLpWcY(uvl`E)@dMRO@UcuB)iV zpKH?HBx(OZFQc*&`5;Vch75w z#$oz!I}AK(9KKDxNypZq$#=K--XT7p@;1Wm#qwD`n{DL|Al(@!V&!xfW}to?`lItB Yx6R}Z(2E&UF#Zr-jc!}RD|u0`UwBBpxBvhE diff --git a/app/soapbox/reducers/__tests__/notifications-test.js b/app/soapbox/reducers/__tests__/notifications-test.js deleted file mode 100644 index 1ea296c60ac558a5c5dcd934fb8b5c2870b5c4bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20432 zcmeHPTT|Oe7JkpK=r@@vV{E`cyfs_p0kgxz27=8dl~l?IyTKx|%wgHFCY&j1}kXom^zjHr*8gD!aql7%XA*AC@h#Qlm@i^;3i%e%p#$Wn?Yjc zGIScTMI@p=TSGkZCbQO|kF!WTkmmmW$@y`w|7-hX|6RX(zQ5nE1o4JD7=&q%#0nzD{N~xa)>;3s)!Y9~l0e3G`15Y_pRN8`>-~AF+p{0bWn`ST zXB@lHR~lIp9-s7%4v+Smy`z)kZol>Mw0V4>Pn`Q+TS4yo!{$*NmuJ2_JZkq~Z`~GK zy7{iVe|FMt_j@O&)8Cz+9yEKcqUU`8<2>i>0iu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C0)u9vStCe!6?qK|BN>*vYG|E zF~ALyc^z>xGmm*=S@Urnt`zgu_Dqjw>!bK>6vl6l07qc70Xdpr@LzZVH*z!5Q`gV+SA?wX&! zSM?BO`0}IR49lzyoL@%F0MXkWnVHopQ!9Pk@s* zPRd9jiw71ys?}NRysg$Y9j%3sQQ_S{>=n3b#alugw$}Xd?3F#9@h^Y8@SqxfeJQl(gtrR!0&|cII{zNoa zddqWSL+5{{-iqJ!WJ%Ie^)~xuQex|`<8YrSX)kfOY^qmqxJ++<4w}rdDa$)Ad|CNh UOP*NhVFho~{&xBr1$y590n=b0RsaA1 diff --git a/app/soapbox/reducers/__tests__/search-test.js b/app/soapbox/reducers/__tests__/search-test.js deleted file mode 100644 index 497f5b08c3543a864ccc613486f01aee7f06a60d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3292 zcmcImU2EGg6n*cnxNmmAB=0F5lq{?rZ5hor24fV(R%(N6WsU=<1$xu2htJE)*Q#p6r20xGl?Cku9V8e*$-fRJ~QRkia8NxyX8kcIgN^!Apn= zOcPyRTommd7XX{}_2cU1X?1h`@L`>J3wPS!{a=6kbp7!DY4c^ZT5mSV1?H8U?6>@7 zK~h!lN-iWNBF()`1kLJ{infgT-1Eq&OhvJ!ab%;Q^^FpUXK?in4!WK~X>-nNmT9x9 zMFlFSP*jB~2m`5zqCI~A`m(2~irZvyU1fAvR5VNAaGcE*|G0@~=6C(GCM-64n9nc5 zYPy6dGKV%FS#QfiDVi-|N0_98^{-(>USt`q0(U`W&6Hd=hq0MSn)13bYu|rhR=uA- zN-b%yniH8T@*J#Uh8rU9xzJ_zD(rGi*)i*s9rNFDk_{TrrJpck_EGZ@PrNIbqC$5Z zH*=kD7jAXutC}$zaGYIgV9dAv>6p{wZ$N~GI#kJqF%7Em3S#Jv*%?#wNp=*ZQ#yjXxmN-(d1zyy- zb9Y;UCd=3W>2%p2EC49Ta2@kZje#!Xvv_^t<3P^KsuZhWjhms+ta(=>;-2pWa)r1H+f0+GLSLyw$ZOYuTTpES`wl3 z1Ho&8cdMO|=OFYPLkG%q)%Xl_UgqWEE4Oo+rcy|R{t+f70S37)oSX!%=-yBd0CY}n zEWMFD{WJg-Db15)fP@iEEtodtO6}!xv3O>bNL~@e#XRNZ!aNxkqj9-zI~T9vC^&jA z5l>I{VfLAda;%Ql+T4E8u+2_be=$D?wf;w<`c1~Fbw3=aroFz8`F{$Ee+NTzejE-x embyC)zys$EWYT4Jwd(x5Qgvkin&3gh~86mrHHyMQoGGU*lXm1A(r@(G2LBN`S0s5h#_RRQgh2Y z9?vuHjGaQ_+!k{DSWMipAJI~O$S&+T)9 z4#Cs*`y*OAL&Ls*gHukMy1OY@)3*nbQQk1wekw!`w5FWmGUk{QxSP1=Rg`mD7aPcN*%2)VM_d;~oE$Yyc}X_ly7E9qx|GpYvJ6t%yb~5yxDbc* z^{15pBfr%oGm_)JOi9)#UGKZPYLrngKc-Q2Ho)rB!Bmd^7IIv)_ne_B{~3* z;*OZf+kS6Emi#fodsa^jx>cdeJT;M7oyZOLhw7nJ=fUm z4)DGb{6fZP=B|VSOw@ztVy`vv2}-1^&M_8+!S9xrTm@ zjmxc@XHPtM8t E3mk9d#Q*>R diff --git a/app/soapbox/reducers/group_lists.js b/app/soapbox/reducers/group_lists.js deleted file mode 100644 index 25b62648ce882fa5d6f817ae0240d861c76cee98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 617 zcmZvZO;3YB5Qgvkin$dMLho(xLTWY9XvChIDGWLZ3uJeQ9}WNA{V3I%a)90WeBKvU zL$3vn@Q4GTfqSJ!!9z>-p27ngxrq9}1dZ+$EO@S6tfPqMLED$7-E+CW-Mkie`*K$l zo3eztCCipr3HO~@zUh7(jBBmzRe(Dd#yDOO~Ij`<|t+3^9^73+sje|%*z6Sf|I)wn6Kz;*`MUzG8z?Wr)Bo38l^E_DS z$rKJT3n|y@z8Tj^Vs}q=J$-ujYie+81)8z*=7e=_hzTgxkH7Y$5KK%wjQL=x-XRXL x%%Ow?K!t|j+7DS-5$-t&xiDZ>KhML%yw9Sak0(dge$Yw4zp36HS1?6W^aE5Y&M5!@ diff --git a/app/soapbox/reducers/group_relationships.js b/app/soapbox/reducers/group_relationships.js deleted file mode 100644 index f74fdb02edf2069a512333869470c4c10398ff6e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 872 zcma)4TWi8F6n^ioIB&L4;`_vbNH;4^#pqs3tmzE&Mv}6N^uI5cR#I`Yx8$6Y?{>n9 zy5bTp@J4DN0^*`*Bsu0(-9yNDRV*>I<^UtsH%AlCWBtq5-R7`OcF}6Kk2h<)h_^U- ziT3kFf)Dd~gmDOVWVwmgx3yI?dyo3!l?b6RNhPaFG5+9HQwvR)s;h*u;swds58ct6 zn2|H9VG6#GMA8trQx0JI45p3*mA>0T?9|&E)PvwLllX&57_N&40|5eM6^}@I9&l(? zdJ?QQg?QK0T}Ko3uGJbfk!*NrF(zJn)y+yK8OgEELt(oc_4P~oWmbNo8EJ9}SyP&* z!6coyAqgu%fw-6<*xdxig!p7KJ%ev+NPgGUHULs0=$+L+8S74S@CR)7>h57O9j7Z< i8Pvf#=np>Tf4I5~deg`y6CGO@-_?<*(Kxv diff --git a/app/soapbox/reducers/groups.js b/app/soapbox/reducers/groups.js deleted file mode 100644 index 8e301e4681db349bcb0f577e55b59c6ad115c558..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 875 zcmaKq%Wi`(5JmTV#q0tSBKt=^|gZha0_xgboK(srU$GLZA z%*vVzgbTco8i<5lSvE-C3#$G@$OSK-5@^i_%$Q5g7M{mk=l1ROxKEG!ht(lYljC|F zC%2X;nv)C}ujKqg@TN}bi6IvX;QBoPOW4GR^`irXqwr?6d%nh!bX4mMj@6_#nkjJv zRxxCxNRS|fqMl%!xkbgRv(I$!FB5RCZ%miJ%+k)-IGSj0|lPc{(zMU!Kk zG`x$N)R1J9a}ks5Y&lv>=fEne=ApTvvxTZ`wK9O9*oew@ExcC6=$AS2iRPp!5b~xn zC+TD@Nb&nC3c;Q&FdpP5!|V*cjYarfQ=0(Dh@?{oyffB&+2I4R>8si4(K { - return state.updateIn([`group:${groupId}`, 'items'], ImmutableOrderedSet(), ids => (ids as ImmutableOrderedSet).delete(statusId)); -}; - const timelineDequeue = (state: State, timelineId: string) => { const top = state.getIn([timelineId, 'top']); @@ -348,8 +343,6 @@ export default function timelines(state: State = initialState, action: AnyAction return timelineConnect(state, action.timeline); case TIMELINE_DISCONNECT: return timelineDisconnect(state, action.timeline); - case GROUP_REMOVE_STATUS_SUCCESS: - return removeStatusFromGroup(state, action.groupId, action.id); case TIMELINE_REPLACE: return state .update('home', TimelineRecord(), timeline => timeline.withMutations(timeline => { diff --git a/app/soapbox/reducers/user_lists.ts b/app/soapbox/reducers/user_lists.ts index 38017f0bb6..4c84f1836e 100644 --- a/app/soapbox/reducers/user_lists.ts +++ b/app/soapbox/reducers/user_lists.ts @@ -32,13 +32,6 @@ import { import { FAMILIAR_FOLLOWERS_FETCH_SUCCESS, } from '../actions/familiar_followers'; -import { - GROUP_MEMBERS_FETCH_SUCCESS, - GROUP_MEMBERS_EXPAND_SUCCESS, - GROUP_REMOVED_ACCOUNTS_FETCH_SUCCESS, - GROUP_REMOVED_ACCOUNTS_EXPAND_SUCCESS, - GROUP_REMOVED_ACCOUNTS_REMOVE_SUCCESS, -} from '../actions/groups'; import { REBLOGS_FETCH_SUCCESS, FAVOURITES_FETCH_SUCCESS, @@ -82,8 +75,6 @@ export const ReducerRecord = ImmutableRecord({ blocks: ListRecord(), mutes: ListRecord(), directory: ListRecord({ isLoading: true }), - groups: ImmutableMap(), - groups_removed_accounts: ImmutableMap(), pinned: ImmutableMap(), birthday_reminders: ImmutableMap(), familiar_followers: ImmutableMap(), @@ -94,7 +85,7 @@ export type List = ReturnType; type Reaction = ReturnType; type ReactionList = ReturnType; type Items = ImmutableOrderedSet; -type NestedListPath = ['followers' | 'following' | 'reblogged_by' | 'favourited_by' | 'reactions' | 'groups' | 'groups_removed_accounts' | 'pinned' | 'birthday_reminders' | 'familiar_followers', string]; +type NestedListPath = ['followers' | 'following' | 'reblogged_by' | 'favourited_by' | 'reactions' | 'pinned' | 'birthday_reminders' | 'familiar_followers', string]; type ListPath = ['follow_requests' | 'blocks' | 'mutes' | 'directory']; const normalizeList = (state: State, path: NestedListPath | ListPath, accounts: APIEntity[], next?: string | null) => { @@ -170,16 +161,6 @@ export default function userLists(state = ReducerRecord(), action: AnyAction) { case DIRECTORY_FETCH_FAIL: case DIRECTORY_EXPAND_FAIL: return state.setIn(['directory', 'isLoading'], false); - case GROUP_MEMBERS_FETCH_SUCCESS: - return normalizeList(state, ['groups', action.id], action.accounts, action.next); - case GROUP_MEMBERS_EXPAND_SUCCESS: - return appendToList(state, ['groups', action.id], action.accounts, action.next); - case GROUP_REMOVED_ACCOUNTS_FETCH_SUCCESS: - return normalizeList(state, ['groups_removed_accounts', action.id], action.accounts, action.next); - case GROUP_REMOVED_ACCOUNTS_EXPAND_SUCCESS: - return appendToList(state, ['groups_removed_accounts', action.id], action.accounts, action.next); - case GROUP_REMOVED_ACCOUNTS_REMOVE_SUCCESS: - return removeFromList(state, ['groups_removed_accounts', action.groupId], action.id); case PINNED_ACCOUNTS_FETCH_SUCCESS: return normalizeList(state, ['pinned', action.id], action.accounts, action.next); case BIRTHDAY_REMINDERS_FETCH_SUCCESS: From fd6899b6cba22bc67b0198aa11408dc03ea992b8 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 3 Nov 2022 16:20:20 -0500 Subject: [PATCH 4/8] Fix reducers/user_lists test --- app/soapbox/reducers/__tests__/user_lists.test.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/soapbox/reducers/__tests__/user_lists.test.ts b/app/soapbox/reducers/__tests__/user_lists.test.ts index 5fbd5f1eaf..fa23f845f1 100644 --- a/app/soapbox/reducers/__tests__/user_lists.test.ts +++ b/app/soapbox/reducers/__tests__/user_lists.test.ts @@ -14,8 +14,6 @@ describe('user_lists reducer', () => { blocks: { next: null, items: ImmutableOrderedSet(), isLoading: false }, mutes: { next: null, items: ImmutableOrderedSet(), isLoading: false }, directory: { next: null, items: ImmutableOrderedSet(), isLoading: true }, - groups: {}, - groups_removed_accounts: {}, pinned: {}, birthday_reminders: {}, familiar_followers: {}, From 66cd92970bbcab62ee006005f2f7b34ff90a7b5a Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 3 Nov 2022 18:48:10 -0500 Subject: [PATCH 5/8] Developers: add Service Worker debug page --- app/soapbox/components/error_boundary.tsx | 11 +- .../developers/components/indicator.tsx | 24 +++ .../features/developers/developers-menu.tsx | 8 + .../developers/service-worker-info.tsx | 140 ++++++++++++++++++ app/soapbox/features/ui/index.tsx | 2 + .../features/ui/util/async-components.ts | 4 + app/soapbox/utils/sw.ts | 15 ++ package.json | 2 +- yarn.lock | 8 +- 9 files changed, 199 insertions(+), 15 deletions(-) create mode 100644 app/soapbox/features/developers/components/indicator.tsx create mode 100644 app/soapbox/features/developers/service-worker-info.tsx create mode 100644 app/soapbox/utils/sw.ts diff --git a/app/soapbox/components/error_boundary.tsx b/app/soapbox/components/error_boundary.tsx index 436b40134c..76adf97284 100644 --- a/app/soapbox/components/error_boundary.tsx +++ b/app/soapbox/components/error_boundary.tsx @@ -8,6 +8,7 @@ import { Text, Stack } from 'soapbox/components/ui'; import { captureException } from 'soapbox/monitoring'; import KVStore from 'soapbox/storage/kv_store'; import sourceCode from 'soapbox/utils/code'; +import { unregisterSw } from 'soapbox/utils/sw'; import SiteLogo from './site-logo'; @@ -15,16 +16,6 @@ import type { RootState } from 'soapbox/store'; const goHome = () => location.href = '/'; -/** Unregister the ServiceWorker */ -// https://stackoverflow.com/a/49771828/8811886 -const unregisterSw = async(): Promise => { - if (navigator.serviceWorker) { - const registrations = await navigator.serviceWorker.getRegistrations(); - const unregisterAll = registrations.map(r => r.unregister()); - await Promise.all(unregisterAll); - } -}; - const mapStateToProps = (state: RootState) => { const { links, logo } = getSoapboxConfig(state); diff --git a/app/soapbox/features/developers/components/indicator.tsx b/app/soapbox/features/developers/components/indicator.tsx new file mode 100644 index 0000000000..5cb7763b52 --- /dev/null +++ b/app/soapbox/features/developers/components/indicator.tsx @@ -0,0 +1,24 @@ +import classNames from 'clsx'; +import React from 'react'; + +interface IIndicator { + state?: 'active' | 'pending' | 'error' | 'inactive', + size?: 'sm', +} + +/** Indicator dot component. */ +const Indicator: React.FC = ({ state = 'inactive', size = 'sm' }) => { + return ( +
+ ); +}; + +export default Indicator; \ No newline at end of file diff --git a/app/soapbox/features/developers/developers-menu.tsx b/app/soapbox/features/developers/developers-menu.tsx index 76320e5303..a94eb09a60 100644 --- a/app/soapbox/features/developers/developers-menu.tsx +++ b/app/soapbox/features/developers/developers-menu.tsx @@ -89,6 +89,14 @@ const Developers: React.FC = () => { + + + + + + + + diff --git a/app/soapbox/features/developers/service-worker-info.tsx b/app/soapbox/features/developers/service-worker-info.tsx new file mode 100644 index 0000000000..18800f1de0 --- /dev/null +++ b/app/soapbox/features/developers/service-worker-info.tsx @@ -0,0 +1,140 @@ +import React, { useEffect, useState } from 'react'; +import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; + +import List, { ListItem } from 'soapbox/components/list'; +import { HStack, Text, Column, FormActions, Button, Stack, Icon } from 'soapbox/components/ui'; +import { unregisterSw } from 'soapbox/utils/sw'; + +import Indicator from './components/indicator'; + +const messages = defineMessages({ + heading: { id: 'column.developers.service_worker', defaultMessage: 'Service Worker' }, + status: { id: 'sw.status', defaultMessage: 'Status' }, + url: { id: 'sw.url', defaultMessage: 'Script URL' }, +}); + +/** Hook that returns the active ServiceWorker registration. */ +const useRegistration = () => { + const [isLoading, setLoading] = useState(true); + const [registration, setRegistration] = useState(); + + const isSupported = 'serviceWorker' in navigator; + + useEffect(() => { + if (isSupported) { + navigator.serviceWorker.getRegistration() + .then(r => { + setRegistration(r); + setLoading(false); + }) + .catch(() => setLoading(false)); + } else { + setLoading(false); + } + }, []); + + return { + isLoading, + registration, + }; +}; + +interface IServiceWorkerInfo { +} + +/** Mini ServiceWorker debugging component. */ +const ServiceWorkerInfo: React.FC = () => { + const intl = useIntl(); + const { isLoading, registration } = useRegistration(); + + const url = registration?.active?.scriptURL; + + const getState = () => { + if (registration?.active) { + return 'active'; + } else if (registration?.waiting) { + return 'pending'; + } else { + return 'inactive'; + } + }; + + const getMessage = () => { + if (isLoading) { + return ( + + ); + } else if (!isLoading && !registration) { + return ( + + ); + } else if (registration?.active) { + return ( + + ); + } else if (registration?.waiting) { + return ( + + ); + } else { + return ( + + ); + } + }; + + const handleRestart = async() => { + await unregisterSw(); + window.location.reload(); + }; + + return ( + + + + + + + {getMessage()} + + + + {url && ( + + + {url} + + + + )} + + + + + + + + ); +}; + +export default ServiceWorkerInfo; \ No newline at end of file diff --git a/app/soapbox/features/ui/index.tsx b/app/soapbox/features/ui/index.tsx index 08d96e9205..973a2187c4 100644 --- a/app/soapbox/features/ui/index.tsx +++ b/app/soapbox/features/ui/index.tsx @@ -112,6 +112,7 @@ import { TestTimeline, LogoutPage, AuthTokenList, + ServiceWorkerInfo, } from './util/async-components'; import { WrappedRoute } from './util/react_router_helpers'; @@ -311,6 +312,7 @@ const SwitchingColumnsArea: React.FC = ({ children }) => { + new Promise((_resolve, reject) => reject())} content={children} /> diff --git a/app/soapbox/features/ui/util/async-components.ts b/app/soapbox/features/ui/util/async-components.ts index f416c859ac..773eed795c 100644 --- a/app/soapbox/features/ui/util/async-components.ts +++ b/app/soapbox/features/ui/util/async-components.ts @@ -470,6 +470,10 @@ export function TestTimeline() { return import(/* webpackChunkName: "features/test_timeline" */'../../test_timeline'); } +export function ServiceWorkerInfo() { + return import(/* webpackChunkName: "features/developers" */'../../developers/service-worker-info'); +} + export function DatePicker() { return import(/* webpackChunkName: "date_picker" */'../../birthdays/date_picker'); } diff --git a/app/soapbox/utils/sw.ts b/app/soapbox/utils/sw.ts new file mode 100644 index 0000000000..910d7189a2 --- /dev/null +++ b/app/soapbox/utils/sw.ts @@ -0,0 +1,15 @@ +/** Unregister the ServiceWorker */ +// https://stackoverflow.com/a/49771828/8811886 +const unregisterSw = async(): Promise => { + if (navigator.serviceWorker) { + // FIXME: this only works if using a single tab. + // Send a message to sw.js instead to refresh all tabs. + const registrations = await navigator.serviceWorker.getRegistrations(); + const unregisterAll = registrations.map(r => r.unregister()); + await Promise.all(unregisterAll); + } +}; + +export { + unregisterSw, +}; \ No newline at end of file diff --git a/package.json b/package.json index 2d25a828bd..a41d9fae20 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "@sentry/browser": "^7.11.1", "@sentry/react": "^7.11.1", "@sentry/tracing": "^7.11.1", - "@tabler/icons": "^1.73.0", + "@tabler/icons": "^1.109.0", "@tailwindcss/forms": "^0.5.3", "@tailwindcss/typography": "^0.5.7", "@tanstack/react-query": "^4.0.10", diff --git a/yarn.lock b/yarn.lock index 423516f956..c7f1b6e8e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2290,10 +2290,10 @@ remark "^13.0.0" unist-util-find-all-after "^3.0.2" -"@tabler/icons@^1.73.0": - version "1.73.0" - resolved "https://registry.yarnpkg.com/@tabler/icons/-/icons-1.73.0.tgz#26d81858baf41be939504e1f9b4b32835eda6fdb" - integrity sha512-MhAHFzVj79ZWlAIRD++7Mk55PZsdlEdkfkjO3DD257mqj8iJZQRAQtkx2UFJXVs2mMrcOUu1qtj4rlVC8BfnKA== +"@tabler/icons@^1.109.0": + version "1.109.0" + resolved "https://registry.yarnpkg.com/@tabler/icons/-/icons-1.109.0.tgz#11626c3fc097f2f70c4c197e4b9909fb05380752" + integrity sha512-B0YetE4pB6HY2Wa57v/LJ3NgkJzKYPze4U0DurIqPoKSptatKv2ga76FZSkO6EUpkYfHMtGPM6QjpJljfuCmAQ== "@tailwindcss/forms@^0.5.3": version "0.5.3" From d385c0d80c744505ee82dc13970856276c9dfcc8 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 3 Nov 2022 19:00:15 -0500 Subject: [PATCH 6/8] Developers, SW: check 'waiting' before 'active' --- .../developers/service-worker-info.tsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/soapbox/features/developers/service-worker-info.tsx b/app/soapbox/features/developers/service-worker-info.tsx index 18800f1de0..9b77515876 100644 --- a/app/soapbox/features/developers/service-worker-info.tsx +++ b/app/soapbox/features/developers/service-worker-info.tsx @@ -50,10 +50,10 @@ const ServiceWorkerInfo: React.FC = () => { const url = registration?.active?.scriptURL; const getState = () => { - if (registration?.active) { - return 'active'; - } else if (registration?.waiting) { + if (registration?.waiting) { return 'pending'; + } else if (registration?.active) { + return 'active'; } else { return 'inactive'; } @@ -74,13 +74,6 @@ const ServiceWorkerInfo: React.FC = () => { defaultMessage='Unavailable' /> ); - } else if (registration?.active) { - return ( - - ); } else if (registration?.waiting) { return ( = () => { defaultMessage='Waiting' /> ); + } else if (registration?.active) { + return ( + + ); } else { return ( Date: Thu, 3 Nov 2022 19:36:14 -0500 Subject: [PATCH 7/8] Don't check react-notification into the repo --- app/soapbox/actions/alerts.ts | 2 +- .../ui/containers/notifications_container.tsx | 2 +- .../react-notification/defaultPropTypes.js | Bin 725 -> 0 bytes app/soapbox/react-notification/index.d.ts | 88 ------------------ app/soapbox/react-notification/index.js | Bin 126 -> 0 bytes .../react-notification/notification.js | Bin 4864 -> 0 bytes .../react-notification/notificationStack.js | Bin 2864 -> 0 bytes .../react-notification/stackedNotification.js | Bin 1644 -> 0 bytes package.json | 1 + yarn.lock | 7 ++ 10 files changed, 10 insertions(+), 90 deletions(-) delete mode 100644 app/soapbox/react-notification/defaultPropTypes.js delete mode 100644 app/soapbox/react-notification/index.d.ts delete mode 100644 app/soapbox/react-notification/index.js delete mode 100644 app/soapbox/react-notification/notification.js delete mode 100644 app/soapbox/react-notification/notificationStack.js delete mode 100644 app/soapbox/react-notification/stackedNotification.js diff --git a/app/soapbox/actions/alerts.ts b/app/soapbox/actions/alerts.ts index 3e5aed4b32..8f200563a3 100644 --- a/app/soapbox/actions/alerts.ts +++ b/app/soapbox/actions/alerts.ts @@ -5,7 +5,7 @@ import { httpErrorMessages } from 'soapbox/utils/errors'; import type { SnackbarActionSeverity } from './snackbar'; import type { AnyAction } from '@reduxjs/toolkit'; import type { AxiosError } from 'axios'; -import type { NotificationObject } from 'soapbox/react-notification'; +import type { NotificationObject } from 'react-notification'; const messages = defineMessages({ unexpectedTitle: { id: 'alert.unexpected.title', defaultMessage: 'Oops!' }, diff --git a/app/soapbox/features/ui/containers/notifications_container.tsx b/app/soapbox/features/ui/containers/notifications_container.tsx index 79d8724c13..2119228bf8 100644 --- a/app/soapbox/features/ui/containers/notifications_container.tsx +++ b/app/soapbox/features/ui/containers/notifications_container.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { useIntl, MessageDescriptor } from 'react-intl'; +import { NotificationStack, NotificationObject, StyleFactoryFn } from 'react-notification'; import { useHistory } from 'react-router-dom'; import { dismissAlert } from 'soapbox/actions/alerts'; import { Button } from 'soapbox/components/ui'; import { useAppSelector, useAppDispatch } from 'soapbox/hooks'; -import { NotificationStack, NotificationObject, StyleFactoryFn } from 'soapbox/react-notification'; import type { Alert } from 'soapbox/reducers/alerts'; diff --git a/app/soapbox/react-notification/defaultPropTypes.js b/app/soapbox/react-notification/defaultPropTypes.js deleted file mode 100644 index 1a3dd9d4e8faf2fffa255d31482d26465a5a2174..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 725 zcma)3y-ve05Z?0?-U<@*0q9i93<%gz2gf;AM{Qs5T~Mp4?@pa4iWAX@#ggwke}6__ zQxx?Yss1?Dz{*DQYEfVA_mT#SRZ+m9U8=z9#)&!=N_k+`J9rpgE-Ao^O(Zv;mj#s} zED^)*ZZZW29)hIt_I8Q<2Hy=vsM0_iK??t4FNxfg`)|cS6?Agxq_A;l_PK~{f=Lj| z(T%e88lA8ADNN-Tm^O)^IGDjp9cR!){{xS+I~B4==Cu`wx%cb!_vZ6235_oy=4Cu} tyg6lGhjE(uS^H5XL&crz&HNJbx(%1}_r}`Na^QNFL3NZS``GiU_yyeG^pgMp diff --git a/app/soapbox/react-notification/index.d.ts b/app/soapbox/react-notification/index.d.ts deleted file mode 100644 index 22f0211c8a..0000000000 --- a/app/soapbox/react-notification/index.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -declare module 'soapbox/react-notification' { - import { Component, ReactElement } from 'react'; - - interface StyleFactoryFn { - (index: number, style: object | void, notification: NotificationProps): object; - } - - interface OnClickNotificationProps { - /** - * Callback function to run when the action is clicked. - * @param notification Notification currently being clicked - * @param deactivate Function that can be called to set the notification to inactive. - * Used to activate notification exit animation on click. - */ - onClick?(notification: NotificationProps, deactivate: () => void): void; - } - - interface NotificationProps extends OnClickNotificationProps { - /** The name of the action, e.g., "close" or "undo". */ - action?: string; - /** Custom action styles. */ - actionStyle?: object; - /** Custom snackbar styles when the bar is active. */ - activeBarStyle?: object; - /** - * Custom class to apply to the top-level component when active. - * @default 'notification-bar-active' - */ - activeClassName?: string; - /** Custom snackbar styles. */ - barStyle?: object; - /** Custom class to apply to the top-level component. */ - className?: string; - /** - * Timeout for onDismiss event. - * @default 2000 - */ - dismissAfter?: boolean | number; - /** - * If true, the notification is visible. - * @default false - */ - isActive?: boolean; - /** The message or component for the notification. */ - message: string | ReactElement; - /** Setting this prop to `false` will disable all inline styles. */ - style?: boolean; - /** The title for the notification. */ - title?: string | ReactElement; - /** Custom title styles. */ - titleStyle?: object; - - /** - * Callback function to run when dismissAfter timer runs out - * @param notification Notification currently being dismissed. - */ - onDismiss?(notification: NotificationProps): void; - } - - interface NotificationStackProps extends OnClickNotificationProps { - /** Create the style of the actions. */ - actionStyleFactory?: StyleFactoryFn; - /** Create the style of the active notification. */ - activeBarStyleFactory?: StyleFactoryFn; - /** Create the style of the notification. */ - barStyleFactory?: StyleFactoryFn; - /** - * If false, notification dismiss timers start immediately. - * @default true - */ - dismissInOrder?: boolean; - /** Array of notifications to render. */ - notifications: NotificationObject[]; - /** - * Callback function to run when dismissAfter timer runs out - * @param notification Notification currently being dismissed. - */ - onDismiss?(notification: NotificationObject): void; - } - - export interface NotificationObject extends NotificationProps { - key: number | string; - } - - export class Notification extends Component {} - - export class NotificationStack extends Component {} -} diff --git a/app/soapbox/react-notification/index.js b/app/soapbox/react-notification/index.js deleted file mode 100644 index 3d7da7ceeb9da6df6524ce5b9b058b926b2e2ff2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 126 zcmYeTD9A4=QK(i(Nli;E%_&hxELQN#FUd^HOinDx%+FJ(RY)t!&s9*@)6YW^R=4I# SC7?67Br!P~hjy?W&lBv0T6fyJOn*HghG@?lnXF?RY5K^n-x5VtEDJ7TuF67YqEs8%9-IB4#x-M zL*SasMoyiCVpU0H;FPn>3}Fp#BnnDi8rZ;G$rbbzE%jb_&799!U6{X=tj=#L^xSAA z^ zl#!@oW5X14Xwpw)`BvzaK=htG0gFf?G{t$zJv0spJWSF%7b`AngWG6s+=sq(N|-es zg45yFg7fiuZn$zw4!8||+z{@WFN{y3C{B6CF%l{Q-7oP-?SDQn$|4Ap*f&h4Q<$?t zV-kv+T9xih$749-9G1pZC*yHbrioOGaV|4GR&~MkxRfJI!$^Z=H=5O=!1~uVTH5f@ zdXp@f{&-bVEL@qJBx6O<1~P=6(C?Wxy@3xDvnn`K9xYo~T{r^@VV^d!fM)BC0Do=6TN_;7l4LS13MGd=;bx zpBt2oCTaRZ5MGJgEK$m8BZIJFd5*UViYKvy6;lg=yQO}gOcqk1)^~G8zrlVkOWKKy zp_FRH3OJP*lpKO)r58nSvOveAs+3cSG5r4H`LXxLut5jy=L17?Bf2GAHd0d9D2sEwA&%Ud0pB;ho~wVZqVu1GbFJQ&TR&7 z`EOy$X!}5x4!(%>8@_zxrvrGk2g*QjfrnD+&|NNi-%whIrCL&Y_U!4?pF;CGQc9ka zpL@^}&d>ZE7mKB*vf!!U2B)X9ie(M+P;9(q9m3Ccnyaq5!XYKY>Ie?*V7$ORmBjg- zt6o!$!+0QQ&dFXOSU>iraig2R8sn;HC)aN(3PaQIx0FM>@BdT{bbz1yfjm#s0B3VA zow}n+Y@O_Z&1P~h)S}6K7qfSE(#Ls)Mty#X4=7E~FPb=91I=o@e#bL>(8G?#yRB&bBtt`+xBhVo|G@X_sL=_GOMDSIjmM)q0`~x6B`JBQd&CjN15dYXT5wYl{oX%*R7c(XFmn z88&HTA+qW2F4oKAEd$G#ZTxXxHPd(F7a)#}WIOS7)nAS&y4Z-=q^yg=-Z0+ldc5b` zgxHf!GQxg0trgdrEqDjKZg@_k!G23wtv&ONh+zK`rSK2QZgl{ z**(-3Q#0TE|B%HDq)<+%TX1~4gGyMolDvY4jgTB3w7DamR?zG!=D3AfkrgxGmc$kj zPDHWYY2)A%XKM$w(OY?cB1{QDd%(WcO50EWB9 zDEP4Y#@8-q){0v-K{`NtnEQVZ4#yT&+Bv;l!q?~R8+ZjlA zJcoAw0K-t+8noSI*`cw$NHDRFu}&23s>YP!#YF zQx#62Z!0^{xQgA{@o8}1+WK$!4NUFKMtI4zFv7kdrE%-`%e@1yc@WI zl_R+`6rF=mfiPU;?;tX=d=z~g6cu5(@q`J!mJ(~C)t^$V@4}Kv^@ipJZOFK|7gfXL z!0@mrot|=l$vZMuJQO?X_?@cnwno`@r<5C_^{XH#iF@IQ zDZ-ZZ7a7&yFeTn)fx~i@(WIR|6a0gqP%<WTHGX; zmG6(71jAFJ^h0Ng{s&6{{T=cWP>-wIow%E7}y`Z^K;J zPyF9T7+w*$?~D{kPM_d>D~wU3BKW<8@q;H1jO>6VIn88(#tZhTWIp~@dNirOhCY_u zh`v5vJ~8j4dz@!y8lKSoB3%0ALew}ZOPGZF{6JA3`;aSo++t-GOmgFB_7-&WX(VEw QW&FE;!$yZrUm_RTPYmO_fdBvi diff --git a/app/soapbox/react-notification/stackedNotification.js b/app/soapbox/react-notification/stackedNotification.js deleted file mode 100644 index c8d7200d49d9a20a235cc3adeb18b48e2c7aec78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1644 zcmbtUO>f&U487-9aF-?yGP}cW>s+jBuN#K0#m=rwFG6g|km$BUkpDhPmSQ;#c3BQV z!jH$tCz8b)TB%5?-$2;)P)l1qwOGT;R<;N)+U%T9D;WB^BDAnB7R4ISy0rHp+!AkT$EH$=D2>8Nd!bMib*Y6K$o< zEwK<#hA04OZv@F_`~*$aTJ(X3G+|q*y2aa8iXEqUjKq{bNmZ|$HM`>6gR3N>cz3e? zrUyl82qxXNdliZF`RbnU{M}yHc#S{}q|b1}5VS4&IePmNTV}#An2g=rbVC%Sm`D zqht4|x|x!q#mdZNo5>om-bMu>Lgpkz)NCeHVDEZQ?ND;Zep)gxNP|&l)c@c2O{S3_ zI4wVsF4nBo8oo4x;+f*DN(OWE)M$l~y?1`)Nrl?2v3zzrFx##p1nId$_`x56jRP(C zE2(pwZKsld<#7zO8dv7x0*DWUZpPJ_JDrfrSb7;}4T7p?GXAk4r<)9i>~x|G9}qqY zvCjB*u;PZ?=W{AZumSAzJfGTf!#RFJf92jg6G76DyKxiCJ=ZL+-)wpmBZO_> Date: Thu, 3 Nov 2022 19:56:03 -0500 Subject: [PATCH 8/8] Fix spacing around column headings, remove unused column settings --- app/soapbox/components/sub_navigation.tsx | 46 +----------------- .../components/column_settings.js | Bin 1935 -> 0 bytes .../containers/column_settings_container.js | Bin 502 -> 0 bytes .../features/community_timeline/index.tsx | 7 +-- .../features/hashtag-timeline/index.tsx | 10 ++-- .../components/column_settings.js | Bin 2227 -> 0 bytes .../containers/column_settings_container.js | Bin 496 -> 0 bytes .../features/public_timeline/index.tsx | 8 +-- 8 files changed, 17 insertions(+), 54 deletions(-) delete mode 100644 app/soapbox/features/community_timeline/components/column_settings.js delete mode 100644 app/soapbox/features/community_timeline/containers/column_settings_container.js delete mode 100644 app/soapbox/features/public_timeline/components/column_settings.js delete mode 100644 app/soapbox/features/public_timeline/containers/column_settings_container.js diff --git a/app/soapbox/components/sub_navigation.tsx b/app/soapbox/components/sub_navigation.tsx index b8e2b310d8..1e6afb85a7 100644 --- a/app/soapbox/components/sub_navigation.tsx +++ b/app/soapbox/components/sub_navigation.tsx @@ -4,34 +4,22 @@ import { defineMessages, useIntl } from 'react-intl'; // import { connect } from 'react-redux'; import { useHistory } from 'react-router-dom'; -// import { openModal } from 'soapbox/actions/modals'; -// import { useAppDispatch } from 'soapbox/hooks'; - import { CardHeader, CardTitle } from './ui'; const messages = defineMessages({ back: { id: 'column_back_button.label', defaultMessage: 'Back' }, - settings: { id: 'column_header.show_settings', defaultMessage: 'Show settings' }, }); interface ISubNavigation { - message: String, + message: React.ReactNode, + /** @deprecated Unused. */ settings?: React.ComponentType, } const SubNavigation: React.FC = ({ message }) => { const intl = useIntl(); - // const dispatch = useAppDispatch(); const history = useHistory(); - // const ref = useRef(null); - - // const [scrolled, setScrolled] = useState(false); - - // const onOpenSettings = () => { - // dispatch(openModal('COMPONENT', { component: Settings })); - // }; - const handleBackClick = () => { if (window.history && window.history.length === 1) { history.push('/'); @@ -40,36 +28,6 @@ const SubNavigation: React.FC = ({ message }) => { } }; - // const handleBackKeyUp = (e) => { - // if (e.key === 'Enter') { - // handleClick(); - // } - // } - - // const handleOpenSettings = () => { - // onOpenSettings(); - // } - - // useEffect(() => { - // const handleScroll = throttle(() => { - // if (this.node) { - // const { offsetTop } = this.node; - - // if (offsetTop > 0) { - // setScrolled(true); - // } else { - // setScrolled(false); - // } - // } - // }, 150, { trailing: true }); - - // window.addEventListener('scroll', handleScroll); - - // return () => { - // window.removeEventListener('scroll', handleScroll); - // }; - // }, []); - return ( $CNTW(qhvdAk~SF@ znixUkSw@xV3D}?G(OfQ!+%J_gm18E0_sNqB4dO?=!7F z*N9s6QC72RsW)+^sRzXs+E`Fby7WP#%x8`$)cQrQ*OK?iQ54f(X%s7wF%(+aF_7(2 zQuH|vi;yis*%uGVQ8$w&0LY}ad=AugK8H|>b%9i1R-GhhwJ4Zc69+r9M5|h5?*(>TosDaW z6aYg_ax=N=Ywv_`&T^g_N}R%QxBqhBWTynM5H@lISdZn-NzCnPST)dKQ#O^m% z@+8bW#j^o6yzS#IMy6@O8Pz$;pq%3R40xKNK*DCcA>MDFUMIa30+QCDF)R2X#_ z&W#uz`sHr_<`bsbU=sVYVGJ89epiP|35PX+I*xrzPq-!&sM z(G1~%1Q#rkrbfRVBoG772Tx38=%w3?L?fX)9m1UuNi!%&Omx|g42z`s5!yn(S$Z!* z!z;NBe|i@DTzMM&R|}FYxlEe(?NaEHpE$+grVdlk(|=-^XF8?n=uhL@_nF>NOHE($ z%0-?A2F`Gyv7nhEF0_){2c8S|UwnK#KBdD<9r`IH{yzBb&psl=J*V#1Tkm8+4?92` H1a0sa;GT)V diff --git a/app/soapbox/features/community_timeline/containers/column_settings_container.js b/app/soapbox/features/community_timeline/containers/column_settings_container.js deleted file mode 100644 index d208380894105f50ddc27d0057de0860bc11c7bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 502 zcmZ8e!EVDK488Lez6GR=-dA;(?gJ`yw`rOXaZ}U=B5 { return ( - +
+ +
+ = ({ params }) => { const tags = params?.tags || { any: [], all: [], none: [] }; const dispatch = useAppDispatch(); - const hasUnread = useAppSelector(state => (state.timelines.getIn([`hashtag:${id}`, 'unread']) as number) > 0); const disconnects = useRef<(() => void)[]>([]); // Mastodon supports displaying results from multiple hashtags. @@ -100,7 +99,10 @@ export const HashtagTimeline: React.FC = ({ params }) => { return ( - +
+ +
+ f&U488kT@TL?_#L-4&AFYzjW%V9$XERmw1*YU1SL@!Ly5PU zR$ppFt@qRuVFu2}x7i2QE78Y98rRv+Uz&FU%%7Pa!ysr&k3{*f9P(2o@vkaUtodIH6 z2l_c`=X+y>dg)XOg?-?^Yhn0m>ce^#>>S1>2+On@C1|xMQk4@2JF|rAT4k>Vc3ho} zYl##9Lrrosx#(-}gmBJso*GJ=!f>{Ka^PgA7_bmFbOczB<KK9hyxTQmo#-dq8LQ`p6IlwxIB74&qtDUWL82o3Lwt$rwMwHrj;tIcF3^vQp!};>JCYs_kk0RPer;2lpSiP0}d3BtpsjI k&M6&c;?T#G`19bK-+PM?_sMa;emX}l^zj2|gP;xm0O&343jhEB diff --git a/app/soapbox/features/public_timeline/containers/column_settings_container.js b/app/soapbox/features/public_timeline/containers/column_settings_container.js deleted file mode 100644 index 63a629007df0fe29ea7925be61f99b8fe691cec8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 496 zcmZ9J&u+sY494#~g>L~VqxV(arF(!%-EEpCM%*-N0ueY;rz-D0lR^I>OJMN#!+dnZ z=mWt8talDA!3>As2dDxXOD_SN>0GUa=t^CSv`3=OwXp_!G_J**U!_{F{(}jfcX1W7 zfI*qF_5C!s0?Jpi$a=oVp`*ylRPueN72IPa7|ggQL-^r$!H*F(5K{`9H;@+rP!z9l z*Q;D=l;$m2jnhxx*-F)7R{XXr_PvXvA$z=$Ws|p5!Y6t_nu1%F0N!mE2jmHVlN)GH z*r { return ( - +
+ +
+ + {showExplanationBox &&
}