diff --git a/CHANGELOG.md b/CHANGELOG.md index f511a0982..226a14dec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Status Info: moved context (repost, pinned) to improve UX. - Posts: remove file icon from empty link previews. - Settings: moved "Import data" under settings. +- Composer: add more descriptive discard confirmation message. ### Fixed - Layout: use accent color for "floating action button" (mobile compose button). @@ -42,12 +43,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Posts: fix monospace font in Markdown code blocks. - Modals: fix action buttons overflow - Editing: don't insert edited posts to the top of the feed. +- Editing: don't display edited posts as pending posts. - Modals: close modal when navigating to a different page. - Modals: fix "View context" button in media modal. - Posts: let unauthenticated users to translate posts if allowed by backend. - Chats: fix jumpy scrollbar. - Composer: fix alignment of icon in submit button. - Login: add a border around QR codes. +- Composer: don't display action button in reply indicator ## [3.0.0] - 2022-12-25 diff --git a/app/soapbox/components/modal-root.tsx b/app/soapbox/components/modal-root.tsx index b0bbc9c59..6681072cd 100644 --- a/app/soapbox/components/modal-root.tsx +++ b/app/soapbox/components/modal-root.tsx @@ -16,7 +16,7 @@ import type { ReducerCompose } from 'soapbox/reducers/compose'; import type { ReducerRecord as ReducerComposeEvent } from 'soapbox/reducers/compose-event'; const messages = defineMessages({ - confirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' }, + confirm: { id: 'confirmations.cancel.confirm', defaultMessage: 'Discard' }, cancelEditing: { id: 'confirmations.cancel_editing.confirm', defaultMessage: 'Cancel editing' }, }); @@ -80,10 +80,10 @@ const ModalRoot: React.FC = ({ children, onCancel, onClose, type }) icon: require('@tabler/icons/trash.svg'), heading: isEditing ? - : , + : , message: isEditing ? - : , + : , confirm: intl.formatMessage(messages.confirm), onConfirm: () => { dispatch(closeModal('COMPOSE')); diff --git a/app/soapbox/features/compose/components/reply-indicator.tsx b/app/soapbox/features/compose/components/reply-indicator.tsx index 4ecc37816..86fd3a376 100644 --- a/app/soapbox/features/compose/components/reply-indicator.tsx +++ b/app/soapbox/features/compose/components/reply-indicator.tsx @@ -40,6 +40,7 @@ const ReplyIndicator: React.FC = ({ status, hideActions, onCanc timestamp={status.created_at} showProfileHoverCard={false} withLinkToProfile={false} + hideActions={hideActions} /> = ({ onClose }) => { icon: require('@tabler/icons/trash.svg'), heading: statusId ? - : , + : , message: statusId ? - : , + : , confirm: intl.formatMessage(statusId ? messages.cancelEditing : messages.confirm), onConfirm: () => { dispatch(closeModal('COMPOSE')); diff --git a/app/soapbox/reducers/pending-statuses.ts b/app/soapbox/reducers/pending-statuses.ts index e0df9f07d..51c4c1aba 100644 --- a/app/soapbox/reducers/pending-statuses.ts +++ b/app/soapbox/reducers/pending-statuses.ts @@ -35,7 +35,7 @@ const deleteStatus = (state: State, idempotencyKey: string) => state.delete(idem export default function pending_statuses(state = initialState, action: AnyAction) { switch (action.type) { case STATUS_CREATE_REQUEST: - return importStatus(state, ImmutableMap(fromJS(action.params)), action.idempotencyKey); + return action.editing ? state : importStatus(state, ImmutableMap(fromJS(action.params)), action.idempotencyKey); case STATUS_CREATE_SUCCESS: return deleteStatus(state, action.idempotencyKey); default: