-
Notifications
You must be signed in to change notification settings - Fork 984
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
[#18554] incorrect drawer for non community members #21597
[#18554] incorrect drawer for non community members #21597
Conversation
Jenkins BuildsClick to see older builds (8)
|
idk probably it's better to avoid formatting changes, it's much harder to review |
88% of end-end tests have passed
Expected to fail tests (1)Click to expandClass TestCommunityMultipleDeviceMerged:
Passed tests (7)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestWalletMultipleDevice:
Class TestWalletOneDevice:
Class TestCommunityOneDeviceMerged:
|
Sorry, I forgot to add a self review, I'll add it now |
(let [edit-message? (and community-member? | ||
outgoing | ||
(not (or deleted? deleted-for-me?)) | ||
;; temporarily disable edit image message until | ||
;; https://github.com/status-im/status-mobile/issues/15298 is | ||
;; implemented | ||
(not= content-type constants/content-type-image) | ||
(not= content-type constants/content-type-audio)) | ||
reply? (and able-to-send-message? | ||
(not= outgoing-status :sending) | ||
(not (or deleted? deleted-for-me?))) | ||
copy-text? (and (not (or deleted? deleted-for-me?)) | ||
(not= content-type constants/content-type-audio)) | ||
;; pinning images are temporarily disabled | ||
pin-message? (and message-pin-enabled | ||
(not= content-type constants/content-type-image) | ||
(or community-member? (not community?))) | ||
delete-for-me? (and community-member? | ||
(not (or deleted? deleted-for-me? bridge-message))) | ||
delete-for-everyone? (and community-member? | ||
(or (not deleted?) | ||
outgoing | ||
(and community? can-delete-message-for-everyone?) | ||
(and group-chat group-admin?) | ||
(not bridge-message)))] |
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.
Modified this logic to properly handle the shown options
(and community? can-delete-message-for-everyone?) | ||
(and group-chat group-admin?) | ||
(not bridge-message)))] | ||
(cond-> [] |
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.
changed:
(concat
(when something? [:a])
(when foo? [:b])
(when bar? [:c]))
to:
(cond-> []
something? (conj :a)
foo? (conj :b))
(when (and (or community-member?) | ||
(not= outgoing-status :sending) | ||
(not (or deleted? deleted-for-me?))) | ||
[reactions {:chat-id chat-id :message-id message-id}]) |
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.
Needed to limit the reactions to only community members
:bottom (+ (safe-area/get-bottom) | ||
(when-not able-to-send-messages? 46) | ||
shell.constants/floating-shell-button-height)}) |
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.
This is the second fix about the scroll to bottom button in chats
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.
This 46 is suspicious @ulisesmac, do you know if it can be calculated to be the sum of other known values?
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.
Thanks for noticing @ilmotta
This is the height of the bottom drawer that says "requst to join". It's specified in figma. I can name it, do you think that'd be better?
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's a large and specific number @ulisesmac, that's why it caught my attention. Usually if it's 4, 8, 12, 20 we know they are just standard spacing values, but 46 I thought could be a magic number. Numbers that are tied to a specific component width/height are usually good candidates be defined as vars. One reason is that if designers change in Figma we won't be able to easily/safely adjust in the code.
:bottom (+ (safe-area/get-bottom) | ||
(when-not able-to-send-messages? 46) | ||
shell.constants/floating-shell-button-height)}) |
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.
This 46 is suspicious @ulisesmac, do you know if it can be calculated to be the sum of other known values?
Hey @ulisesmac ! Is PR ready for QA? If yes could you please add |
@ulisesmac thanks for the PR ISSUE 1 group/1-1 chats drawer missing optionsActual result: 1:1 chat
other's messages drawer is missing following options:
group chat
other's messages drawer is missing following options:
Expected result: |
@pavloburykh Thank you for testing it, I'll solve them, I forgot to check the implementation for 1:1 chats. |
2751cc8
to
d08b375
Compare
@pavloburykh fixed. Could you please test it again? BTW, I also fixed the order of the items showed, according to figma, we should display:
But we show:
So it's fixed too. |
0% of end-end tests have passed
Failed tests (35)Click to expandClass TestFallbackMultipleDevice:
Class TestDeepLinksOneDevice:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestWalletOneDevice:
Class TestCommunityOneDeviceMerged:
Class TestWalletMultipleDevice:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestGroupChatMultipleDeviceMergedNewUI:
Expected to fail tests (20)Click to expandClass TestDeepLinksOneDevice:
Class TestCommunityMultipleDeviceMerged:
Class TestActivityMultipleDevicePRTwo:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestActivityMultipleDevicePR:
|
ad12661
to
88e209d
Compare
0% of end-end tests have passed
Failed tests (35)Click to expandClass TestWalletOneDevice:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestDeepLinksOneDevice:
Class TestCommunityOneDeviceMerged:
Class TestFallbackMultipleDevice:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestWalletMultipleDevice:
Expected to fail tests (20)Click to expandClass TestCommunityMultipleDeviceMergedTwo:
Class TestCommunityMultipleDeviceMerged:
Class TestDeepLinksOneDevice:
Class TestActivityMultipleDevicePRTwo:
Class TestActivityMultipleDevicePR:
|
@ulisesmac thanks for the PR. Issues are fixed, failed e2e are not PR related. Ready for merge. |
fixes #21384
fixes #18554
Summary
This PR fixes the modal shown for non-members that sent a message in a community in a chat:
video_2024-11-06_13-50-34.mp4
There are some missing options, such as "forward", but they haven't been implemented yet.
Addintionally fixes:
iOS | Android
Platforms
status: ready