diff --git a/src/components/new-status-list.tsx b/src/components/pure-status-list.tsx similarity index 95% rename from src/components/new-status-list.tsx rename to src/components/pure-status-list.tsx index 675d2486b..4440506b1 100644 --- a/src/components/new-status-list.tsx +++ b/src/components/pure-status-list.tsx @@ -3,7 +3,7 @@ import { useRef } from 'react'; import { VirtuosoHandle } from 'react-virtuoso'; import LoadGap from 'soapbox/components/load-gap.tsx'; -import NewStatus from 'soapbox/components/new-status.tsx'; +import PureStatus from 'soapbox/components/pure-status.tsx'; import ScrollableList, { IScrollableList } from 'soapbox/components/scrollable-list.tsx'; import StatusContainer from 'soapbox/containers/status-container.tsx'; import { EntityTypes, Entities } from 'soapbox/entity-store/entities.ts'; @@ -12,7 +12,7 @@ import PendingStatus from 'soapbox/features/ui/components/pending-status.tsx'; import { useSoapboxConfig } from 'soapbox/hooks/useSoapboxConfig.ts'; -interface INewStatusList extends Omit{ +interface IPureStatusList extends Omit{ /** List of statuses to display. */ statuses: readonly EntityTypes[Entities.STATUSES][]|null; /** Pinned statuses to show at the top of the feed. */ @@ -26,7 +26,10 @@ interface INewStatusList extends Omit = ({ +/** + * Feed of statuses, built atop ScrollableList. + */ +const PureStatusList: React.FC = ({ statuses, featuredStatusIds, isLoading, @@ -85,7 +88,7 @@ const NewStatusList: React.FC = ({ const renderStatus = (status: EntityTypes[Entities.STATUSES]) => { return ( - = ({ ); }; -export default NewStatusList; \ No newline at end of file +export default PureStatusList; \ No newline at end of file diff --git a/src/components/new-status.tsx b/src/components/pure-status.tsx similarity index 98% rename from src/components/new-status.tsx rename to src/components/pure-status.tsx index 855c51606..a01fe27d3 100644 --- a/src/components/new-status.tsx +++ b/src/components/pure-status.tsx @@ -44,7 +44,7 @@ const messages = defineMessages({ reblogged_by: { id: 'status.reblogged_by', defaultMessage: '{name} reposted' }, }); -export interface INewStatus { +export interface IPureStatus { id?: string; avatarSize?: number; status: EntityTypes[Entities.STATUSES]; @@ -63,7 +63,10 @@ export interface INewStatus { accountAction?: React.ReactElement; } -const NewStatus: React.FC = (props) => { +/** + * Status accepting the full status entity in pure format. + */ +const PureStatus: React.FC = (props) => { const { status, accountAction, @@ -496,4 +499,4 @@ const NewStatus: React.FC = (props) => { ); }; -export default NewStatus; \ No newline at end of file +export default PureStatus; \ No newline at end of file diff --git a/src/components/status-list.tsx b/src/components/status-list.tsx index 44905c568..1d7274f8d 100644 --- a/src/components/status-list.tsx +++ b/src/components/status-list.tsx @@ -44,7 +44,10 @@ interface IStatusList extends Omit { showGroup?: boolean; } -/** Feed of statuses, built atop ScrollableList. */ +/** + * Legacy Feed of statuses, built atop ScrollableList. + * @deprecated Use the PureStatusList component. + */ const StatusList: React.FC = ({ statusIds, lastStatusId, diff --git a/src/components/status.tsx b/src/components/status.tsx index 2995d8c5d..dc36ae974 100644 --- a/src/components/status.tsx +++ b/src/components/status.tsx @@ -60,6 +60,10 @@ export interface IStatus { accountAction?: React.ReactElement; } +/** + * Legacy Status accepting a the full entity in immutable. + * @deprecated Use the PureStatus component. + */ const Status: React.FC = (props) => { const { status, diff --git a/src/features/bookmarks/index.tsx b/src/features/bookmarks/index.tsx index 547c1f5e6..2cb4d7c71 100644 --- a/src/features/bookmarks/index.tsx +++ b/src/features/bookmarks/index.tsx @@ -4,8 +4,8 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { fetchBookmarkedStatuses, expandBookmarkedStatuses } from 'soapbox/actions/bookmarks.ts'; import { useBookmarks } from 'soapbox/api/hooks/index.ts'; -import NewStatusList from 'soapbox/components/new-status-list.tsx'; import PullToRefresh from 'soapbox/components/pull-to-refresh.tsx'; +import PureStatusList from 'soapbox/components/pure-status-list.tsx'; import { Column } from 'soapbox/components/ui/column.tsx'; import { useAppDispatch } from 'soapbox/hooks/useAppDispatch.ts'; import { useAppSelector } from 'soapbox/hooks/useAppSelector.ts'; @@ -51,7 +51,7 @@ const Bookmarks: React.FC = ({ params }) => { return ( -