diff --git a/src/v4/social/components/Comment/Comment.tsx b/src/v4/social/components/Comment/Comment.tsx index deca3ba4..e046343e 100644 --- a/src/v4/social/components/Comment/Comment.tsx +++ b/src/v4/social/components/Comment/Comment.tsx @@ -239,7 +239,10 @@ export const Comment = ({ {isLiked ? 'Liked' : 'Like'} -
onClickReply(comment)}> +
onClickReply(comment)} + > Reply diff --git a/src/v4/social/components/CommentComposer/CommentComposer.tsx b/src/v4/social/components/CommentComposer/CommentComposer.tsx index 182d150c..15d06113 100644 --- a/src/v4/social/components/CommentComposer/CommentComposer.tsx +++ b/src/v4/social/components/CommentComposer/CommentComposer.tsx @@ -33,6 +33,7 @@ export type CreateCommentParams = { }; interface CommentComposerProps { + pageId?: string; referenceId: string; referenceType: Amity.CommentReferenceType; replyTo?: Amity.Comment; @@ -42,6 +43,7 @@ interface CommentComposerProps { } export const CommentComposer = ({ + pageId = '*', referenceId, referenceType, replyTo, @@ -55,6 +57,7 @@ export const CommentComposer = ({ const editorRef = useRef(null); const composerRef = useRef(null); const composerInputRef = useRef(null); + const componentId = 'comment_composer_bar'; const [composerHeight, setComposerHeight] = useState(0); const [mentionOffsetBottom, setMentionOffsetBottom] = useState(0); @@ -129,7 +132,12 @@ export const CommentComposer = ({
} />
-
+ +
diff --git a/src/v4/social/elements/EditPostButton/EditPostButton.tsx b/src/v4/social/elements/EditPostButton/EditPostButton.tsx index cc62b1f8..32e3ea05 100644 --- a/src/v4/social/elements/EditPostButton/EditPostButton.tsx +++ b/src/v4/social/elements/EditPostButton/EditPostButton.tsx @@ -10,7 +10,7 @@ type EditPostButtonProps = ButtonProps & { export function EditPostButton({ pageId = '*', componentId = '*', ...props }: EditPostButtonProps) { const elementId = 'edit_post_button'; - const { config, isExcluded, themeStyles } = useAmityElement({ + const { config, isExcluded, themeStyles, accessibilityId } = useAmityElement({ pageId, componentId, elementId, @@ -18,7 +18,12 @@ export function EditPostButton({ pageId = '*', componentId = '*', ...props }: Ed if (isExcluded) return null; return ( - ); diff --git a/src/v4/social/elements/PostTextField/PostTextField.tsx b/src/v4/social/elements/PostTextField/PostTextField.tsx index 9b1718a8..9ba25416 100644 --- a/src/v4/social/elements/PostTextField/PostTextField.tsx +++ b/src/v4/social/elements/PostTextField/PostTextField.tsx @@ -31,6 +31,8 @@ import useCommunity from '~/v4/core/hooks/collections/useCommunity'; import { MentionItem } from '~/v4/social/internal-components/Lexical/MentionItem'; interface PostTextFieldProps { + pageId?: string; + componentId?: string; communityId?: string | null; attachmentAmount?: number; mentionContainer: HTMLElement | null; @@ -131,8 +133,11 @@ export const PostTextField = ({ communityId, mentionContainer, dataValue, + pageId = '*', + componentId = '*', }: PostTextFieldProps) => { const [intersectionNode, setIntersectionNode] = useState(null); + const elementId = 'post_text_field'; const editorConfig = getEditorConfig({ namespace: 'PostTextField', @@ -168,7 +173,10 @@ export const PostTextField = ({ : {}), }} > -
+
} placeholder={
What’s going on...
} diff --git a/src/v4/social/elements/ShareStoryButton/ShareStoryButton.tsx b/src/v4/social/elements/ShareStoryButton/ShareStoryButton.tsx index c1741b27..66e4e7e2 100644 --- a/src/v4/social/elements/ShareStoryButton/ShareStoryButton.tsx +++ b/src/v4/social/elements/ShareStoryButton/ShareStoryButton.tsx @@ -38,7 +38,7 @@ export const ShareStoryButton = ({ onClick, }: ShareButtonProps) => { const elementId = 'share_story_button'; - const { config, isExcluded } = useAmityElement({ + const { config, isExcluded, accessibilityId } = useAmityElement({ pageId, componentId, elementId, @@ -50,7 +50,7 @@ export const ShareStoryButton = ({
void; type: 'image' | 'video'; + pageId?: string; + componentId?: string; }) => { const thumbnailUrl = useImage({ fileId: fieldId }); + const elementId = 'remove_thumbnail'; + if (!thumbnailUrl) return null; return ( <> thumbnail - {type === PostContentType.VIDEO && ( diff --git a/src/v4/social/internal-components/ImageThumbnail/ImageThumbnail.tsx b/src/v4/social/internal-components/ImageThumbnail/ImageThumbnail.tsx index 790e9e10..f053d399 100644 --- a/src/v4/social/internal-components/ImageThumbnail/ImageThumbnail.tsx +++ b/src/v4/social/internal-components/ImageThumbnail/ImageThumbnail.tsx @@ -6,6 +6,7 @@ import useFileUpload from '~/v4/social/hooks/useFileUpload'; import { FileRepository } from '@amityco/ts-sdk'; interface ImageThumbnailProps { + pageId?: string; files: File[]; uploadedFiles: Amity.File[]; onChange: (data: { uploaded: Array; uploading: Array }) => void; @@ -16,6 +17,7 @@ interface ImageThumbnailProps { } export function ImageThumbnail({ + pageId = '*', files, uploadedFiles, onChange, @@ -59,11 +61,16 @@ export function ImageThumbnail({ ) : ( <> {(file - diff --git a/src/v4/social/internal-components/Lexical/nodes/MentionNode.ts b/src/v4/social/internal-components/Lexical/nodes/MentionNode.ts index f4366ea5..dbf91919 100644 --- a/src/v4/social/internal-components/Lexical/nodes/MentionNode.ts +++ b/src/v4/social/internal-components/Lexical/nodes/MentionNode.ts @@ -89,6 +89,7 @@ export class MentionNode extends TextNode { createDOM(config: EditorConfig): HTMLElement { const dom = super.createDOM(config); dom.className = styles.mention; //create css + dom.setAttribute('data-qa-anchor', 'mention-preview'); return dom; } diff --git a/src/v4/social/internal-components/PostMenu/PostMenu.tsx b/src/v4/social/internal-components/PostMenu/PostMenu.tsx index 99862ac5..7ac2186a 100644 --- a/src/v4/social/internal-components/PostMenu/PostMenu.tsx +++ b/src/v4/social/internal-components/PostMenu/PostMenu.tsx @@ -183,6 +183,7 @@ export const PostMenu = ({ ) : null} {showEditPostButton ? ( ) : null} {showDeletePostButton ? ( -
) : ( <> - +
- {community ? : } + {community ? ( + + ) : ( + + )}
{renderTabContent()}
diff --git a/src/v4/social/pages/PostDetailPage/PostDetailPage.tsx b/src/v4/social/pages/PostDetailPage/PostDetailPage.tsx index 0af61570..ec9795cb 100644 --- a/src/v4/social/pages/PostDetailPage/PostDetailPage.tsx +++ b/src/v4/social/pages/PostDetailPage/PostDetailPage.tsx @@ -60,6 +60,7 @@ export function PostDetailPage({ id, hideTarget, category }: PostDetailPageProps
{post && ( setReplyComment(comment)} @@ -97,6 +98,7 @@ export function PostDetailPage({ id, hideTarget, category }: PostDetailPageProps ) : ( post && ( 0 && ( {