suppressHighlighting on Text components with onPress#24244
Conversation
|
@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] |
|
Bump @abdulrahuman5196 |
| event.preventDefault(); | ||
| linkProps.onPress(); | ||
| }} | ||
| suppressHighlighting |
There was a problem hiding this comment.
We shouldn't suppress here. Its already wrapped under PressableWithSecondaryInteraction which means its expecting to have opacity change on press. @c3024
There was a problem hiding this comment.
This component is used in ReportActionFragment and if we don't suppress the highlighting this still remains inconsistent in iOS native compared to other platforms.
Please check this video.
Screen.Recording.2023-08-09.at.8.48.17.AM.mov
Extra highlighting for Text components in iOS is only suppressed here. The other interactions of the wrapped components are unaffected. So, I think we should add suppressHighlighting here as well.
@abdulrahuman5196
| onMouseDown={props.onMouseDown} | ||
| onKeyDown={openLinkIfEnterKeyPressed} | ||
| ref={props.forwardedRef} | ||
| suppressHighlighting |
There was a problem hiding this comment.
TextLink is used in Bills section of Workspace page.
Here as well if we do not suppress, the difference remains in iOS native.
Here is the video.
https://github.com/Expensify/App/assets/102477862/0c264cfa-e347-41ae-bef5-b7253d72d46a
|
@c3024 We shouldn't suppress everywhere. On some cases it is expected to show pressable kindly of opacity change. For example links inside comment text. |
|
Please check the videos attached at the review comments. We should suppressHighlighting in these components as well. Otherwise the inconsistency remains in these places. @abdulrahuman5196 |
|
@danieldoglas @zanyrenney What do we want to do on the above? We only confirmed the behaviour of email during the GH review. |
|
@danieldoglas could you clarify if we'd like to fix this bug at the welcome message only in this issue? |
|
Let's fix for the others as well! |
|
With this confirmation above, could you finish the review? @abdulrahuman5196 |
|
@c3024 Since we are updating other components, kindly update the test videos for the cases and add test cases on other components as well. |
|
@abdulrahuman5196 Updated the tests and test videos. But for the |
|
Please review and suggest if it still requires any changes. @abdulrahuman5196 |
Reviewer Checklist
Screenshots/VideosWebN/A Mobile Web - ChromeN/A Mobile Web - SafariN/A DesktopN/A iOSScreen.Recording.2023-08-13.at.9.32.45.PM.mp4Screen.Recording.2023-08-13.at.9.34.03.PM.mp4Screen.Recording.2023-08-13.at.9.35.14.PM.mp4AndroidN/A |
abdulrahuman5196
left a comment
There was a problem hiding this comment.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @danieldoglas
🎀 👀 🎀
C+ Reviewed
|
🚀 Deployed to staging by https://github.com/danieldoglas in version: 1.3.54-0 🚀
|
1 similar comment
|
🚀 Deployed to staging by https://github.com/danieldoglas in version: 1.3.54-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.3.54-13 🚀
|
Details
In iOS,
Textcomponents withonPresshighlight like a button on pressing down. For uniformity, this effect has been removed in allTextcomponents havingonPresswithsuppressHighlightingprop.Fixed Issues
$ #22103
PROPOSAL: #22103 (comment)
Tests
Test 1 for ReportWelcomeText
Test 2 for BaseAnchorForCommentsOnly and HTMLEngineProvider
Test 3 for AnchorRenderer
Test 4 for Banner
Offline tests
Test 1 for ReportWelcomeText
Test 2 for BaseAnchorForCommentsOnly and HTMLEngineProvider
Test 3 for AnchorRenderer
Test 4 for Banner
QA Steps
Test 1 for ReportWelcomeText
Test 2 for BaseAnchorForCommentsOnly and HTMLEngineProvider
Test 3 for AnchorRenderer
Test 4 for Banner
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Test 1
https://github.com/Expensify/App/assets/102477862/21827ed8-4f77-4523-88f8-bef7bb4568b5
Test 2
htmlRenderer.mov
Test 3
billsTextLink.mov
Test 4
I have no access to account with account manager ID nor access to a archived defaulted report because Banner is used only in ReportScreen with Concierge chat with account manager and ArchivedReportFooter with default. Since this is a simple suppression of highlighting with no effect other than suppressing highlighting, this would be fine. Test steps can be followed to check with accounts which have access to these specific cases.
Android