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: Added 'Collapse & Uncollapse' Functionality for Audio, Video Messages & Image attachment #772

Conversation

dhairyashiil
Copy link
Contributor

Brief Title

Feat: Added 'Collapse & Uncollapse' Functionality for Audio and Video Messages

Acceptance Criteria fulfillment

  • Added a button for expanding and collapsing audio and video file previews in both AudioAttachment and VideoAttachment components.
  • The button toggles between an "expand" and "collapse" icon based on the current state.
  • Ensured that when clicked, the corresponding media element is either collapsed or expanded.
  • Placed the button on the right side of the filename within the AttachmentMetadata component.
  • The default state is expanded, as required.

Fixes #771

Video/Screenshots:

Collapse.Uncollapse.Functionality.for.audio.and.video.messages.mp4

PR Test Details

Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-772 after approval. Contributors are requested to replace <pr_number> with the actual PR number.

@abirc8010
Copy link
Contributor

Hey @dhairyashiil I believe this will be a nice addition.
I think you can also work on making the image attachment collapsable as in RC

@dhairyashiil
Copy link
Contributor Author

Hello @abirc8010,
Thank you for the kind words! I also agree this will be a nice addition.

I’ve just added the collapsible image attachment feature as you suggested. Appreciate your input, your suggestions have always been really helpful!

😃👍

@dhairyashiil dhairyashiil changed the title Feat: Added 'Collapse & Uncollapse' Functionality for Audio and Video Messages Feat: Added 'Collapse & Uncollapse' Functionality for Audio, Video Messages & Image attachment Jan 4, 2025
@dhairyashiil
Copy link
Contributor Author

For the Image attachment refer the video:

Collapse.Uncollapse.Image.Attachment.mp4

Copy link
Collaborator

@Spiral-Memory Spiral-Memory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good addition @dhairyashiil

@Spiral-Memory Spiral-Memory merged commit 9352c03 into RocketChat:develop Jan 5, 2025
4 checks passed
github-actions bot added a commit that referenced this pull request Jan 5, 2025
@Spiral-Memory Spiral-Memory added the enhancement New feature or request label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: Add 'Collapse & Uncollapse' Functionality for Audio, Video Messages & Image attachment
3 participants