-
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
Cleanup completing a split bill #29568
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
d940b33
Fix proptypes
youssef-lr ce96b01
Add configurable option to OptionsSelector and make split details scr…
youssef-lr ae0a3b6
Show receipt scanning message for splits as well
youssef-lr 8cf9b1e
Do not display last message from backend if report has no actions
youssef-lr e2a5657
Only make BaseOptionsSelector scrollable when inputs are below the op…
youssef-lr a36590f
Merge branch 'main' into youssef_cleanup_completeSplitBill
youssef-lr 1127b20
Fix proptype name
youssef-lr c35cbc6
Address comments
youssef-lr 4983055
Add partial merchant when creating transaction
youssef-lr e622ab6
CLeanup checking for missing fields
youssef-lr d52729d
Remove extra component
youssef-lr 9e2e935
Make isEditingSplitBill depend on only the fields being empty
youssef-lr 87851c7
Merge branch 'main' into youssef_cleanup_completeSplitBill
youssef-lr fc1e3ff
Fix missing money request status details
youssef-lr 696de5d
Disable nested scroll on OptionsList used in MoneyRequestConfirmation…
youssef-lr 072c633
tidy up
youssef-lr 249d904
Use scrollViewEnabled as well to disable scroll on iOS
youssef-lr 984e5e8
Fix error translation key
youssef-lr 630cfd3
Translation fix
youssef-lr cbfa239
Allow options to expand to full height
youssef-lr 2a406ca
Disable bounce effect on money request options to fix scroll issues
youssef-lr 43d8dcb
Fix lint
youssef-lr 6f47cf8
Another lint fix
youssef-lr 18769cf
Remove redundant prop
youssef-lr 71064ed
Update src/components/MoneyRequestConfirmationList.js
youssef-lr 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -347,17 +347,17 @@ function getOptionData(report, reportActions, personalDetails, preferredLocale, | |
|
||
if ((result.isChatRoom || result.isPolicyExpenseChat || result.isThread || result.isTaskReport) && !result.isArchivedRoom) { | ||
const lastAction = visibleReportActionItems[report.reportID]; | ||
if (lodashGet(lastAction, 'actionName', '') === CONST.REPORT.ACTIONS.TYPE.RENAMED) { | ||
if (lastAction && lastAction.actionName === CONST.REPORT.ACTIONS.TYPE.RENAMED) { | ||
const newName = lodashGet(lastAction, 'originalMessage.newName', ''); | ||
result.alternateText = Localize.translate(preferredLocale, 'newRoomPage.roomRenamedTo', {newName}); | ||
} else if (lodashGet(lastAction, 'actionName', '') === CONST.REPORT.ACTIONS.TYPE.TASKREOPENED) { | ||
} else if (lastAction && lastAction.actionName === CONST.REPORT.ACTIONS.TYPE.TASKREOPENED) { | ||
result.alternateText = `${Localize.translate(preferredLocale, 'task.messages.reopened')}`; | ||
} else if (lodashGet(lastAction, 'actionName', '') === CONST.REPORT.ACTIONS.TYPE.TASKCOMPLETED) { | ||
} else if (lastAction && lastAction.actionName === CONST.REPORT.ACTIONS.TYPE.TASKCOMPLETED) { | ||
result.alternateText = `${Localize.translate(preferredLocale, 'task.messages.completed')}`; | ||
} else if (lodashGet(lastAction, 'actionName', '') !== CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW && lastActorDisplayName && lastMessageTextFromReport) { | ||
} else if (lastAction && lastAction.actionName !== CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW && lastActorDisplayName && lastMessageTextFromReport) { | ||
result.alternateText = `${lastActorDisplayName}: ${lastMessageText}`; | ||
} else { | ||
result.alternateText = lastMessageTextFromReport.length > 0 ? lastMessageText : Localize.translate(preferredLocale, 'report.noActivityYet'); | ||
result.alternateText = lastAction && lastMessageTextFromReport.length > 0 ? lastMessageText : Localize.translate(preferredLocale, 'report.noActivityYet'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems unintended? The |
||
} | ||
} else { | ||
if (!lastMessageText) { | ||
|
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.
For the future, please name the props for the effect they should have inside the component. When only reviewing code inside this component, if you saw the prop
isEditingSplitBill
, you would have no idea what that prop should do or how it should be applied. For example, the prop below is calledshouldShowSmartScanFields
which is much more explicit and its purpose is understood immediately.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.
Hey @tgolen - sorry for the late reply! Will keep this in mind, however, I think it's a bit difficult in this component as it handles different IOUs. What would be a better naming here?