Skip to content

Commit 65bfa8a

Browse files
authored
fix: custom emoji align vertically in message (#6738)
1 parent 5585f5d commit 65bfa8a

File tree

4 files changed

+1608
-1044
lines changed

4 files changed

+1608
-1044
lines changed

app/containers/Avatar/__snapshots__/Avatar.test.tsx.snap

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -608,40 +608,54 @@ exports[`Story Snapshots: Emoji should match snapshot 1`] = `
608608
}
609609
testID="avatar"
610610
>
611-
<ViewManagerAdapter_ExpoImage
612-
borderRadius={4}
613-
containerViewRef={"[React.ref]"}
614-
contentFit="contain"
615-
contentPosition={
616-
{
617-
"left": "50%",
618-
"top": "50%",
619-
}
620-
}
621-
height={56}
622-
nativeViewRef={"[React.ref]"}
623-
onError={[Function]}
624-
onLoad={[Function]}
625-
onLoadStart={[Function]}
626-
onProgress={[Function]}
627-
placeholder={[]}
628-
source={
611+
<View
612+
style={
629613
[
630614
{
631-
"uri": "https://open.rocket.chat/emoji-custom/troll.jpg",
615+
"transform": [
616+
{
617+
"translateY": 0,
618+
},
619+
],
632620
},
633621
]
634622
}
635-
style={
636-
{
637-
"borderRadius": 4,
638-
"height": 56,
639-
"width": 56,
623+
>
624+
<ViewManagerAdapter_ExpoImage
625+
borderRadius={4}
626+
containerViewRef={"[React.ref]"}
627+
contentFit="contain"
628+
contentPosition={
629+
{
630+
"left": "50%",
631+
"top": "50%",
632+
}
640633
}
641-
}
642-
transition={null}
643-
width={56}
644-
/>
634+
height={56}
635+
nativeViewRef={"[React.ref]"}
636+
onError={[Function]}
637+
onLoad={[Function]}
638+
onLoadStart={[Function]}
639+
onProgress={[Function]}
640+
placeholder={[]}
641+
source={
642+
[
643+
{
644+
"uri": "https://open.rocket.chat/emoji-custom/troll.jpg",
645+
},
646+
]
647+
}
648+
style={
649+
{
650+
"borderRadius": 4,
651+
"height": 56,
652+
"width": 56,
653+
}
654+
}
655+
transition={null}
656+
width={56}
657+
/>
658+
</View>
645659
</View>
646660
`;
647661

app/containers/markdown/__snapshots__/Markdown.test.tsx.snap

Lines changed: 160 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -709,38 +709,52 @@ exports[`Story Snapshots: Emoji should match snapshot 1`] = `
709709
>
710710
Custom emojis:
711711
</Text>
712-
<ViewManagerAdapter_ExpoImage
713-
containerViewRef={"[React.ref]"}
714-
contentFit="contain"
715-
contentPosition={
716-
{
717-
"left": "50%",
718-
"top": "50%",
719-
}
720-
}
721-
height={15}
722-
nativeViewRef={"[React.ref]"}
723-
onError={[Function]}
724-
onLoad={[Function]}
725-
onLoadStart={[Function]}
726-
onProgress={[Function]}
727-
placeholder={[]}
728-
source={
712+
<View
713+
style={
729714
[
730715
{
731-
"uri": "https://open.rocket.chat/emoji-custom/react_rocket.png",
716+
"transform": [
717+
{
718+
"translateY": 3,
719+
},
720+
],
732721
},
733722
]
734723
}
735-
style={
736-
{
737-
"height": 15,
738-
"width": 15,
724+
>
725+
<ViewManagerAdapter_ExpoImage
726+
containerViewRef={"[React.ref]"}
727+
contentFit="contain"
728+
contentPosition={
729+
{
730+
"left": "50%",
731+
"top": "50%",
732+
}
739733
}
740-
}
741-
transition={null}
742-
width={15}
743-
/>
734+
height={15}
735+
nativeViewRef={"[React.ref]"}
736+
onError={[Function]}
737+
onLoad={[Function]}
738+
onLoadStart={[Function]}
739+
onProgress={[Function]}
740+
placeholder={[]}
741+
source={
742+
[
743+
{
744+
"uri": "https://open.rocket.chat/emoji-custom/react_rocket.png",
745+
},
746+
]
747+
}
748+
style={
749+
{
750+
"height": 15,
751+
"width": 15,
752+
}
753+
}
754+
transition={null}
755+
width={15}
756+
/>
757+
</View>
744758
<Text
745759
accessibilityLabel=" "
746760
style={
@@ -758,38 +772,52 @@ exports[`Story Snapshots: Emoji should match snapshot 1`] = `
758772
>
759773
760774
</Text>
761-
<ViewManagerAdapter_ExpoImage
762-
containerViewRef={"[React.ref]"}
763-
contentFit="contain"
764-
contentPosition={
765-
{
766-
"left": "50%",
767-
"top": "50%",
768-
}
769-
}
770-
height={15}
771-
nativeViewRef={"[React.ref]"}
772-
onError={[Function]}
773-
onLoad={[Function]}
774-
onLoadStart={[Function]}
775-
onProgress={[Function]}
776-
placeholder={[]}
777-
source={
775+
<View
776+
style={
778777
[
779778
{
780-
"uri": "https://open.rocket.chat/emoji-custom/nyan_rocket.png",
779+
"transform": [
780+
{
781+
"translateY": 3,
782+
},
783+
],
781784
},
782785
]
783786
}
784-
style={
785-
{
786-
"height": 15,
787-
"width": 15,
787+
>
788+
<ViewManagerAdapter_ExpoImage
789+
containerViewRef={"[React.ref]"}
790+
contentFit="contain"
791+
contentPosition={
792+
{
793+
"left": "50%",
794+
"top": "50%",
795+
}
788796
}
789-
}
790-
transition={null}
791-
width={15}
792-
/>
797+
height={15}
798+
nativeViewRef={"[React.ref]"}
799+
onError={[Function]}
800+
onLoad={[Function]}
801+
onLoadStart={[Function]}
802+
onProgress={[Function]}
803+
placeholder={[]}
804+
source={
805+
[
806+
{
807+
"uri": "https://open.rocket.chat/emoji-custom/nyan_rocket.png",
808+
},
809+
]
810+
}
811+
style={
812+
{
813+
"height": 15,
814+
"width": 15,
815+
}
816+
}
817+
transition={null}
818+
width={15}
819+
/>
820+
</View>
793821
<Text
794822
accessibilityLabel=" "
795823
style={
@@ -807,38 +835,52 @@ exports[`Story Snapshots: Emoji should match snapshot 1`] = `
807835
>
808836
809837
</Text>
810-
<ViewManagerAdapter_ExpoImage
811-
containerViewRef={"[React.ref]"}
812-
contentFit="contain"
813-
contentPosition={
814-
{
815-
"left": "50%",
816-
"top": "50%",
817-
}
818-
}
819-
height={15}
820-
nativeViewRef={"[React.ref]"}
821-
onError={[Function]}
822-
onLoad={[Function]}
823-
onLoadStart={[Function]}
824-
onProgress={[Function]}
825-
placeholder={[]}
826-
source={
838+
<View
839+
style={
827840
[
828841
{
829-
"uri": "https://open.rocket.chat/emoji-custom/marioparty.gif",
842+
"transform": [
843+
{
844+
"translateY": 3,
845+
},
846+
],
830847
},
831848
]
832849
}
833-
style={
834-
{
835-
"height": 15,
836-
"width": 15,
850+
>
851+
<ViewManagerAdapter_ExpoImage
852+
containerViewRef={"[React.ref]"}
853+
contentFit="contain"
854+
contentPosition={
855+
{
856+
"left": "50%",
857+
"top": "50%",
858+
}
837859
}
838-
}
839-
transition={null}
840-
width={15}
841-
/>
860+
height={15}
861+
nativeViewRef={"[React.ref]"}
862+
onError={[Function]}
863+
onLoad={[Function]}
864+
onLoadStart={[Function]}
865+
onProgress={[Function]}
866+
placeholder={[]}
867+
source={
868+
[
869+
{
870+
"uri": "https://open.rocket.chat/emoji-custom/marioparty.gif",
871+
},
872+
]
873+
}
874+
style={
875+
{
876+
"height": 15,
877+
"width": 15,
878+
}
879+
}
880+
transition={null}
881+
width={15}
882+
/>
883+
</View>
842884
</Text>
843885
</Text>
844886
</View>
@@ -896,38 +938,52 @@ exports[`Story Snapshots: Emoji should match snapshot 1`] = `
896938
>
897939
👍
898940
</Text>
899-
<ViewManagerAdapter_ExpoImage
900-
containerViewRef={"[React.ref]"}
901-
contentFit="contain"
902-
contentPosition={
903-
{
904-
"left": "50%",
905-
"top": "50%",
906-
}
907-
}
908-
height={30}
909-
nativeViewRef={"[React.ref]"}
910-
onError={[Function]}
911-
onLoad={[Function]}
912-
onLoadStart={[Function]}
913-
onProgress={[Function]}
914-
placeholder={[]}
915-
source={
941+
<View
942+
style={
916943
[
917944
{
918-
"uri": "https://open.rocket.chat/emoji-custom/marioparty.gif",
945+
"transform": [
946+
{
947+
"translateY": 0,
948+
},
949+
],
919950
},
920951
]
921952
}
922-
style={
923-
{
924-
"height": 30,
925-
"width": 30,
953+
>
954+
<ViewManagerAdapter_ExpoImage
955+
containerViewRef={"[React.ref]"}
956+
contentFit="contain"
957+
contentPosition={
958+
{
959+
"left": "50%",
960+
"top": "50%",
961+
}
926962
}
927-
}
928-
transition={null}
929-
width={30}
930-
/>
963+
height={30}
964+
nativeViewRef={"[React.ref]"}
965+
onError={[Function]}
966+
onLoad={[Function]}
967+
onLoadStart={[Function]}
968+
onProgress={[Function]}
969+
placeholder={[]}
970+
source={
971+
[
972+
{
973+
"uri": "https://open.rocket.chat/emoji-custom/marioparty.gif",
974+
},
975+
]
976+
}
977+
style={
978+
{
979+
"height": 30,
980+
"width": 30,
981+
}
982+
}
983+
transition={null}
984+
width={30}
985+
/>
986+
</View>
931987
</View>
932988
</View>
933989
</View>

0 commit comments

Comments
 (0)