Closed izarutskaya closed 9 months ago
Job added to Upwork: https://www.upwork.com/jobs/~0161ec5a5613f04872
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (External
)
Triggered auto assignment to @kadiealexander (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Users can save an empty status with custom clear after.
The issue happens because we do not check the text & emoji to not be empty neither during validation nor during saving the value.
Even though the expected behavior says we should show an error in this case, I think it's a better UX to allow the user to clear their status by setting an empty value.
We just should call clearStatus if emojiCode
andstatusText
are empty:
const updateStatus = useCallback(
({emojiCode, statusText}) => {
if (!emojiCode && _.isEmpty(statusText)) {
clearStatus();
return;
}
...
If we want to show a validation error instead, we should add handling for a case when neither emoji nor text is selected/entered.
We should show the validation error in this case:
const validateForm = useCallback(({emojiCode, statusText}) => {
const errors = {};
if (!emojiCode && _.isEmpty(statusText)) {
ErrorUtils.addErrorMessage(errors, INPUT_IDS.STATUS_TEXT, 'statusPage.statusRequired');
}
if (brickRoadIndicator) {
errors.clearAfter = '';
}
return errors;
}, [brickRoadIndicator]);
@paultsimura just wanna clarify the requirement here, I think we would like to not allow users to save clear status setting
without selecting an emoji or message. It doesn't mean we don't allow users to clear their status by setting an empty value in all cases.
@hoangzinh how should this look UX-wise considering there is no such option as "do not set clear status setting
" and the default value is automatically set to "Today"?
As the Today
is also a value, we should show an error in this flow as well?
clearAfter
is set to Today
Won't it be a bit confusing for the user considering they've not entered any value and try to save the "blank" state?
Thanks for raising it @paultsimura
What do you think about the above question https://github.com/Expensify/App/issues/35647#issuecomment-1925435610 @kadiealexander ?
I actually don't think this is a bug! When you click "clear status" the status saves automatically:
https://github.com/Expensify/App/assets/59587260/ea6e72fb-0230-4c56-9358-9237c45d8085
And if you save a clear status, even with the clearAfter set to today
it will just remain with no status after "today". Please reopen if you disagree!
@kadiealexander please re-read the steps of the issue. It's not about the "clear status" button. It's when you have cleared your status (or didn't have one), then set the custom time for "clear after" and click "save" — you'll be able to save an empty status with a defined "clear after" time, which is incorrect UX.
Right! I still don't think this is an issue. Like I said in my comment above: if you save an empty status, even with the clearAfter set to a specific date it will just remain with no status after the end date. It's slightly weird UX, but it's not necessarily incorrect and it's not causing a major error or blocking the user from using Expensify, so I vote to keep it closed. If you strongly disagree, please feel free to bring the conversation to Slack for more thoughts.
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: 1.4.35 Reproducible in staging?: Y Reproducible in production?: Y 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:
Without setting status emoji or message, tapping save must show error to select status emoji before saving it.
User sets clear status & must not be able to save status without selecting emoji or entering message.
Actual Result:
Without setting status emoji or message, tapping save not showing any error to select status emoji before saving it.
User sets clear status & able to save status without selecting emoji or entering message.
When there is no status message, allowing user to save clear status and empty status message has no point of use.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/Expensify/App/assets/115492554/4ceca9b6-5b9c-4fe0-9ba0-9eebf97fc382
View all open jobs on GitHub
Upwork Automation - Do Not Edit