-
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
[TS migration] Migrate 'Sidebar' page to TypeScript #35357
Conversation
@@ -128,9 +118,9 @@ function FloatingActionButtonAndPopover(props) { | |||
* Checks if user is anonymous. If true, shows the sign in modal, else, | |||
* executes the callback. | |||
* | |||
* @param {Function} callback | |||
* @param callback |
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 not needed
? [ | ||
{ | ||
displayInDefaultIconColor: true, | ||
contentFit: 'contain', | ||
contentFit: 'contain' as ImageContentFit, |
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.
contentFit: 'contain' as ImageContentFit, | |
contentFit: 'contain' as const, |
I think this will work
<FloatingActionButtonAndPopover | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
{...props} | ||
innerRef={ref} |
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.
remove this props , and use forwardRef
"normally" which is move forwardRef
where we are exporting component and in component do (props, ref) => ...
you can take a look on other components
{...props} | ||
innerRef={ref} | ||
/> | ||
)); | ||
|
||
FloatingActionButtonAndPopoverWithRef.displayName = 'FloatingActionButtonAndPopoverWithRef'; | ||
|
||
export default compose( |
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.
remove compose usage
@@ -257,6 +243,7 @@ export default compose( | |||
}, | |||
isLoading: { | |||
key: ONYXKEYS.IS_LOADING_APP, | |||
selector: (s) => s, |
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 not needed when you properly type withOnyx
What's the latest here? Is this a dupe? #36847 |
Same as TagPicker, @kubabutkiewicz took over since Kacper left the project and we decided to continue the work in another PR (it was reverted but Jakub will take care of it once he returns from his vacation). |
Details
Migrated 'Sidebar' page to TypeScript.
Fixed Issues
$ #25220
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop