-
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
[HOLD for payment 2023-12-07] [$500] Bank account - Error still shows up after checking the ToS checkbox in account selection page #31830
Comments
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
Triggered auto assignment to @Julesssss ( |
📣 @github-actions[bot]! 📣
|
Removing the blocker label, as we're unable to confirm this issue in prod. We'll immediately open up for proposals. |
Job added to Upwork: https://www.upwork.com/jobs/~0137f7d0a93c64668a |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav ( |
@Julesssss This is a deploy blocker coming from #31795. Reverting here won't help as it will trigger another deploy blocker which fixed this issue. @mkhutornyi Are you here to quickly fix this? |
I am just going to put the corrected file here. import PropTypes from 'prop-types';
import React, {useState} from 'react';
import {View} from 'react-native';
import _ from 'underscore';
import useThemeStyles from '@styles/useThemeStyles';
import variables from '@styles/variables';
import Checkbox from './Checkbox';
import FormHelpMessage from './FormHelpMessage';
import PressableWithFeedback from './Pressable/PressableWithFeedback';
import Text from './Text';
import refPropTypes from './refPropTypes';
/**
* Returns an error if the required props are not provided
* @param {Object} props
* @returns {Error|null}
*/
const requiredPropsCheck = (props) => {
if (!props.label && !props.LabelComponent) {
return new Error('One of "label" or "LabelComponent" must be provided');
}
if (props.label && typeof props.label !== 'string') {
return new Error('Prop "label" must be a string');
}
if (props.LabelComponent && typeof props.LabelComponent !== 'function') {
return new Error('Prop "LabelComponent" must be a function');
}
};
const propTypes = {
/** Whether the checkbox is checked */
isChecked: PropTypes.bool,
/** Called when the checkbox or label is pressed */
onInputChange: PropTypes.func.isRequired,
/** Container styles */
style: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object]),
/** Text that appears next to check box */
label: requiredPropsCheck,
/** Component to display for label */
LabelComponent: requiredPropsCheck,
/** Error text to display */
errorText: PropTypes.string,
/** Value for checkbox. This prop is intended to be set by Form.js only */
value: PropTypes.bool,
/** The default value for the checkbox */
defaultValue: PropTypes.bool,
/** Ref for the checkbox */
forwardedRef: refPropTypes,
/** The ID used to uniquely identify the input in a Form */
/* eslint-disable-next-line react/no-unused-prop-types */
inputID: PropTypes.string,
/** Saves a draft of the input value when used in a form */
/* eslint-disable-next-line react/no-unused-prop-types */
shouldSaveDraft: PropTypes.bool,
/** An accessibility label for the checkbox */
accessibilityLabel: PropTypes.string,
};
const defaultProps = {
inputID: undefined,
style: [],
label: undefined,
LabelComponent: undefined,
errorText: '',
shouldSaveDraft: false,
isChecked: false,
value: false,
defaultValue: false,
forwardedRef: () => {},
accessibilityLabel: undefined,
};
function CheckboxWithLabel(props) {
const styles = useThemeStyles();
// We need to pick the first value that is strictly a boolean
// https://github.com/Expensify/App/issues/16885#issuecomment-1520846065
const [isChecked, setIsChecked] = useState(() => _.find([props.value, props.defaultValue, props.isChecked], (value) => _.isBoolean(value)));
const toggleCheckbox = () => {
const newState = !isChecked;
props.onInputChange(newState);
setIsChecked(newState);
};
const LabelComponent = props.LabelComponent;
return (
<View style={props.style}>
<View style={[styles.flexRow, styles.alignItemsCenter, styles.breakWord]}>
<Checkbox
isChecked={isChecked}
onPress={toggleCheckbox}
label={props.label}
style={[styles.checkboxWithLabelCheckboxStyle]}
hasError={Boolean(props.errorText)}
ref={props.forwardedRef}
accessibilityLabel={props.accessibilityLabel || props.label}
/>
<PressableWithFeedback
tabIndex={-1}
accessible={false}
onPress={toggleCheckbox}
pressDimmingValue={variables.checkboxLabelActiveOpacity}
// We want to disable hover dimming
hoverDimmingValue={variables.checkboxLabelHoverOpacity}
style={[styles.flexRow, styles.alignItemsCenter, styles.noSelect, styles.w100]}
wrapperStyle={[styles.ml3, styles.pr2, styles.w100, styles.flexWrap, styles.flexShrink1]}
>
{props.label && <Text style={[styles.ml1]}>{props.label}</Text>}
{LabelComponent && <LabelComponent />}
</PressableWithFeedback>
</View>
<FormHelpMessage message={props.errorText} />
</View>
);
}
CheckboxWithLabel.propTypes = propTypes;
CheckboxWithLabel.defaultProps = defaultProps;
CheckboxWithLabel.displayName = 'CheckboxWithLabel';
const CheckboxWithLabelWithRef = React.forwardRef((props, ref) => (
<CheckboxWithLabel
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
forwardedRef={ref}
/>
));
CheckboxWithLabelWithRef.displayName = 'CheckboxWithLabelWithRef';
export default CheckboxWithLabelWithRef; |
checking |
ProposalPlease re-state the problem that we are trying to solve in this issue.Validation error "You must accept the Terms of Service to continue" shows up even though the checkbox is already checked. What is the root cause of that problem?The What changes do you think we should make in order to solve the problem?Update this to undefined as default value
What alternative solutions did you explore? (Optional)NA |
raising PR in a few min |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.4-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-12-06. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.5-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-12-07. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
|
@Julesssss, @0xmiroslav Huh... This is 4 days overdue. Who can take care of this? |
Triggered auto assignment to @greg-schroeder ( |
Bug0 Triage Checklist (Main S/O)
|
Heya @greg-schroeder, can you just do a review payment for @0xmiroslav please |
@Julesssss I don't need any payment here but just assign me as I worked for the issue. |
📣 @0xmiroslav 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @mkhutornyi 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Okay I sent you an offer Miki! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.3.0
Reproducible in staging?: y
Reproducible in production?: unable check production flow
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
User is able to proceed to the next page.
Actual Result:
Validation error "You must accept the Terms of Service to continue" shows up even though the checkbox is already checked.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6289520_1700831559435.bandicam_2023-11-24_11-02-22-373.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: