-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[CP Staging] Revert "Add translations for report field formula type" #71900
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
[CP Staging] Revert "Add translations for report field formula type" #71900
Conversation
| initialValue, | ||
| }); | ||
| }} | ||
| onTypeSelected={(type) => formRef.current?.resetForm({...inputValues, type, initialValue: type === CONST.REPORT_FIELD_TYPES.DATE ? defaultDate : ''})} |
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.
❌ PERF-4 (docs)
Objects and functions passed as props should be properly memoized or simplified to primitive values to prevent unnecessary re-renders.
The inline arrow function creates a new function instance on every render, which will cause the TypeSelector component to re-render unnecessarily even when its actual logic hasn't changed.
const handleTypeSelected = useCallback((type) => {
const initialValue = type === CONST.REPORT_FIELD_TYPES.DATE ? defaultDate : '';
formRef.current?.resetForm({...inputValues, type, initialValue});
}, [inputValues, defaultDate]);
// Then use:
onTypeSelected={handleTypeSelected}
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Beamanator
left a comment
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.
Straight revert 👍
|
@Beamanator looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
Not emergency, straight revert so no checklist needed |
…ulareportfieldtype [CP Staging] Revert "Add translations for report field formula type" (cherry picked from commit ed85b27) (cherry-picked to staging by lakchote)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/lakchote in version: 9.2.23-2 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.2.23-3 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/lakchote in version: 9.2.24-0 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/lakchote in version: 9.2.26-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.2.26-7 🚀
|
Reverts #71790 to fix these blockers: