diff --git a/app/javascript/flavours/glitch/components/character_counter/styles.module.scss b/app/javascript/flavours/glitch/components/character_counter/styles.module.scss index 05c9446545..ae77be1554 100644 --- a/app/javascript/flavours/glitch/components/character_counter/styles.module.scss +++ b/app/javascript/flavours/glitch/components/character_counter/styles.module.scss @@ -1,4 +1,5 @@ .counter { + display: block; margin-top: 4px; font-size: 13px; } diff --git a/app/javascript/flavours/glitch/components/status_quoted.tsx b/app/javascript/flavours/glitch/components/status_quoted.tsx index a174340457..916d93b726 100644 --- a/app/javascript/flavours/glitch/components/status_quoted.tsx +++ b/app/javascript/flavours/glitch/components/status_quoted.tsx @@ -1,4 +1,5 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import type { ComponentType, ReactNode } from 'react'; import { defineMessage, FormattedMessage, useIntl } from 'react-intl'; @@ -143,6 +144,21 @@ const FilteredQuote: React.FC<{ ); }; +// Adds a wrapper around StatusContainer as the types aren't inheriting correctly with Redux + React 19. +// TODO: Remove this after the Status component is in TS. +interface StatusContainerForQuotesProps { + id?: string | null; + contextType?: string; + isQuotedPost?: boolean; + avatarSize?: number; + headerRenderFn?: StatusHeaderRenderFn; + children?: ReactNode; + [key: string]: unknown; +} + +const StatusContainerWithChildren = + StatusContainer as unknown as ComponentType; + interface QuotedStatusProps { quote: QuoteMap; contextType?: string; @@ -339,7 +355,7 @@ export const QuotedStatus: React.FC = ({ return (
- = ({ nestingLevel={nestingLevel + 1} /> )} - +
); }; @@ -384,17 +400,15 @@ export const StatusQuoteManager = (props: StatusQuoteManagerProps) => { if (quote) { return ( - /* @ts-expect-error Status is not yet typed */ - + - + ); } - /* @ts-expect-error Status is not yet typed */ - return ; + return ; }; diff --git a/app/javascript/flavours/glitch/features/report/category.jsx b/app/javascript/flavours/glitch/features/report/category.jsx index a0ec40794f..688302c6dd 100644 --- a/app/javascript/flavours/glitch/features/report/category.jsx +++ b/app/javascript/flavours/glitch/features/report/category.jsx @@ -20,8 +20,9 @@ const messages = defineMessages({ violation_description: { id: 'report.reasons.violation_description', defaultMessage: 'You are aware that it breaks specific rules' }, other: { id: 'report.reasons.other', defaultMessage: 'It\'s something else' }, other_description: { id: 'report.reasons.other_description', defaultMessage: 'The issue does not fit into other categories' }, - status: { id: 'report.category.title_status', defaultMessage: 'post' }, - account: { id: 'report.category.title_account', defaultMessage: 'profile' }, + status: { id: 'report.category.title_status', defaultMessage: "Tell us what's going on with this post" }, + account: { id: 'report.category.title_account', defaultMessage: "Tell us what's going on with this profile" }, + collection: { id: 'report.category.title_collection', defaultMessage: "Tell us what's going on with this collection"} }); const mapStateToProps = state => ({ @@ -82,14 +83,7 @@ class Category extends PureComponent { return ( <> - {startedFrom === 'collection' ? ( - - ) : ( - - )} + {intl.formatMessage(messages[startedFrom])}

diff --git a/app/javascript/flavours/glitch/utils/react_router.tsx b/app/javascript/flavours/glitch/utils/react_router.tsx index 0682fee554..6fe43c81f0 100644 --- a/app/javascript/flavours/glitch/utils/react_router.tsx +++ b/app/javascript/flavours/glitch/utils/react_router.tsx @@ -18,7 +18,7 @@ export const WithOptionalRouterPropTypes = { export interface OptionalRouterProps { ref: unknown; - wrappedComponentRef: unknown; + wrappedComponentRef?: string | ((...args: unknown[]) => unknown) | object; } // This is copied from https://github.com/remix-run/react-router/blob/v5.3.4/packages/react-router/modules/withRouter.js @@ -54,14 +54,6 @@ export function withOptionalRouter< C.displayName = displayName; C.WrappedComponent = Component; - C.propTypes = { - ...Component.propTypes, - wrappedComponentRef: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.func, - PropTypes.object, - ]), - }; return hoistStatics(C, Component); } diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.jsx.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.jsx.snap index 1b6647f91f..192aaa4de5 100644 --- a/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.jsx.snap +++ b/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.jsx.snap @@ -2,20 +2,11 @@ exports[` > Autoplay > renders a animated avatar 1`] = ` @@ -23,20 +14,11 @@ exports[` > Autoplay > renders a animated avatar 1`] = ` exports[` > Still > renders a still avatar 1`] = ` diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/avatar_overlay-test.jsx.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/avatar_overlay-test.jsx.snap index de4ccd6594..1d4d8145da 100644 --- a/app/javascript/mastodon/components/__tests__/__snapshots__/avatar_overlay-test.jsx.snap +++ b/app/javascript/mastodon/components/__tests__/__snapshots__/avatar_overlay-test.jsx.snap @@ -2,50 +2,31 @@ exports[` renders a overlay avatar 1`] = `