EmbeddedChat
EmbeddedChat copied to clipboard
fix: Improve GIF handling and display consistency in chat messages
This PR addresses issues with GIF rendering and display consistency in chat messages.
1.Enhanced GIF detection 2.Implemented consistent sizing 3.Fixed animation handling 4.Improved URL handling
Acceptance Criteria fulfillment
- [x] GIFs display consistently at 200x200px
- [x] GIF animations play correctly
- [x] Both uploaded and external GIFs work
- [x] Error handling works for invalid GIF URLs
Fixes #982
Before
After
PR Test Details
Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-<pr_number> after approval. Contributors are requested to replace <pr_number> with the actual PR number.
@Spiral-Memory I have made all the required changes and tested it. You can see in my latest commit.
Sorry removing it asap!
N make sure you format your code with prettier extension otherwise format check workflow will fail
Removed all console logs and fixed the formatting of the files.
Hey @Spiral-Memory! I have made the required changes. You can merge this PR.
@SinghaAnirban005
Once this PR is deployed, Can you check this feature with locally deployed Rocket.Chat server but with cloud deployed frontend if it is working correctly
Since I can't check images etc with the deployed one, please check that
Sure @Spiral-Memory
https://github.com/user-attachments/assets/39218158-01e5-49bc-aab2-cfd389d2e736
@Spiral-Memory Tested with different GIF's but GIF's did not render while testing with my local server
@KrishnaShuk Did you not get a 403 status response while GIF's were rendering ? If yes how did you tackle it ? Since on testing i got this status code
Thanks for the testing @SinghaAnirban005
@KrishnaShuk please look into it
Hey @SinghaAnirban005 , I am able to send the gif with my local server. Could be some other issue.I think there is no problem with the code. Here is the video proof :- Screencast from 2025-03-30 19-35-48.webm
@KrishnaShuk Just out of curiosity Did you use the cloud deployed fronted ? Also which browser did you use ?
The frontend is locally hosted and i am using chrome.
https://rocketchat.github.io/EmbeddedChat/pulls/pr-984/?path=/story/embeddedchat-simple--simple
Try the same with this cloud deployed url and then let me know Thank You !
Ok i see the issue. I am working on it.