-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Due for payment 2025-05-22] [$250] Console Errors on Report Debug Page #61702
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
Comments
Triggered auto assignment to @sonialiap ( |
|
🚨 Edited by proposal-police: This proposal was edited at 2025-05-08 16:10:17 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.The console should be free of errors or unexpected warnings when loading and using the Report Debug page. What is the root cause of that problem?There are two problem here
<View style={[styles.mb5, styles.ph5, styles.gap5]}>
{textFields.map(([key, value]) => {
const numberOfLines = DebugUtils.getNumberOfLinesFromString((formDraftData?.[key as keyof typeof formDraftData] as string) ?? value);
return (
<InputWrapper
InputComponent={TextInput}
inputID={key}
accessibilityLabel={key}
shouldSaveDraft
forceActiveLabel
label={key}
numberOfLines={numberOfLines}
multiline={numberOfLines > 1}
defaultValue={value}
disabled={DETAILS_DISABLED_KEYS.includes(key)}
shouldInterceptSwipe
/>
);
})}
{textFields.length === 0 && <Text style={[styles.textNormalThemeText, styles.ph5]}>{translate('debug.none')}</Text>}
</View> <View style={[styles.mb5, styles.ph5, styles.gap5]}>
{numberFields.map(([key, value]) => (
<InputWrapper
InputComponent={TextInput}
inputID={key}
accessibilityLabel={key}
shouldSaveDraft
forceActiveLabel
label={key}
defaultValue={String(value)}
disabled={DETAILS_DISABLED_KEYS.includes(key)}
shouldInterceptSwipe
/>
))}
{numberFields.length === 0 && <Text style={styles.textNormalThemeText}>{translate('debug.none')}</Text>}
</View> <View style={[styles.mb5, styles.ph5, styles.gap5]}>
{booleanFields.map(([key, value]) => (
<InputWrapper
InputComponent={CheckboxWithLabel}
label={key}
inputID={key}
shouldSaveDraft
accessibilityLabel={key}
defaultValue={value}
/>
))}
{booleanFields.length === 0 && <Text style={styles.textNormalThemeText}>{translate('debug.none')}</Text>}
</View> and in src/pages/Debug/Report/DebugReportPage {metadata?.map(({title, subtitle, message, action}) => (
<View style={[StyleUtils.getBackgroundColorStyle(theme.cardBG), styles.p5, styles.br4, styles.flexColumn, styles.gap2]}>
<View style={[styles.flexRow, styles.justifyContentBetween]}>
<Text style={styles.h4}>{title}</Text>
<Text>{subtitle}</Text>
</View>
{!!message && <Text style={styles.textSupporting}>{message}</Text>}
{!!action && (
<Button
text={action.name}
onPress={action.callback}
/>
)}
</View>
))} What changes do you think we should make in order to solve the problem?
However, wrapping these components in
To resolve both warnings, we will:
This solution preserves the current functionality while making the components compatible with the ref-passing behavior of export default forwardRef(ConstantSelector); and export default forwardRef(DateTimeSelector); <InputWrapper
key={key} and pass the title as the key in src/pages/Debug/Report/DebugReportPage <View style={[styles.mb5, styles.ph5, styles.gap5]}>
{metadata?.map(({title, subtitle, message, action}) => (
<View
key={title}
style={[StyleUtils.getBackgroundColorStyle(theme.cardBG), styles.p5, styles.br4, styles.flexColumn, styles.gap2]}
> What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N / A What alternative solutions did you explore? (Optional) |
Job added to Upwork: https://www.upwork.com/jobs/~021920533399339131818 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
@nabi-ebrahimi's proposal looks good to me. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @tgolen, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @nabi-ebrahimi You have been assigned to this job! |
I'll submit the PR tomorrow. |
PR is ready. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.45-21 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 2025-05-22. 🎊 For reference, here are some details about the assignees on this issue:
|
@parasharrajat @sonialiap @parasharrajat The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
@parasharrajat Hi, it's my first job on Expensify. What's the next step for me? |
PR is merged. You will be paid on 22 May if there are no regression. |
Do I need to add BugZero Checklist as well? |
Nope, I will do that. |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test ProposalNot needed. Its a debug feature. Do we agree 👍 or 👎 |
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:
Reproducible in staging?: Needs Reproduction
Reproducible in production?: Needs Reproduction
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: @tgolen
Slack conversation (hyperlinked to channel name): #Open Source
Action Performed:
Expected Result:
The console should be free of errors or unexpected warnings when loading and using the Report Debug page.
Actual Result:
Multiple console errors are present
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
Platforms Tested:
On which of our officially supported platforms was this issue tested:Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @sonialiapThe text was updated successfully, but these errors were encountered: