Minor composer improvements
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
9712962240
commit
4ec90c031e
|
@ -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.
|
- Status Info: moved context (repost, pinned) to improve UX.
|
||||||
- Posts: remove file icon from empty link previews.
|
- Posts: remove file icon from empty link previews.
|
||||||
- Settings: moved "Import data" under settings.
|
- Settings: moved "Import data" under settings.
|
||||||
|
- Composer: add more descriptive discard confirmation message.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Layout: use accent color for "floating action button" (mobile compose button).
|
- 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.
|
- Posts: fix monospace font in Markdown code blocks.
|
||||||
- Modals: fix action buttons overflow
|
- Modals: fix action buttons overflow
|
||||||
- Editing: don't insert edited posts to the top of the feed.
|
- 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: close modal when navigating to a different page.
|
||||||
- Modals: fix "View context" button in media modal.
|
- Modals: fix "View context" button in media modal.
|
||||||
- Posts: let unauthenticated users to translate posts if allowed by backend.
|
- Posts: let unauthenticated users to translate posts if allowed by backend.
|
||||||
- Chats: fix jumpy scrollbar.
|
- Chats: fix jumpy scrollbar.
|
||||||
- Composer: fix alignment of icon in submit button.
|
- Composer: fix alignment of icon in submit button.
|
||||||
- Login: add a border around QR codes.
|
- Login: add a border around QR codes.
|
||||||
|
- Composer: don't display action button in reply indicator
|
||||||
|
|
||||||
## [3.0.0] - 2022-12-25
|
## [3.0.0] - 2022-12-25
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ import type { ReducerCompose } from 'soapbox/reducers/compose';
|
||||||
import type { ReducerRecord as ReducerComposeEvent } from 'soapbox/reducers/compose-event';
|
import type { ReducerRecord as ReducerComposeEvent } from 'soapbox/reducers/compose-event';
|
||||||
|
|
||||||
const messages = defineMessages({
|
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' },
|
cancelEditing: { id: 'confirmations.cancel_editing.confirm', defaultMessage: 'Cancel editing' },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -80,10 +80,10 @@ const ModalRoot: React.FC<IModalRoot> = ({ children, onCancel, onClose, type })
|
||||||
icon: require('@tabler/icons/trash.svg'),
|
icon: require('@tabler/icons/trash.svg'),
|
||||||
heading: isEditing
|
heading: isEditing
|
||||||
? <FormattedMessage id='confirmations.cancel_editing.heading' defaultMessage='Cancel post editing' />
|
? <FormattedMessage id='confirmations.cancel_editing.heading' defaultMessage='Cancel post editing' />
|
||||||
: <FormattedMessage id='confirmations.delete.heading' defaultMessage='Delete post' />,
|
: <FormattedMessage id='confirmations.cancel.heading' defaultMessage='Discard post' />,
|
||||||
message: isEditing
|
message: isEditing
|
||||||
? <FormattedMessage id='confirmations.cancel_editing.message' defaultMessage='Are you sure you want to cancel editing this post? All changes will be lost.' />
|
? <FormattedMessage id='confirmations.cancel_editing.message' defaultMessage='Are you sure you want to cancel editing this post? All changes will be lost.' />
|
||||||
: <FormattedMessage id='confirmations.delete.message' defaultMessage='Are you sure you want to delete this post?' />,
|
: <FormattedMessage id='confirmations.cancel.message' defaultMessage='Are you sure you want to cancel creating this post?' />,
|
||||||
confirm: intl.formatMessage(messages.confirm),
|
confirm: intl.formatMessage(messages.confirm),
|
||||||
onConfirm: () => {
|
onConfirm: () => {
|
||||||
dispatch(closeModal('COMPOSE'));
|
dispatch(closeModal('COMPOSE'));
|
||||||
|
|
|
@ -40,6 +40,7 @@ const ReplyIndicator: React.FC<IReplyIndicator> = ({ status, hideActions, onCanc
|
||||||
timestamp={status.created_at}
|
timestamp={status.created_at}
|
||||||
showProfileHoverCard={false}
|
showProfileHoverCard={false}
|
||||||
withLinkToProfile={false}
|
withLinkToProfile={false}
|
||||||
|
hideActions={hideActions}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Text
|
<Text
|
||||||
|
|
|
@ -11,7 +11,7 @@ import ComposeForm from '../../../compose/components/compose-form';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
close: { id: 'lightbox.close', defaultMessage: 'Close' },
|
close: { id: 'lightbox.close', defaultMessage: 'Close' },
|
||||||
confirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
|
confirm: { id: 'confirmations.cancel.confirm', defaultMessage: 'Discard' },
|
||||||
cancelEditing: { id: 'confirmations.cancel_editing.confirm', defaultMessage: 'Cancel editing' },
|
cancelEditing: { id: 'confirmations.cancel_editing.confirm', defaultMessage: 'Cancel editing' },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -33,10 +33,10 @@ const ComposeModal: React.FC<IComposeModal> = ({ onClose }) => {
|
||||||
icon: require('@tabler/icons/trash.svg'),
|
icon: require('@tabler/icons/trash.svg'),
|
||||||
heading: statusId
|
heading: statusId
|
||||||
? <FormattedMessage id='confirmations.cancel_editing.heading' defaultMessage='Cancel post editing' />
|
? <FormattedMessage id='confirmations.cancel_editing.heading' defaultMessage='Cancel post editing' />
|
||||||
: <FormattedMessage id='confirmations.delete.heading' defaultMessage='Delete post' />,
|
: <FormattedMessage id='confirmations.cancel.heading' defaultMessage='Discard post' />,
|
||||||
message: statusId
|
message: statusId
|
||||||
? <FormattedMessage id='confirmations.cancel_editing.message' defaultMessage='Are you sure you want to cancel editing this post? All changes will be lost.' />
|
? <FormattedMessage id='confirmations.cancel_editing.message' defaultMessage='Are you sure you want to cancel editing this post? All changes will be lost.' />
|
||||||
: <FormattedMessage id='confirmations.delete.message' defaultMessage='Are you sure you want to delete this post?' />,
|
: <FormattedMessage id='confirmations.cancel.message' defaultMessage='Are you sure you want to cancel creating this post?' />,
|
||||||
confirm: intl.formatMessage(statusId ? messages.cancelEditing : messages.confirm),
|
confirm: intl.formatMessage(statusId ? messages.cancelEditing : messages.confirm),
|
||||||
onConfirm: () => {
|
onConfirm: () => {
|
||||||
dispatch(closeModal('COMPOSE'));
|
dispatch(closeModal('COMPOSE'));
|
||||||
|
|
|
@ -35,7 +35,7 @@ const deleteStatus = (state: State, idempotencyKey: string) => state.delete(idem
|
||||||
export default function pending_statuses(state = initialState, action: AnyAction) {
|
export default function pending_statuses(state = initialState, action: AnyAction) {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case STATUS_CREATE_REQUEST:
|
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:
|
case STATUS_CREATE_SUCCESS:
|
||||||
return deleteStatus(state, action.idempotencyKey);
|
return deleteStatus(state, action.idempotencyKey);
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue