Open IuliiaHerets opened 3 weeks ago
Triggered auto assignment to @anmurali (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
We think that this bug might be related to #wave-collect - Release 1
@anmurali FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Edited by proposal-police: This proposal was edited at 2024-08-18 22:28:21 UTC.
Address without state can be saved
The defaultValue
prop is used in the state component of the AddressForm
instead of value
. As a result, when the value of the country changes, the state
resets to ""
here, but this change isn't reflected in the UI because defaultValue
only sets the initial value.
https://github.com/Expensify/App/blob/5a2602c441170093e99850e2194808218b0aa838/src/components/AddressForm.tsx#L191-L199
We should use value
instead of defaultValue
in the StatePicker
component, and adjust other components if necessary.
https://github.com/user-attachments/assets/8241cf43-16d0-4117-b22e-c438911d5aea
Address without state can still be saved.
We don't use defaultValue when we validate the form
We can add shouldUseDefaultValue
here:
N/A
@anmurali Whoops! This issue is 2 days overdue. Let's get this updated quick!
@anmurali Still overdue 6 days?! Let's take care of this!
Job added to Upwork: https://www.upwork.com/jobs/~0142ffeec763fcd562
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External
)
Address without state can be saved
using defaultValue
instead of value
causes the state InputWrapper
component here to not rerender when the state
variable changes.
we should change defaultValue to value and pass the state
variable. I also made some adjustments here so that we use only one component instead of two when the county is USA or any other country.
<View style={isUSAForm ? styles.mhn5 : {}}>
<InputWrapper
InputComponent={isUSAForm ? StateSelector : TextInput}
inputID={INPUT_IDS.STATE}
label={translate('common.stateOrProvince')}
aria-label={translate('common.stateOrProvince')}
role={isUSAForm ? CONST.ROLE.PRESENTATION : undefined}
value={state}
maxLength={isUSAForm ? CONST.FORM_CHARACTER_LIMIT : undefined}
spellCheck={!isUSAForm}
onValueChange={onAddressChanged}
shouldSaveDraft={shouldSaveDraft}
/>
</View>
Result: https://github.com/user-attachments/assets/a5a644e8-c0f5-4898-a2e2-d2d2e0c54456
π£ @brad-isbell! π£ Hey, it seems we donβt have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: mohamediyedrhimita@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~01e11da7d5ef514a1c
β Contributor details stored successfully. Thank you for contributing to Expensify!
@abzokhattab's proposal looks good to me.
It's weird that defaultValue
is passed in state selector, while value
is passed in country selector in current codebase.
πππ C+ reviewed
shouldUseDefaultValue
can be alternative option but I prefer using value
since it's consistent with country selector.
I see that @wildan-m raised discussion on slack but no one responded. I bumped in channel.
Triggered auto assignment to @techievivek, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
π£ @abzokhattab π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
@anmurali @techievivek @abzokhattab @aimane-chnaif this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Waiting for PR
PR is Ready
If you havenβt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: v9.0.21-3 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
App should not be able to save address without state.
Actual Result:
The address without state can be saved
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/user-attachments/assets/2fc23309-2495-4397-a590-6b731ed8d501
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @aimane-chnaif