-
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] [No QA] Migrate wdyr.js to TS #38681
[TS Migration] [No QA] Migrate wdyr.js to TS #38681
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
wdyr.ts
Outdated
@@ -1,9 +1,8 @@ | |||
// Implements Why Did You Render (WDYR) in Dev | |||
import lodashGet from 'lodash/get'; | |||
/// <reference types="@welldone-software/why-did-you-render" /> |
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 done according to TS description in: https://github.com/welldone-software/why-did-you-render?tab=readme-ov-file#setup
I have read the CLA Document and I hereby sign the CLA |
recheck |
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.
I would only leave the comment on the top, otherwise LGTM
793f5fc
to
b2e5f3d
Compare
Also, maybe it's worth to add the link to the documentation, that explains why the |
b2e5f3d
to
6be8734
Compare
wdyr.ts
Outdated
import React from 'react'; | ||
import Config from 'react-native-config'; | ||
|
||
const useWDYR = lodashGet(Config, 'USE_WDYR') === 'true'; | ||
const useWDYR = Config?.USE_WDYR === 'true'; | ||
|
||
if (useWDYR) { | ||
const whyDidYouRender = require('@welldone-software/why-did-you-render'); |
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.
const whyDidYouRender = require('@welldone-software/why-did-you-render'); | |
const whyDidYouRender = require<typeof WhyDidYouRender>('@welldone-software/why-did-you-render'); |
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.
very good point, will update this
@marcochavezf 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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Desktop |
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, thanks!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Details
(Note: the issue is closed but the file was not migrated.)
lodash.get
usage. I hope that is ok since there is almost no changes in this file otherwise.Fixed Issues
$#25229
PROPOSAL:
Tests
.env
and set the value ofUSE_WDYR
totrue
USE_WDYR
to false and see that no logs appearOffline tests
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 methodSTYLE.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 and/or tagged@Expensify/design
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
Screen.Recording.2024-03-21.at.09.28.30.mov
MacOS: Desktop