-
Notifications
You must be signed in to change notification settings - Fork 75
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
Remove metrics #479
Remove metrics #479
Conversation
*/ | ||
function diffObject<TObject extends UnknownObject, TBase extends UnknownObject>(object: TObject, base: TBase): UnknownObject { | ||
return lodashTransform(object, (result: UnknownObject, value, key) => { | ||
if (deepEqual(value, base[key])) { |
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.
You changed the method here, please make sure it works correctly
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.
Let's test new lib/PerformanceUtils.ts
, other than that LGTM!
return; | ||
} | ||
|
||
if (typeof value === 'object' && typeof base[key] === 'object') { |
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 was worried that typeof value === 'object'
might work differently here, but I think it's fine 👍
applyDecorators(); | ||
} | ||
|
||
function init({keys = {}, initialKeyStates = {}, safeEvictionKeys = [], maxCachedKeysCount = 1000, shouldSyncMultipleInstances = Boolean(global.localStorage), debugSetState = false} = {}) { |
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.
nab: shouldn't it be formatted like earlier? I think it was more readable
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.
That's how prettier formatted it after removing one parameter 😅
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.
Please make sure the changes here are reflected in Onyx.d.ts
too!
Details
During the TS migration of metrics, we had a discussion on Slack if this feature is being used. No one raised any concerns so this PR removes metrics from the codebase (aside from PerformanceUtils which are used in a few other places).
Related Issues
Expensify/App#34341
Automated Tests
Manual Tests
Aside from making sure that onyx works and Performance utils didn't change in functionality there's nothing to test.
To make testing easier just run
npm run build
and paste dist file into expensify project.Author Checklist
### Related Issues
section aboveTests
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
N/A