-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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] [TS Migration] Standardize approach to Onyx pendingFields #34799
Merged
roryabraham
merged 29 commits into
Expensify:main
from
VickyStash:ts-migration/standardize-pendingFields
Feb 26, 2024
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
3d3aeaa
Create OfflineFeedback type
VickyStash 3a42ec7
Use OfflineFeedback type instead of pendingAction
VickyStash 4a1c14e
Fix lint errors
VickyStash 284d119
Fix lint error in SidebarUtils
VickyStash 3bce79c
Update PendingFields type and add OnyxItemWithOfflineFeedback type
VickyStash 4aaad12
Use OfflineFeedback where possible
VickyStash abed5f1
Merge branch 'main' into ts-migration/standardize-pendingFields
VickyStash 25552df
Update PolicyReportField import
VickyStash 60fe816
Merge branch 'main' into ts-migration/standardize-pendingFields
VickyStash 809707a
Update OnyxValueWithOfflineFeedback type and reuse it
VickyStash 8682a4d
Remove extra export
VickyStash 66808bf
Merge branch 'main' into ts-migration/standardize-pendingFields
VickyStash aa6e0e3
Lint fix after conflicts resolution
VickyStash c028794
Merge branch 'main' into ts-migration/standardize-pendingFields
VickyStash 648e293
Lint fix
VickyStash a8e53ff
Merge branch 'main' into ts-migration/standardize-pendingFields
VickyStash 5886dcb
Merge branch 'main' into ts-migration/standardize-pendingFields
VickyStash 97bba27
Merge branch 'main' into ts-migration/standardize-pendingFields
VickyStash 98925a5
Merge branch 'main' into ts-migration/standardize-pendingFields
VickyStash 187ffd9
TS fixes after merging main
VickyStash d559b2e
Merge branch 'main' into ts-migration/standardize-pendingFields
VickyStash 4578ca8
TS fix
VickyStash f0bb6ed
Merge branch 'main' into ts-migration/standardize-pendingFields
VickyStash 3b5834f
Minor code improvement
VickyStash 939a88c
Merge branch 'main' into ts-migration/standardize-pendingFields
VickyStash fc6c412
Merge branch 'main' into ts-migration/standardize-pendingFields
VickyStash 8163d2c
Merge branch 'main' into ts-migration/standardize-pendingFields
VickyStash 7d5e4e8
Fix TS error
VickyStash f52baac
Merge branch 'main' into ts-migration/standardize-pendingFields
VickyStash File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Sorry, I'm confused what the 2nd template argument for
OnyxValueWithOfflineFeedback
is for. Could you help explain? Maybe a README example here could be helpful too?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.
2nd template argument for
OnyxValueWithOfflineFeedback
are additional keys to be provided as keys forpendingFields
. So these keys'defaultLogin' | 'validateLogin' | 'addedLogin' | 'deletedLogin'
are outside of the Login model, but can be in pendingFields keys.So for example,
validateLogin
can be used in pendingFields keys, but it doesn't exist in the Login modelApp/src/libs/actions/User.ts
Lines 379 to 381 in ba7f01d
That's also was explained in this comment in 1st variant of implementation section.
Maybe it will be better to add a clarifying comment right next to the OnyxValueWithOfflineFeedback type, this way it should be easy to find and helpful.
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.
@roryabraham Bump for reviewing
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.
thanks for explaining