Skip to content

[No QA] update API.md with more general rules#9536

Merged
marcochavezf merged 14 commits into
mainfrom
marco-updateAPI.md
Jun 24, 2022
Merged

[No QA] update API.md with more general rules#9536
marcochavezf merged 14 commits into
mainfrom
marco-updateAPI.md

Conversation

@marcochavezf

@marcochavezf marcochavezf commented Jun 22, 2022

Copy link
Copy Markdown
Contributor

Details

Add general rules discussed in the N7 channel related to the API refactoring. I linked the related slack conversation in each new bullet point.

Fixed Issues

N/A

Tests

N/A

PR Review Checklist

N/A

@marcochavezf marcochavezf self-assigned this Jun 22, 2022
Comment thread docs/API.md Outdated
Comment thread docs/API.md
- Names must NOT include names of parameters eg. Bad: `SignInWithPasswordOr2FA` Good: `SignIn`
- Names must NOT the word Page or View, eg. Bad: `OpenReportPage` Good: `OpenReport`
- Names must NOT reveal backend implementation details that the user does not know about eg. `AddVBBA` (users don't know what a VBBA is - verified business bank account) Good: `AddBankAccount`
- For deep links like `StartAppWhileSignedInAndOpenWorkspace`, create separate commands for each specific scenario like `StartAppWhileSignedIn` and `OpenWorkspace`, where both requests will be triggered in parallel.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread docs/API.md Outdated
- Use Create/Delete to create or destroy the only copy of data
- Use Add/Remove when we're just dealing with the copy of data
- Names must NOT include names of parameters eg. Bad: `SignInWithPasswordOr2FA` Good: `SignIn`
- Names must NOT the word Page or View, eg. Bad: `OpenReportPage` Good: `OpenReport`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread docs/API.md Outdated
Comment thread docs/API.md
Comment thread docs/API.md Outdated
Comment thread docs/API.md Outdated
Comment on lines +68 to +69
Q: How should we remove local data from the store if the data no longer exist in the server? eg. local policy data for policies the user is no longer a member of.
A: Use Onyx.set(key, null) for each data (eg. policy) not found in the server. No newline at end of file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread docs/API.md Outdated
@marcochavezf marcochavezf changed the title [WIP] update API.md with more general rules [No QA] update API.md with more general rules Jun 22, 2022
@marcochavezf marcochavezf marked this pull request as ready for review June 22, 2022 20:04
@marcochavezf marcochavezf requested a review from a team as a code owner June 22, 2022 20:04
@melvin-bot melvin-bot Bot requested review from aldo-expensify and removed request for a team June 22, 2022 20:04
@marcochavezf

Copy link
Copy Markdown
Contributor Author

Posted on n7 channel to get more 👀

tgolen
tgolen previously requested changes Jun 22, 2022

@tgolen tgolen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding some more things to the readme!

Comment thread docs/API.md Outdated
Comment thread docs/API.md
Comment thread docs/API.md Outdated
Comment thread docs/API.md Outdated
Comment thread docs/API.md Outdated
Comment thread docs/API.md Outdated
Comment thread docs/API.md Outdated
Comment thread docs/API.md Outdated
Comment thread docs/API.md Outdated
@marcochavezf marcochavezf requested a review from tgolen June 22, 2022 22:18
@marcochavezf

Copy link
Copy Markdown
Contributor Author

Updated, thanks for your comments!

Comment thread docs/API.md
Comment thread docs/API.md
aldo-expensify
aldo-expensify previously approved these changes Jun 23, 2022
Comment thread docs/API.md Outdated
Co-authored-by: Amy Evans <amy@expensify.com>
amyevans
amyevans previously approved these changes Jun 23, 2022
Comment thread docs/API.md Outdated
@marcochavezf

Copy link
Copy Markdown
Contributor Author

Thanks for the reviews! I'm going to merge it since it was already approved before, but if there are other comments I can address them as follow-up PR

@marcochavezf marcochavezf merged commit 4b79f0b into main Jun 24, 2022
@marcochavezf marcochavezf deleted the marco-updateAPI.md branch June 24, 2022 17:13
@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by @marcochavezf in version: 1.1.79-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify

OSBotify commented Jul 8, 2022

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by @roryabraham in version: 1.1.79-17 🚀

platform result
🤖 android 🤖 failure ❌
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants