-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Show the context menu when we long press assignee of a task #28840
Show the context menu when we long press assignee of a task #28840
Conversation
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
Signed-off-by: Pierre Michel <pmiche04@gmail.com> # Conflicts: # src/components/ReportActionItem/TaskPreview.js
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
@abdulrahuman5196 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
@ShogunFire The author's checklist is pending on this. Not sure if PR is complete. |
I will try to add the videos today |
Any update on the PR @ShogunFire ? |
I have troubles testing on android because of a reanimated error, on mweb and safari it works but on ios it doesn't, I am not sure why but it might be because we use onPress in TextLink which is used in MentionRenderer, we also have a preventDefault in the callback of onPress here that could cause this problem App/src/components/TextLink.js Line 47 in c228338
|
@ShogunFire Any update on the issue? |
I have more informations on the cause: When there is a nested Touchable or Pressable, only the nested events are called and the events from the parent Pressable are ignored, that's why the long press event is never called and the context menu doesn't show. I am trying to find a solution but so far it seems difficult unless we don't pass the onPress when the user mention is in a task preview. The consequence of this is that in task previews when we click the user, it will open the task report instead of the user details, is it acceptable ? |
@ShogunFire I don't understand the issue you are saying? Can you provide code pointer or screen recording videos to clarify? |
In TaskPreview Here I set up the onLongPress event to show the context menu. But it doesn't work when we click on the user mention. We put the user-mention tag here And the text inside that tag is rendered by MentionUserRenderer that uses onPress event here Basically for ios and android the Pressable that is used is the one in MentionUserRenderer and not the one in TaskPreview so the longPress event is never called (the context menu doesn't show) What I can try to do is pass arguments to user-mention tag to be able to set up the onLongPress event directly in MentionUserRenderer |
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
@ShogunFire This is already working for normally messages, how is it working there? Can we re-use the same logic here as well? |
Normal messages don't have onPress event. User mentions show the Details of the user when you click them. |
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
@abdulrahuman5196 Sorry for the late update, so another PR tried to solve the issue with user mention here: #29648 . To work in our case it was just lacking a provider around TaskPreview which I added. Now everything should work fine. Ready for review |
Hi, @ShogunFire We have merge conflicts here? |
Signed-off-by: Pierre Michel <pmiche04@gmail.com> # Conflicts: # src/components/ReportActionItem/TaskPreview.js
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
@abdulrahuman5196 I resolved the conflicts |
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2023-10-31.at.4.54.40.PM.mp4Android: mWeb ChromeScreen.Recording.2023-10-31.at.4.34.31.PM.mp4iOS: NativeScreen.Recording.2023-10-31.at.4.35.19.PM.mp4iOS: mWeb SafariScreen.Recording.2023-10-31.at.4.33.04.PM.mp4MacOS: Chrome / SafariScreen.Recording.2023-10-31.at.4.32.10.PM.mp4MacOS: DesktopScreen.Recording.2023-10-31.at.4.37.47.PM.mp4 |
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.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @AndrewGable
🎀 👀 🎀
C+ Reviewed
Gentle ping @AndrewGable |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/AndrewGable in version: 1.3.96-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.96-15 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.97-7 🚀
|
Details
Like for other previews, we show the context menu when we long press a task assignee
Fixed Issues
$ #23026
PROPOSAL: #23026 (comment)
Tests
Offline tests
Same tests
QA Steps
Same tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
web.mp4
Mobile Web - Chrome
mweb.mp4
Mobile Web - Safari
safari.mp4
Desktop
2023-10-26.11-46-25.mp4
iOS
2023-10-26.11-41-11.mp4
Android
2023-10-26.12-32-03.mp4