-
Notifications
You must be signed in to change notification settings - Fork 74
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
[HOLD for App onyx bump] Add getAllEntries function for Onyx. #544
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.
Looks fine to me! I imagine it will be more fully tested as needed with that linked App PR. One NAB question but feel free to merge whenever.
@@ -127,6 +127,10 @@ const provider: StorageProvider = { | |||
return Promise.resolve(_.keys(store)); | |||
}, | |||
|
|||
getAllEntries() { | |||
return Promise.resolve(Object.entries(store)); |
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 - why Object
here instead of _
as above in getAllKeys()
? Seems like the same effect either way?
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.
Generally we don't use underscore in TS files, and have lint rules to prevent it. but the lint config in Onyx is a bit different from E/App - most of our TS-specific lint rules are in E/App and should be moved to our ESLint plugin.
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.
ah okay got it. Should I go ahead and merge this or does it need to wait for the other related changes?
just nudging here - let me know if you want me to merge now! Not sure how it syncs up with the other PRs. |
I think with Onyx PRs it's a good practice to get the E/App PR fully tested, approved and ready to merged before merging the Onyx PR. That way the upgrade is more likely to go smoothly. |
yeah that makes sense. Will hold! |
The underlying feature was added separately w/ a different implementation, so this is no longer needed |
Details
Added specifically for importing and exporting full snapshots of Onyx data. Note that in the PR that enables this, I actually added a lint rule to restrict its usage.
Related Issues
https://expensify.slack.com/archives/C05LX9D6E07/p1714702412032799?thread_ts=1714656403.682529&cid=C05LX9D6E07
Automated Tests
This was straightforward, tested manually, and not intended for production use cases. So I didn't add automated tests.
Manual Tests
Follow manual testing steps from Expensify/App#41557
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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop