react-native-onyx
react-native-onyx copied to clipboard
[HOLD] keyChange update key/connectionID for faster lookup
Details
Following proposal: https://github.com/Expensify/App/issues/35809
Related Issues
Manual Tests
https://github.com/Expensify/App/pull/36226#issuecomment-1938661752
Author Checklist
- [X] I linked the correct issue in the
### Related Issuessection above - [X] I wrote clear testing steps that cover the changes made in this PR
- [X] I added steps for local testing in the
Testssection - [X] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
- [X] I added steps for local testing in the
- [X] I included screenshots or videos for tests on all platforms
- [X] I ran the tests on all platforms & verified they passed on:
- [X] Android / native
- [X] Android / Chrome
- [X] iOS / native
- [X] iOS / Safari
- [X] MacOS / Chrome / Safari
- [X] MacOS / Desktop
- [X] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
- [X] I followed proper code patterns (see Reviewing the code)
- [X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e.
toggleReportand notonIconClick) - [X] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g.
myBool && <MyComponent />. - [X] I verified that comments were added to code that is not self explanatory
- [X] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
- [X] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
- [X] I verified the JSDocs style guidelines (in
STYLE.md) were followed
- [X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e.
- [X] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
- [X] I followed the guidelines as stated in the Review Guidelines
- [X] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like
Avatar, I verified the components usingAvatarare working as expected) - [X] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
- [X] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
- [X] I verified that if a function's arguments changed that all usages have also been updated correctly
- [X] If a new component is created I verified that:
- [X] A similar component doesn't exist in the codebase
- [X] All props are defined accurately and each prop has a
/** comment above it */ - [X] The file is named correctly
- [X] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
- [X] The only data being stored in the state is data necessary for rendering and nothing else
- [X] If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
- [X] For Class Components, any internal methods passed to components event handlers are bound to
thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor) - [X] Any internal methods bound to
thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick) - [X] All JSX used for rendering exists in the render method
- [X] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
- [X] If any new file was added I verified that:
- [X] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
- [X] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like
Avataris modified, I verified thatAvataris working as expected in all cases) - [X] If the
mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps. - [X] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅
I'm placing this on HOLD right now in order for QA to be done on the latest version of Onyx without more un-QAed PRs from being merged.
I have read the CLA Document and I hereby sign the CLA
gedu requested a review from https://github.com/orgs/Expensify/teams/pullerbear as a code owner 6 hours ago
Is this off HOLD?
cc @mountiny who is assigned to the linked issue
It is not off hold until we merge the onyx bump and deploy it, but we can review in the meantime
It is not off hold until we merge the onyx bump and deploy it, but we can review in the meantime
I think we've likely bumped Onyx by now?
Conflicts fixed
@mountiny can we keep reviewing this PR? Will be more improvements: https://callstack-hq.slack.com/archives/C05LX9D6E07/p1715178705054759
@mountiny should I check something more?
I have tested the web and the desktop doesn't find any issues, but I am still unable to run the iOS and Android with Onyx installed from the local path.
@mollfpr thank you! that is helpful, I think we are good with web testing on this change for now and full testing would be done in the App bump.
@gedu what is your ETA for addressing the test failures?
We have couples of failing test case https://github.com/Expensify/react-native-onyx/actions/runs/9034415824/job/24828280471?pr=520
@mountiny I just pushed a fix
The test is pass now!
Re running
@mountiny is it all good?
We are handling an onyx update in this PR https://github.com/Expensify/App/pull/42057 Lets wait for that to be in staging before merging this change
Cool, will update, fix the comment and check if this makes sense
All good from my side, this is still valid, just need to double check @chrispader comment about JSDoc
Bumped for a review from @chrispader
@chrispader updated JSDoc
I think we're ready to go here, are we waiting on any final reviews?
Any news? @mountiny @Julesssss
Any news? @mountiny @Julesssss
Sorry, I missed this one. Can you please create an onyx bump PR and assign me please?
Ah shit. Your first two commits weren't signed. Could you please raise another PR against this issue? Please tag us again for another review.
Ohhh maan, ok on my way, sorry for that
@Julesssss new PR created: https://github.com/Expensify/react-native-onyx/pull/565