-
Notifications
You must be signed in to change notification settings - Fork 3k
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
suppressHighlighting on Text components with onPress #24244
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 |
@@ -88,6 +88,7 @@ function BaseAnchorForCommentsOnly({onPressIn, onPressOut, href = '', rel = '', | |||
event.preventDefault(); | |||
linkProps.onPress(); | |||
}} | |||
suppressHighlighting |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -71,6 +71,7 @@ function TextLink(props) { | |||
onMouseDown={props.onMouseDown} | |||
onKeyDown={openLinkIfEnterKeyPressed} | |||
ref={props.forwardedRef} | |||
suppressHighlighting |
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.
Same goes here
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.
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 |
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. @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,
Text
components withonPress
highlight like a button on pressing down. For uniformity, this effect has been removed in allText
components havingonPress
withsuppressHighlighting
prop.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 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
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