Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(message-menu): remove reply to media restriction to wire up and enable reply to images #2014

Merged
merged 19 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
88c71cb
feat(reply-card): render media if media is present in parent message
domw30 Jun 11, 2024
ed51323
feat: add media prop to parent message type
domw30 Jun 11, 2024
73006ac
feat: add media url and media name attributes to reply card in messag…
domw30 Jun 11, 2024
3aaeada
refactor: render media when message is not present
domw30 Jun 11, 2024
ce71b99
refactor: optional message args
domw30 Jun 11, 2024
b1d204d
refactor: add test coverage for optional message
domw30 Jun 11, 2024
a118a88
refactor: amend test date
domw30 Jun 11, 2024
76e466a
feat: pass media into reply
domw30 Jun 11, 2024
29ed766
refactor(reply-card-spec): improve test coverage and test quality for…
domw30 Jun 13, 2024
543057f
feat(message-input-reply-card): redesign component
domw30 Jun 13, 2024
8c950a2
feat(messges-parent-message): add and handle media replies and redesi…
domw30 Jun 13, 2024
436592c
refactor: remove unused css
domw30 Jun 13, 2024
3a20f5c
feat(messages): handle logic and set min-width for messages that are …
domw30 Jun 13, 2024
3fd959b
feat(parent-message-media): fetch parent messages and combine media /…
domw30 Jun 13, 2024
d0d281d
refactor: wip - use root message id to get parent message media
domw30 Jun 13, 2024
1f92ebe
refactor: ensure media data is preserved in the sent message
domw30 Jun 13, 2024
2ba2041
feat: add prop to map message
domw30 Jun 13, 2024
7c7bc8c
feat(message-menu): remove reply to media restriction to wire up and …
domw30 Jun 14, 2024
30800da
Merge branch 'main' into feat/enable-replies-to-images-menu-item
domw30 Jun 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/platform-apps/channels/messages-menu/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ describe('Message Menu', () => {
canDelete: false,
canReply: false,
canViewInfo: false,
isMediaMessage: false,
isMenuOpen: false,
onDelete: undefined,
onEdit: undefined,
Expand Down Expand Up @@ -89,7 +88,7 @@ describe('Message Menu', () => {
});

describe('Reply Button', () => {
it('should render when canReply is true and isMediaMessage is false', () => {
it('should render when canReply is true', () => {
const onReply = jest.fn();
const wrapper = subject({ canReply: true, onReply }) as ShallowWrapper;

Expand Down
3 changes: 1 addition & 2 deletions src/platform-apps/channels/messages-menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export interface Properties {
canDelete: boolean;
canReply?: boolean;
canViewInfo?: boolean;
isMediaMessage?: boolean;
isMenuOpen?: boolean;
isMenuFlying?: boolean;

Expand Down Expand Up @@ -57,7 +56,7 @@ export class MessageMenu extends React.Component<Properties> {
onSelect: this.onEdit,
});
}
if (this.props.onReply && this.props.canReply && !this.props.isMediaMessage) {
if (this.props.onReply && this.props.canReply) {
menuItems.push({
id: 'reply',
label: this.renderMenuOption(<IconFlipBackward size={20} />, 'Reply'),
Expand Down