-
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
[TS migration] Migrate 'SidebarUtils.js' lib to TypeScript #28596
Merged
bondydaa
merged 18 commits into
Expensify:main
from
software-mansion-labs:ts-migration/SidebarUtils
Oct 26, 2023
Merged
Changes from 14 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f38e0e5
Initial work
blazejkustra f42364d
[TS migration] Migrate 'SidebarUtils.js' lib to TypeScript
blazejkustra 08da8c0
Self review the code
blazejkustra bf4c2f1
Merge branch 'main' into ts-migration/SidebarUtils
blazejkustra 56abdce
Merge branch 'main' into ts-migration/SidebarUtils
blazejkustra 1715578
Address code review
blazejkustra 2a25290
Add errors to ReportActionBase
blazejkustra 0e7d40d
Add optional chaining to fix tests
blazejkustra ccd959e
Fix remaining tests
blazejkustra 24f858d
Merge branch 'main' into ts-migration/SidebarUtils
blazejkustra c22c8c9
Merge branch 'main' into ts-migration/SidebarUtils
blazejkustra bbb35e8
Merge branch 'main' into ts-migration/SidebarUtils
blazejkustra 233d703
Bring back test
blazejkustra f137763
Add comments to onyx types
blazejkustra 47647d5
Merge branch 'main' into ts-migration/SidebarUtils
blazejkustra a224678
Remove isLastMessageDeletedParentAction from getOptionData
blazejkustra b7c5aec
Merge branch 'main' into ts-migration/SidebarUtils
blazejkustra 8d42d7f
Resolve conflicts
blazejkustra 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
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.
why are these string or number now? I'd thought the API should be returning reportActionIDs as strings all the time so if they aren't we need to fix that in the API.
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.
Here
actionKey
isnumber
that's why. Which is passed toshouldReportActionBeVisible
which invokedisReportActionDeprecated
with the same type.App/src/libs/SidebarUtils.js
Lines 32 to 36 in 1c31bf7
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.
Hmm think I understand.
so
actionKey
is an int because in that code for_.filter
we're looping over an array which is going to be keyed by an integer?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.
Yes
index
isnumber
!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.
hm okay.
It looks like this is mostly there just for checking if the deprecated sequenceNumbers exist which I think should be fully killed by now but I don't think we should do too much in this refactor so I think it's probably fine to leave as is for now.
but after we merge this we should probably clean up that code, i don't think we need to pass
key
ever and should be able to only passreportAction
but I'm no the most involved on this side of things either.