Open paulchen opened 1 year ago
Hi @paulchen! Thanks for your input.
I have tested this in 5.2.0-rc1 and it was not resized to 2.75rem x 2.75rem. Can you confirm this?
Renaming the name or alias required to upload an image again, and after uploading, it was indeed broken. So it was needed to remove the emoji and add it again.
I think this could be fixed by adding the attributes height and width to the span element of the emoji (this is how i created the screenshot in the section "Actual behaviour" above). During upload of a custom emoji, Rocket.Chat could save height and width of the emoji and retrieve these values when displaying it.
This is indeed a nice suggestion.
Hi @dudanogueira! Thanks for for reply.
I have tested this in 5.2.0-rc1 and it was not resized to 2.75rem x 2.75rem. Can you confirm this?
I just fired up version 5.2.0-rc.1
from Docker Hub. I experienced the same behaviour as described above.
I uploaded this GIF as a custom emoji named "mb2": https://chat-dev.rueckgr.at/emoji-custom/mb2.gif
It is still resized to 2.75rem x 2.75rem. In the DevTools I can clearly see why this happens:
And because this style gets applied to all custom emojis, every custom emoji has the size of 2.75rem x 2.75rem.
Oh, I am sorry. You are right! It's still an issue.
Is anyone solving this issue? If not, @dudanogueira would you kindly assign this to me?
Hi there, thanks for raising the issue! 🚀 💯
Sorry, but GitHub is only for issues/bugs, this is a improvement of the current solution, I'll transfer this to feature-request repository.
Questions? Help needed? Feature Requests?
Hello! Any luck?
+1
+1
+1
Description:
All custom emojis have a fixed width of 2.75rem and a fixed height of 2.75rem which is set via CSS.
Steps to reproduce:
Expected behavior:
The custom emoji is not resized:
Actual behavior:
The custom emoji is resized to 2.75rem x 2.75rem:
Server Setup Information:
Client Setup Information
Additional context
This problem was already reported in https://github.com/RocketChat/Rocket.Chat/issues/26547, but in my case I cannot use the solution mentioned there as my custom emojis have different sizes. Of course, I could make use of the fact that every custom emoji comes with its own CSS class and create a separate CSS definition for each emoji, but in my opinion this is a quite dirty solution.
I think this could be fixed by adding the attributes
height
andwidth
to thespan
element of the emoji (this is how i created the screenshot in the section "Actual behaviour" above). During upload of a custom emoji, Rocket.Chat could save height and width of the emoji and retrieve these values when displaying it.