-
Notifications
You must be signed in to change notification settings - Fork 986
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
[#17207] fix: incorrect mentions alignment in messages #17212
Conversation
Jenkins BuildsClick to see older builds (15)
|
bcb6db3
to
bed5aea
Compare
:size :paragraph-1} | ||
(rf/sub [:messages/resolve-mention literal])]]]) | ||
[rn/touchable-opacity | ||
{:active-opacity 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:active-opacity is redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was set this way in the past, and I believe the reason is that we don't require an opacity effect when a user clicks on a mention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OmarBasem can you remember any reason for set active-opacity or i can remove it? i believe it was part of this PR #15799
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:active-opacity 1
is not redundant as the default active-opacity
is 0.5. However, we are moving away from touchable-opacity
, so you can replace it with rn/pressable
and remove active-opacity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
77% of end-end tests have passed
Failed tests (10)Click to expandClass TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityMultipleDevicePRTwo:
Class TestCommunityMultipleDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestCommunityMultipleDeviceMergedTwo:
Passed tests (33)Click to expandClass TestActivityCenterContactRequestMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityMultipleDevicePRTwo:
Class TestCommunityMultipleDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestActivityMultipleDevicePR:
|
bed5aea
to
405ec1e
Compare
@mohsen-ghafouri thanx for the PR! Alignment is much better now. Though I still facing alignment issues which are more visible on IOS in my case. IOS 16.6, iPhone X:![]() Android 12, Samsung Galaxy A52:![]() |
@Francesca-G Thank you in advance! |
thanks @pavloburykh, as i said it involves trial and error to adjust the position, let me do another round with iPhone X |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't experienced huge differences between this PR and nightly @churik but if the fixes made are to prevent misalignment that may occur with different names and mentions I think we should stick to it.
Even if I didn't have any incorrect alignment, the main issue (present in both) is the spacing between the two mentions when they're in the same 2-line text
![Screenshot 2023-09-07 alle 16 28 42](https://private-user-images.githubusercontent.com/122543089/266349387-a5f62d30-6bec-4fcb-a4c1-c68dd0b98797.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjI3NDIsIm5iZiI6MTczOTM2MjQ0MiwicGF0aCI6Ii8xMjI1NDMwODkvMjY2MzQ5Mzg3LWE1ZjYyZDMwLTZiZWMtNGZjYi1hNGMxLWM2OGRkMGI5ODc5Ny5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxMjE0MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00ZTUwNGFjN2MyMTMzZWVlMDJiMzlkNTE2YjYyNDQyZjY4NTNiYTU2NDA2NTlhOGNkZTQ0ODM2Y2VkYThiYzcwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.XNSa7pK-khavBowadOnqFmuvFbxDFYJzLJ-uX_0-gO4)
Thanx @mohsen-ghafouri! We decided that we are ready to merge current PR as it is, as we need it ASAP for the branch cut. Let's handle these issues in a separate PR. I will create followup once this PR is merged. |
@pavloburykh just a few minutes i will push a new update and you can test it for the last time :) |
405ec1e
to
4ea37ca
Compare
@pavloburykh done, please check again. |
@Francesca-G I believe the issue on Android related to the space between mention tags should be improved by the latest changes. Please check my screenshot. |
@mohsen-ghafouri thank you! Looks much more better now. Couple of issues will be logged as followup:
Let's merge this PR. Nice work! |
63% of end-end tests have passed
Failed tests (16)Click to expandClass TestCommunityMultipleDeviceMergedTwo:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityMultipleDevicePRTwo:
Passed tests (27)Click to expandClass TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
Class TestActivityMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityMultipleDevicePRTwo:
|
4ea37ca
to
90faafd
Compare
90faafd
to
1439590
Compare
fixes #17207
I've noticed some issues related to the mention tag, and I'd like to provide a technical explanation that we can refer to in case we encounter similar problems in the future.
Issues:
The mention tag faces certain limitations because we're rendering a view inside a text component. Essentially, it's affected by an open issue in React Native regarding vertical alignment (Nested View and Text vertical alignment issue).
The workaround we currently employ involves trial and error to adjust the position of the mention tag so that it aligns with the text. Please note that this alignment may not be consistent across all OS versions and platforms.
Additionally, I explored an alternative solution that involves using just a text component instead of a view. However, this approach also has its limitations, particularly related to styles. For instance, nested text components don't accept properties like border radius or padding, although alignment works correctly.
So what I've done here is applied some additional improvements until the React Native team addresses the issue, or until we discover an alternative workaround or a different design approach that's implementable.
cc @pavloburykh @cammellos
Android Before -> After
iOS Before -> After
status: ready