-
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
[TS migration] Migrate 'AnchorForCommentsOnly' component to TypeScript #32670
[TS migration] Migrate 'AnchorForCommentsOnly' component to TypeScript #32670
Conversation
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.
Left comments.
style={StyleSheet.flatten([style, defaultTextStyle])} | ||
role={CONST.ACCESSIBILITY_ROLE.LINK} | ||
hrefAttrs={{ | ||
rel, | ||
target: isEmail || !linkProps.href ? '_self' : target, | ||
}} | ||
href={linkProps.href || href} | ||
href={href} |
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.
why you got rid of linkProps.href
?
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.
Because it looks likelinkProps.href
is or have href
value or undefined
anyway
linkProps.href = href; |
# Conflicts: # src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.tsx
src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.tsx
Outdated
Show resolved
Hide resolved
src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.tsx
Outdated
Show resolved
Hide resolved
src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.tsx
Outdated
Show resolved
Hide resolved
src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.tsx
Outdated
Show resolved
Hide resolved
Note: before merging these updates into the |
href, | ||
lodashGet(linkRef, 'current'), | ||
); | ||
ReportActionContextMenu.showContextMenu(isEmail ? CONST.CONTEXT_MENU_TYPES.EMAIL : CONST.CONTEXT_MENU_TYPES.LINK, event, href, linkRef.current); |
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.
Should we add 'current' in linkRef
check, to avoid possible crash?
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.
@getusha hm, is there a case where linkRef
doesn't have current
field? I think ref object should have current value
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.
Seems like we don't need it as the component is functional component.
const CONTEXT_MENU_TYPES = { | ||
LINK: 'LINK', | ||
REPORT_ACTION: 'REPORT_ACTION', | ||
EMAIL: 'EMAIL', | ||
REPORT: 'REPORT', | ||
}; |
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.
Good catch 👍
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2023-12-21.at.11.54.19.AM.movAndroid: mWeb ChromeScreen.Recording.2023-12-21.at.11.50.00.AM.moviOS: NativeSimulator.Screen.Recording.-.iPhone.14.Pro.-.2023-12-21.at.11.44.06.mp4iOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.14.Pro.-.2023-12-21.at.11.00.13.mp4MacOS: Chrome / SafariScreen.Recording.2023-12-21.at.10.57.48.AM.movMacOS: DesktopScreen.Recording.2023-12-21.at.11.56.08.AM.mov |
# Conflicts: # src/pages/home/report/ContextMenu/ContextMenuActions.js
@getusha kind bump 🙂 |
# Conflicts: # src/pages/home/report/ContextMenu/ContextMenuActions.js
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.
lgtm!
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25135 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
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.
lgtm
✋ 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 production by https://github.com/mountiny in version: 1.4.16-5 🚀
|
Details
[TS migration] Migrate 'AnchorForCommentsOnly' component to TypeScript
Fixed Issues
$ #25135
PROPOSAL: N/A
Tests
[test link](http://google.com/)
Offline tests
N/A
QA Steps
[test link](http://google.com/)
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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.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
Android: Native
android.mp4
Android: mWeb Chrome
android_web.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios_web.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4