-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[No QA] Create a readme for API details #9488
Conversation
bump @amyevans for review |
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 good, and reading this thoroughly helped cement a few things for me, so definitely appreciating the addition! I've left a few non-blocking comments, feel free to merge instead if you'd like!
README.md
Outdated
- All data that is brought into the app and is necessary to display the app when offline should be stored on disk in persistent storage (eg. localStorage on browser platforms). [AsyncStorage](https://reactnative.dev/docs/asyncstorage) is a cross-platform abstraction layer that is used to access persistent storage. | ||
- All data that is displayed, comes from persistent storage. | ||
1. **UI Binds to data on disk** | ||
4. **UI Binds to data on disk** |
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, but with these updates, 3
is now missing. I've seen (and like) the convention of numbering them all 1
(since they don't matter anyway -- an <li>
tag just gets generated regardless of the number). Let's either return them to 1
or renumber to include 3
.
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.
OK, sure. PHPStorm likes to automatically renumber them, and I agree with using all 1s. I'll update that.
docs/API.md
Outdated
@@ -0,0 +1,53 @@ | |||
# API Details | |||
These are best practices related to the current API used for App. This does not relate to any of our `DeprecatedAPI`. | |||
# Philosophy |
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, but since you've already got an h1
above, I'd recommend bumping all subsequent headings in the doc down a level (e.g. this to h2
)
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.
Good idea
docs/API.md
Outdated
|
||
Pusher listens for an `onyxApiUpdate` event and sends the data straight to `Onyx.update(pushJSON)`. | ||
## READ Responses | ||
This is a response that returns data from the database that didn't exist before. |
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.
"didn't exist before" - this phrase is slightly confusing to me. I believe it means data that wasn't previously stored in Onyx on the client, but could you reword it to be crystal clear?
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, I completely mis-worded this. Will fix
Co-authored-by: Amy Evans <amy@expensify.com>
Co-authored-by: Amy Evans <amy@expensify.com>
Co-authored-by: Amy Evans <amy@expensify.com>
Updated |
🚀 Deployed to production by @sketchydroide in version: 1.1.78-8 🚀
|
Details
This contains most of the answers I've been giving to questions from people.
Fixed Issues
None
Tests
None
QA Steps
None