-
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
Refactor iou page by separating each step as individual screen #17964
Refactor iou page by separating each step as individual screen #17964
Conversation
@PauloGasparSv @thesahindia One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Additional video to make sure iou request is not broken:
Screen.Recording.2023-05-19.at.18.20.13.mov
Screen.Recording.2023-05-19.at.18.32.03.mov
Screen.Recording.2023-05-19.at.18.23.45.mov
Screen.Recording.2023-05-19.at.18.32.38.mov
Screen.Recording.2023-05-19.at.20.38.09.mov
Screen.Recording.2023-05-19.at.20.37.35.mov
Screen.Recording.2023-06-02.at.22.26.13.mov
Screen.Recording.2023-06-02.at.22.36.11.mov |
Details of the refactor:
|
This comment was marked as outdated.
This comment was marked as outdated.
}; | ||
|
||
const MoneyRequestParticipantsPage = (props) => { | ||
if (props.iou.loading) { |
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.
Removed because there will be never a loading happen when we load the participants.
if (this.isEditing) { | ||
this.props.redirectIfEmpty([this.props.participants, this.props.amount], this.iouType, this.reportID); | ||
} else { | ||
// Set the money request participants based on the report participants |
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.
Taken from here
App/src/pages/iou/MoneyRequestModal.js
Lines 119 to 123 in d19326e
const [selectedOptions, setSelectedOptions] = useState( | |
ReportUtils.isPolicyExpenseChat(props.report) | |
? OptionsListUtils.getPolicyExpenseReportOptions(props.report) | |
: OptionsListUtils.getParticipantsOptions(props.report, props.personalDetails), | |
); |
* | ||
* @returns {String} | ||
*/ | ||
getTitleForStep() { |
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.
Taken from here
App/src/pages/iou/MoneyRequestModal.js
Lines 197 to 210 in d19326e
const titleForStep = useMemo(() => { | |
if (currentStepIndex === 0) { | |
const confirmIndex = _.indexOf(steps, Steps.MoneyRequestConfirm); | |
if (previousStepIndex === confirmIndex) { | |
return props.translate('iou.amount'); | |
} | |
if (props.iouType === CONST.IOU.MONEY_REQUEST_TYPE.SEND) { | |
return props.translate('iou.sendMoney'); | |
} | |
return props.translate(props.hasMultipleParticipants ? 'iou.splitBill' : 'iou.requestMoney'); | |
} | |
return props.translate('iou.cash'); | |
// eslint-disable-next-line react-hooks/exhaustive-deps -- props does not need to be a dependency as it will always exist | |
}, [currentStepIndex, props.translate, steps]); |
prevCreatingIOUTransactionStatusRef.current = lodashGet(props.iou, 'creatingIOUTransaction'); | ||
}); | ||
|
||
const createTransaction = useCallback((selectedParticipants) => { |
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.
Taken from here
App/src/pages/iou/MoneyRequestModal.js
Lines 312 to 356 in d19326e
const createTransaction = useCallback((selectedParticipants) => { | |
const reportID = lodashGet(props.route, 'params.reportID', ''); | |
const trimmedComment = props.iou.comment.trim(); | |
// IOUs created from a group report will have a reportID param in the route. | |
// Since the user is already viewing the report, we don't need to navigate them to the report | |
if (props.hasMultipleParticipants && CONST.REGEX.NUMBER.test(reportID)) { | |
IOU.splitBill( | |
selectedParticipants, | |
props.currentUserPersonalDetails.login, | |
amount, | |
trimmedComment, | |
props.iou.selectedCurrencyCode, | |
props.preferredLocale, | |
reportID, | |
); | |
return; | |
} | |
// If the request is created from the global create menu, we also navigate the user to the group report | |
if (props.hasMultipleParticipants) { | |
IOU.splitBillAndOpenReport( | |
selectedParticipants, | |
props.currentUserPersonalDetails.login, | |
amount, | |
trimmedComment, | |
props.iou.selectedCurrencyCode, | |
props.preferredLocale, | |
); | |
return; | |
} | |
if (!selectedParticipants[0].login) { | |
// TODO - request to the policy expense chat. Not implemented yet! | |
// Will be implemented here: https://github.com/Expensify/Expensify/issues/270581 | |
return; | |
} | |
IOU.requestMoney( | |
props.report, | |
Math.round(amount * 100), | |
props.iou.selectedCurrencyCode, | |
props.currentUserPersonalDetails.login, | |
selectedParticipants[0], | |
trimmedComment, | |
); | |
}, [amount, props.iou.comment, props.currentUserPersonalDetails.login, props.hasMultipleParticipants, props.iou.selectedCurrencyCode, props.preferredLocale, props.report, props.route]); |
* | ||
* @param {String} paymentMethodType | ||
*/ | ||
const sendMoney = useCallback((paymentMethodType) => { |
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.
Taken from here
App/src/pages/iou/MoneyRequestModal.js
Lines 267 to 307 in d19326e
const sendMoney = useCallback((paymentMethodType) => { | |
const amountInDollars = Math.round(amount * 100); | |
const currency = props.iou.selectedCurrencyCode; | |
const trimmedComment = props.iou.comment.trim(); | |
const participant = selectedOptions[0]; | |
if (paymentMethodType === CONST.IOU.PAYMENT_TYPE.ELSEWHERE) { | |
IOU.sendMoneyElsewhere( | |
props.report, | |
amountInDollars, | |
currency, | |
trimmedComment, | |
props.currentUserPersonalDetails.login, | |
participant, | |
); | |
return; | |
} | |
if (paymentMethodType === CONST.IOU.PAYMENT_TYPE.PAYPAL_ME) { | |
IOU.sendMoneyViaPaypal( | |
props.report, | |
amountInDollars, | |
currency, | |
trimmedComment, | |
props.currentUserPersonalDetails.login, | |
participant, | |
); | |
return; | |
} | |
if (paymentMethodType === CONST.IOU.PAYMENT_TYPE.EXPENSIFY) { | |
IOU.sendMoneyWithWallet( | |
props.report, | |
amountInDollars, | |
currency, | |
trimmedComment, | |
props.currentUserPersonalDetails.login, | |
participant, | |
); | |
} | |
}, [amount, props.iou.comment, selectedOptions, props.currentUserPersonalDetails.login, props.iou.selectedCurrencyCode, props.report]); |
@PauloGasparSv @s77rt Ready for review! |
More merge conflicts |
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.
Lots of changes! Just a few comments but it's looking good
* @param {String} reportID | ||
*/ | ||
function startMoneyRequest(iouType, reportID = '') { | ||
resetMoneyRequestInfo(`${iouType}${reportID}`); |
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.
Do we need to call this when we start a money request? It looks like we always call resetMoneyRequestInfo whenever we complete a command so is this redundant?
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.
I think we still need this if you abandon the money request (close money request modal without completing the process)
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.
But then at that point don't you want to continue the money request? I guess this is a NAB though
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.
I think we always want to clear it when we open it from FAB or Composer. We're following the same pattern with Assign Task.
@@ -74,24 +106,63 @@ class MoneyRequestAmountPage extends React.Component { | |||
} | |||
|
|||
componentDidMount() { | |||
this.focusTextInput(); | |||
if (this.isEditing) { |
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 I wonder if we should handle these shouldReset / isEditing in a different way that is more DRY
Are these to handle new money request drafts?
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.
I was thinking to create a custom hook as the reset logic is being used in the amount, participant, confirmation, and description page, but both the amount and description page is still class component.
Are these to handle new money request drafts?
The reset logic is to prevent the user from doing a money request of type A with money request data of type B. For example, doing a send request with saved split request data. This is possible by directly accessing the URL (change from /send/new/confirmation to /split/new/confirmation). More context here #17964 (comment)
const selectedAmountAsString = this.props.iou.amount ? CurrencyUtils.convertToWholeUnit(this.props.iou.currency, this.props.iou.amount).toString() : ''; | ||
this.setState({ | ||
amount: selectedAmountAsString, | ||
selection: { |
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.
What is this for?
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, can you specify what you are referring to?
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.
Selection
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.
To put the cursor at the end of the number. We're following the same logic from constructor
App/src/pages/iou/steps/MoneyRequestAmountPage.js
Lines 97 to 106 in 7c04c2f
this.state = { | |
amount: selectedAmountAsString, | |
selectedCurrencyCode: props.iou.currency, | |
shouldUpdateSelection: true, | |
selection: { | |
start: selectedAmountAsString.length, | |
end: selectedAmountAsString.length, | |
}, | |
}; | |
} |
Conflicts solved! Both issues here #17964 (comment) are solved too. Added some default values in |
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.
Great work on this one. @s77rt I hope this was tested thorough as this is a big refactoring :D
One change requested
}, | ||
{ | ||
getComponent: () => { | ||
const MoneyRequestParticipantsPage = require('../../../pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage').default; |
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.
That is a mistake no?
const MoneyRequestParticipantsPage = require('../../../pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage').default; | |
const MoneyRequestParticipantsPage = require('../../../pages/iou/steps/MoneyRequstParticipantsPage').default; |
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.
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 that is confusing.
Lets fix it in a follow up
function getParticipantsOptions(participants, personalDetails) { | ||
const details = getPersonalDetailsForAccountIDs(_.pluck(participants, 'accountID'), personalDetails); | ||
return _.map(participants, (participant) => { |
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 did we have to change how this loop works?
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.
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
@@ -213,20 +213,22 @@ function getParticipantsOptions(participants, personalDetails) { | |||
const details = getPersonalDetailsForAccountIDs(_.pluck(participants, 'accountID'), personalDetails); | |||
return _.map(participants, (participant) => { | |||
const detail = details[participant.accountID]; | |||
const login = detail.login || participant.login; |
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 we are falling back to participant.login
? i.e. if login is undefined
, what would be wrong with that?
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.
The login is needed for displayName, alternateText, and icons.name
@@ -213,20 +213,22 @@ function getParticipantsOptions(participants, personalDetails) { | |||
const details = getPersonalDetailsForAccountIDs(_.pluck(participants, 'accountID'), personalDetails); | |||
return _.map(participants, (participant) => { | |||
const detail = details[participant.accountID]; | |||
const login = detail.login || participant.login; | |||
const displayName = detail.displayName || LocalePhoneNumber.formatPhoneNumber(login); |
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.
I don't think we need a fallback here either. getPersonalDetailsForAccountIDs
will return the data from onyx and displayName
seems always set.
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.
The fallback is for a case where the user doesn't exist, for example when you search a random email. More explanation in my previous comment here #17964 (comment)
src/libs/OptionsListUtils.js
Outdated
alternateText: Str.isSMSLogin(detail.login || '') ? LocalePhoneNumber.formatPhoneNumber(detail.login) : detail.login || detail.displayName, | ||
alternateText: LocalePhoneNumber.formatPhoneNumber(login) || displayName, |
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.
What is this change for? login
is not guaranteed to be a phone number
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.
Just simplifying it actually 😅. LocalePhoneNumber.formatPhoneNumber(login) will return it untouched if it's not a phone number.
App/src/libs/LocalePhoneNumber.js
Lines 19 to 33 in 0b7455f
function formatPhoneNumber(number) { | |
if (!number) { | |
return ''; | |
} | |
const numberWithoutSMSDomain = Str.removeSMSDomain(number); | |
const parsedPhoneNumber = parsePhoneNumber(numberWithoutSMSDomain); | |
// return the string untouched if it's not a phone number | |
if (!parsedPhoneNumber.valid) { | |
if (parsedPhoneNumber.number && parsedPhoneNumber.number.international) { | |
return parsedPhoneNumber.number.international; | |
} | |
return numberWithoutSMSDomain; | |
} |
We also did (use LocalePhoneNumber.formatPhoneNumber(login) without extra checking) that previously here
bernhardoj@ef3d955#diff-733528d957ae6a80eb863637fa5d54278c89c6121998f3574fa8c0aba935daebL181-L187
@@ -140,7 +140,7 @@ class MoneyRequestParticipantsSelector extends Component { | |||
* @param {Object} option | |||
*/ | |||
addSingleParticipant(option) { | |||
this.props.onAddParticipants([{accountID: option.accountID, isPolicyExpenseChat: option.isPolicyExpenseChat, reportID: option.reportID, selected: true}]); | |||
this.props.onAddParticipants([{accountID: option.accountID, login: option.login, isPolicyExpenseChat: option.isPolicyExpenseChat, reportID: option.reportID, selected: true}]); |
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.
Do we still need the login here? Can't we drop login
now and just relay on accountID
?
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.
It's needed for all things above.
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.
Alright, going to send it since Vit's comments were addressed and so we can get this tested heavily through QA
Nice work on this!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Navigation.goBack(ROUTES.getMoneyRequestRoute(this.iouType, this.reportID), true); | ||
} | ||
} | ||
} |
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.
This code need to be documented better. It is not obvious at all what is happening here. Please explain in the code what "reset" means in this context and what an iou.id
even is? When did we start adding "id" to the IOU and why...
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.
We start to add an ID to avoid a problem explained here #17964 (comment). The ID is iouType + reportID
App/src/pages/iou/MoneyRequestDescriptionPage.js
Lines 53 to 54 in e6c4b4e
const moneyRequestId = `${this.iouType}${this.reportID}`; | |
const shouldReset = this.props.iou.id !== moneyRequestId; |
Every time we start a money request, it will set an ID to it
Lines 1298 to 1301 in e6c4b4e
function startMoneyRequest(iouType, reportID = '') { | |
resetMoneyRequestInfo(`${iouType}${reportID}`); | |
Navigation.navigate(ROUTES.getMoneyRequestRoute(iouType, reportID)); | |
} |
what "reset" means
I think this can be found in the function itself.
Lines 65 to 69 in e6c4b4e
/** | |
* Reset money request info from the store with its initial value | |
* @param {String} id | |
*/ | |
function resetMoneyRequestInfo(id = '') { |
Inspired from
Lines 16 to 21 in e6c4b4e
/** | |
* Clears out the task info from the store | |
*/ | |
function clearOutTaskInfo() { | |
Onyx.set(ONYXKEYS.TASK, null); | |
} |
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.
I would appreciate it if the code could be annotated more thoroughly. Enhancing code documentation is essential for our team's effectiveness. Can we kindly address this?
Regarding the current solution, I remain uncertain about its efficiency. It appears more like a workaround to me, rather than a refined resolution.
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.
Sure, I can create a follow-up PR to add the comment and fix this typo #17964 (comment)
But, should we wait until the regression period ends before opening the PR?
Regarding the current solution, I remain uncertain about its efficiency. It appears more like a workaround to me, rather than a refined resolution.
I can't say for sure whether it's a workaround or not, but at least that's what we can come up with considering so many cases using Onyx.
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.
@bernhardoj It might be good to document the code now if not done already. I am also wondering about the logic done here.
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, but to do that, I'm thinking of a plan.
Currently, this reset logic exists on the Money request amount, participant, description, and confirm page, all basically have the same logic. I don't want to repeatedly write the comment on each page, so what about we create a custom hook called useMoneyRequestEffect
that handles this logic? If you agree,
- We need to migrate MoneyRequestDescriptionPage to a functional component, it's a fairly simple page, I can handle that.
- Currently, MoneyRequestAmountPage is being used for the amount and edit amount page.
App/src/libs/Navigation/AppNavigator/ModalStackNavigators.js
Lines 38 to 49 in cc5526b
getComponent: () => { const MoneyRequestAmountPage = require('../../../pages/iou/steps/MoneyRequestAmountPage').default; return MoneyRequestAmountPage; }, name: 'Money_Request', }, { getComponent: () => { const MoneyRequestEditAmountPage = require('../../../pages/iou/steps/MoneyRequestAmountPage').default; return MoneyRequestEditAmountPage; }, name: 'Money_Request_Amount',
We actually want this logic for the edit amount page only and I don't think conditionally using hook is correct.
if (isEditing.current) useMoneyRequestEffect();
I see we have an issue #23149 to make MoneyRequestAmountPage more reusable, we can wait for this to complete and then separate the page for the edit amount page.
OR
Replace the Onyx with Context approach 😄. This will completely remove this reset logic thing.
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.
I agree with that issue. IMO, the logic is fairly complex and confusing. Refactor is a good thing to do. We can wait on that refactor or you can help write proper comments during the refactor.
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.
So, migrating description page to functional and create useMoneyRequestEffect
after MoneyRequestAmountPage
refactor is done. Is that correct?
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.
Kind of. let's wait and see the end result of refactoring and then we can re-evaluate.
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.
@parasharrajat the refactor is done. What is the process here to do the follow-up? Should I just open the PR?
As a reminder, here is the plan I have:
- Separate edit amount from NewRequestAmountPage to its own page
- Create a new hook called
useMoneyRequestEffect
that will contain this logic
App/src/pages/iou/MoneyRequestDescriptionPage.js
Lines 60 to 70 in fe02d63
useEffect(() => { const moneyRequestId = `${iouType}${reportID}`; const shouldReset = iou.id !== moneyRequestId; if (shouldReset) { IOU.resetMoneyRequestInfo(moneyRequestId); } if (_.isEmpty(iou.participants) || (iou.amount === 0 && !iou.receiptPath) || shouldReset) { Navigation.goBack(ROUTES.getMoneyRequestRoute(iouType, reportID), true); } }, [iou.id, iou.participants, iou.amount, iou.receiptPath, iouType, reportID]); - Replace the above logic (and on other pages) with the new hook.
- Update the comment in the new hook
🚀 Deployed to staging by https://github.com/thienlnam in version: 1.3.31-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.31-3 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.31-3 🚀
|
} | ||
|
||
this.setState({selectedCurrencyCode: this.props.iou.selectedCurrencyCode}); | ||
if (prevProps.iou.amount !== this.props.iou.amount) { |
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.
This has caused a small regression in #22361
The dot wasn't removed from the end of amount when navigating back to the screen (in an edge case where amount is the same, more details here)
We resolved this by moving CurrencyUtils.convertToWholeUnit logic into a separate method and calling it in useFocusEffect
(when page is focused)
amount: PropTypes.number, | ||
participants: PropTypes.arrayOf( | ||
PropTypes.shape({ | ||
accountID: PropTypes.number, |
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.
Could you please come back and update this code to include comments on all these properties?
Add descriptions to all propTypes using a single line comment above the definition. No need to document the types, but add some context for each property so that other developers understand the intended use.
https://github.com/Expensify/Style-Guides/blob/main/react.md#things-to-do
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.
Sure, here is the PR
Details
Participants selection is lost when the component unmount. This PR refactor money request page to have their own screen for each step and save the currency, amount, description, and participants in a context provider.
Fixed Issues
$ #17662
PROPOSAL: #17662 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Screen.Recording.2023-05-19.at.19.27.50.mov
Mobile Web - Chrome
WhatsApp.Video.2023-05-19.at.20.22.35.mp4
Mobile Web - Safari
Screen.Recording.2023-05-19.at.19.52.03.mov
Desktop
Screen.Recording.2023-05-19.at.19.36.20.mov
iOS
Screen.Recording.2023-05-19.at.19.50.47.mov
Android
WhatsApp.Video.2023-05-19.at.20.22.34.mov