-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$250] Category - Description hint field shows previous data after reenabling "Require description" #52399
Comments
Triggered auto assignment to @strepanier03 ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Category - Description hint field shows previous data after reenabling "Require description" What is the root cause of that problem?We are resetting the App/src/libs/actions/Policy/Category.ts Line 330 in cd3f30f
but we shouldn't as the BE is not resetting it (that's why you will see the commentHint you previously set if you re-open the category setting page before enabling areCommentsRequired again) and also as we already hide the commentHint menu when the comments required is disabled here
What changes do you think we should make in order to solve the problem?We shouldn't reset commentHint just like the BE on disabling comment required. In What alternative solutions did you explore? (Optional) |
@strepanier03 Eep! 4 days overdue now. Issues have feelings too... |
I was able to reproduce this and have tied it to a project. Setting external now. |
Job added to Upwork: https://www.upwork.com/jobs/~021858724639436105772 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
Edited by proposal-police: This proposal was edited at 2024-11-19 08:36:54 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Description hint field shows previous data after reenabling "Require description" What is the root cause of that problem?When we toggle App/src/libs/actions/Policy/Category.ts Line 330 in faa48b6
However, on the server, we do not update What changes do you think we should make in order to solve the problem?To resolve this issue, we must remove the description hint when we toggle Require description to disable, something like this: //src/pages/workspace/categories/CategorySettingsPage.tsx#L245
<Switch
isOn={policyCategory?.areCommentsRequired ?? false}
accessibilityLabel={translate('workspace.rules.categoryRules.requireDescription')}
+ onToggle={(isOn) => {
+ if (policyCategory.commentHint && !isOn) {
+ Category.setWorkspaceCategoryDescriptionHint(policyID, categoryName, '');
+ }
Category.setPolicyCategoryDescriptionRequired(policyID, categoryName, !areCommentsRequired);
}}
/> Test branchPOCScreen.Recording.2024-11-19.at.15.28.19.movWhat alternative solutions did you explore? (Optional)Or we can use areCommentsRequired to check when setting the workspace description hint //src/pages/workspace/categories/CategorySettingsPage.tsx#L245
<Switch
isOn={policyCategory?.areCommentsRequired ?? false}
accessibilityLabel={translate('workspace.rules.categoryRules.requireDescription')}
onToggle={() => {
+ if (policyCategory.commentHint && areCommentsRequired) {
+ Category.setWorkspaceCategoryDescriptionHint(policyID, categoryName, '');
+ }
Category.setPolicyCategoryDescriptionRequired(policyID, categoryName, !areCommentsRequired);
}}
/> |
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: 9.0.60-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Action Performed:
Precondition:
Expected Result:
Description hint field will remain empty.
Actual Result:
Description hint field shows the previous data after reopening category settings.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6662259_1731402885400.20241112_171047.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @parasharrajatThe text was updated successfully, but these errors were encountered: