From d1071a109b7db2d595ff3788e3465cbc87e94db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Mon, 26 Dec 2022 00:52:06 +0100 Subject: [PATCH] Remove unused styles/components MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../__tests__/avatar-overlay.test.tsx | 31 -- app/soapbox/components/avatar-overlay.tsx | 19 - app/soapbox/components/status.tsx | 1 - .../notifications/components/notification.tsx | 20 +- .../components/placeholder-account.tsx | 25 +- .../components/scheduled-status.tsx | 6 +- .../status/components/detailed-status.tsx | 6 +- .../features/ui/components/pending-status.tsx | 6 +- .../ui/components/who-to-follow-panel.tsx | 4 +- app/styles/_mixins.scss | 31 -- app/styles/accounts.scss | 53 --- app/styles/application.scss | 3 - app/styles/boost.scss | 46 --- app/styles/chats.scss | 318 ---------------- app/styles/components/aliases.scss | 22 -- app/styles/components/backups.scss | 3 +- app/styles/components/columns.scss | 341 +----------------- app/styles/components/datepicker.scss | 3 +- app/styles/components/display-name.scss | 27 -- app/styles/components/filters.scss | 8 - app/styles/components/modal.scss | 4 - app/styles/components/profile-hover-card.scss | 4 - app/styles/components/react-toggle.scss | 3 +- app/styles/dyslexic.scss | 10 - app/styles/forms.scss | 263 -------------- app/styles/placeholder.scss | 10 - app/styles/rtl.scss | 55 +-- app/styles/themes.scss | 18 - app/styles/ui.scss | 235 +----------- app/styles/variables.scss | 51 +-- 30 files changed, 46 insertions(+), 1580 deletions(-) delete mode 100644 app/soapbox/components/__tests__/avatar-overlay.test.tsx delete mode 100644 app/soapbox/components/avatar-overlay.tsx delete mode 100644 app/styles/boost.scss delete mode 100644 app/styles/chats.scss delete mode 100644 app/styles/components/profile-hover-card.scss diff --git a/app/soapbox/components/__tests__/avatar-overlay.test.tsx b/app/soapbox/components/__tests__/avatar-overlay.test.tsx deleted file mode 100644 index 4e83dd071..000000000 --- a/app/soapbox/components/__tests__/avatar-overlay.test.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; - -import { normalizeAccount } from 'soapbox/normalizers'; - -import { render, screen } from '../../jest/test-helpers'; -import AvatarOverlay from '../avatar-overlay'; - -import type { ReducerAccount } from 'soapbox/reducers/accounts'; - -describe(' { - const account = normalizeAccount({ - username: 'alice', - acct: 'alice', - display_name: 'Alice', - avatar: '/animated/alice.gif', - avatar_static: '/static/alice.jpg', - }) as ReducerAccount; - - const friend = normalizeAccount({ - username: 'eve', - acct: 'eve@blackhat.lair', - display_name: 'Evelyn', - avatar: '/animated/eve.gif', - avatar_static: '/static/eve.jpg', - }) as ReducerAccount; - - it('renders a overlay avatar', () => { - render(); - expect(screen.queryAllByRole('img')).toHaveLength(2); - }); -}); diff --git a/app/soapbox/components/avatar-overlay.tsx b/app/soapbox/components/avatar-overlay.tsx deleted file mode 100644 index a463b35ce..000000000 --- a/app/soapbox/components/avatar-overlay.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; - -import StillImage from 'soapbox/components/still-image'; - -import type { Account as AccountEntity } from 'soapbox/types/entities'; - -interface IAvatarOverlay { - account: AccountEntity, - friend: AccountEntity, -} - -const AvatarOverlay: React.FC = ({ account, friend }) => ( -
- - -
-); - -export default AvatarOverlay; diff --git a/app/soapbox/components/status.tsx b/app/soapbox/components/status.tsx index 66710bf9c..822fc95df 100644 --- a/app/soapbox/components/status.tsx +++ b/app/soapbox/components/status.tsx @@ -45,7 +45,6 @@ export interface IStatus { unread?: boolean, onMoveUp?: (statusId: string, featured?: boolean) => void, onMoveDown?: (statusId: string, featured?: boolean) => void, - group?: ImmutableMap, focusable?: boolean, featured?: boolean, hideActionBar?: boolean, diff --git a/app/soapbox/features/notifications/components/notification.tsx b/app/soapbox/features/notifications/components/notification.tsx index bf330a6c1..1bc8b1760 100644 --- a/app/soapbox/features/notifications/components/notification.tsx +++ b/app/soapbox/features/notifications/components/notification.tsx @@ -8,16 +8,16 @@ import { reblog, favourite, unreblog, unfavourite } from 'soapbox/actions/intera import { openModal } from 'soapbox/actions/modals'; import { getSettings } from 'soapbox/actions/settings'; import { hideStatus, revealStatus } from 'soapbox/actions/statuses'; +import Account from 'soapbox/components/account'; import Icon from 'soapbox/components/icon'; import { HStack, Text, Emoji } from 'soapbox/components/ui'; -import AccountContainer from 'soapbox/containers/account-container'; import StatusContainer from 'soapbox/containers/status-container'; import { useAppDispatch, useAppSelector, useInstance } from 'soapbox/hooks'; import { makeGetNotification } from 'soapbox/selectors'; import { NotificationType, validType } from 'soapbox/utils/notification'; import type { ScrollPosition } from 'soapbox/components/status'; -import type { Account, Status as StatusEntity, Notification as NotificationEntity } from 'soapbox/types/entities'; +import type { Account as AccountEntity, Status as StatusEntity, Notification as NotificationEntity } from 'soapbox/types/entities'; const notificationForScreenReader = (intl: IntlShape, message: string, timestamp: Date) => { const output = [message]; @@ -27,7 +27,7 @@ const notificationForScreenReader = (intl: IntlShape, message: string, timestamp return output.join(', '); }; -const buildLink = (account: Account): JSX.Element => ( +const buildLink = (account: AccountEntity): JSX.Element => ( = defineMessages({ const buildMessage = ( intl: IntlShape, type: NotificationType, - account: Account, + account: AccountEntity, totalCount: number | null, targetName: string, instanceTitle: string, @@ -287,16 +287,16 @@ const Notification: React.FC = (props) => { case 'follow': case 'user_approved': return account && typeof account === 'object' ? ( -