Open izarutskaya opened 2 weeks ago
Triggered auto assignment to @johncschuster (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
Hidden is shown briefly when mentioning a user that we never chat before.
When we send a mention a receive the BE response, it will merge a new data for the mention accountID
and the personal details. If the accountID
is available, we look for it in the personal details list.
https://github.com/Expensify/App/blob/179d0f05e40744d08858778cf83aadf392334ad8/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.tsx#L59-L64
However, the personal details list from the hook here is not updated yet. https://github.com/Expensify/App/blob/179d0f05e40744d08858778cf83aadf392334ad8/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.tsx#L34
So, user
will be undefined and because of that, the displayName
is undefined too and we fallback to Hidden
briefly.
https://github.com/Expensify/App/blob/179d0f05e40744d08858778cf83aadf392334ad8/src/libs/PersonalDetailsUtils.ts#L78
We can check if both accountID and the personal details is available before using it. https://github.com/Expensify/App/blob/179d0f05e40744d08858778cf83aadf392334ad8/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.tsx#L59-L60
if (!isEmpty(htmlAttribAccountID) && personalDetails[htmlAttribAccountID]) {
const user = personalDetails[htmlAttribAccountID];
OR
We can use useOnyx
hook instead which from my testing, updated the same time as the mention (action) accountID
.
https://github.com/Expensify/App/blob/179d0f05e40744d08858778cf83aadf392334ad8/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.tsx#L34
OR do both
Job added to Upwork: https://www.upwork.com/jobs/~021849163258326584198
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (External
)
@bernhardoj's proposal LGTM we should do both, right?
🎀 👀 🎀
Triggered auto assignment to @MariaHCD, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@bernhardoj's proposal looks good to me too but do is it necessary to do both?
if we don't do both, it might temporarily show hidden until the value is resolved. Right?
cc @bernhardoj
Doing one of them is actually enough.
We can use useOnyx hook instead which from my testing, updated the same time as the mention (action) accountID.
I'm also suggesting doing both just in case the above isn't true anymore in the future. I think the 1st solution is the safest, but since replacing it with useOnyx is receiving the new value faster, I think there is no harm in doing both.
Great, thanks for clarifying. Doing both sounds good to me.
PR is ready
cc: @rushatgabhane
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: V9. 0.51-2 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: "Hidden" is shown in Hybrid app, it doesn't disappear Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
Hidden must not be shown briefly on sending @new expensifail user.
Actual Result:
Hidden is shown briefly on sending @new expensifail user.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/user-attachments/assets/b01f5a2e-ad8e-4c8e-a2c5-6ae2a75f629a
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @rushatgabhane