You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$500] Web - Error doesn't disappear for a while after deleting entire max exceed message. #27698
Paste a message that has over 15,000 characters. Notice now the Composer has red border with the error below.
Delete entire message.
Notice that Composer still has error for a while after deleting message.
Expected Result:
Error should disappear right after user deleted the message.
Actual Result:
Composer still has error for a while after deleting message.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.71.4 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 Notes/Photos/Videos: Any additional supporting documentation
changed the title [-]Web - Error doesn't disappear for a while after deleting entire max exceed message.[/-][+][$500] Web - Error doesn't disappear for a while after deleting entire max exceed message.[/+]on Sep 18, 2023
Please re-state the problem that we are trying to solve in this issue.
Error doesn't disappear for a while after deleting entire max exceed message.
What is the root cause of that problem?
Currently, the border error is display based on hasExceededMaxCommentLength
hasExceededMaxCommentLength is set by debounce function updateCommentLength(comment,onExceededMaxCommentLength) - delay 500ms and the comment params is get from the ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT that is also updated by the debounce function (1000ms)
Also we can remove the commentLenght state here because will don't need to display exact comment length (like "12370/10000"), just need to know whether it is greater than 10.000 or not
@DylanDylann How do you plan to get the value variable to the ExceededCommentLength component, given it's in ReportActionCompose and not ComposerWithSuggestions?
@DylanDylann I'm asking how will you get the value variable from ComposerWithSuggestions to ReportActionCompose?
You're planning to move the whole thing into ReportActionCompose and pass it to ComposerWithSuggestions?
I think given that there is another issue #30921 open for the edit message character limit not working, and that while some proposals can mitigate this slightly it's essentially impossible to fix completely without removing the debounce, so along with my previous reasoning I vote to close this.
@DylanDylann in all honesty, I'm going to defer to @Ollyws here - my main role is to help troubleshoot and manage the issue, and as the C+, Olly should be finding suitable proposals. Given that he's already mentioned that it's an edge case and this issue should be closed a few times already, I'm inclined to lean towards this as well - also this statement indicates we won't really be solving the issue?
it's essentially impossible to fix completely without removing the debounce
If Olly did think it was an actual issue, my understanding is that he would have chosen a proposal and asked for an internal engineering review. Going to close this one out!
Activity
[-]Web - Error doesn't disappear for a while after deleting entire max exceed message.[/-][+][$500] Web - Error doesn't disappear for a while after deleting entire max exceed message.[/+]melvin-bot commentedon Sep 18, 2023
Triggered auto assignment to @jliexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Sep 18, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01b8cf25e3b2eb870f
melvin-bot commentedon Sep 18, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Sep 18, 2023
Triggered auto assignment to @sonialiap (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.melvin-bot commentedon Sep 18, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (
External)DylanDylann commentedon Sep 18, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
hasExceededMaxCommentLengthhasExceededMaxCommentLengthis set by debounce functionupdateCommentLength(comment,onExceededMaxCommentLength) - delay 500msand thecommentparams is get from theONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENTthat is also updated by the debounce function (1000ms)App/src/components/ExceededCommentLength.js
Lines 29 to 41 in 6be8fca
What changes do you think we should make in order to solve the problem?
App/src/components/ExceededCommentLength.js
Line 33 in dee1632
commentparam from thevaluestateApp/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js
Line 107 in dee1632
ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENTApp/src/components/ExceededCommentLength.js
Lines 64 to 65 in dee1632
ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENTwill be updated by the debounce function.updateCommentLength(comment,onExceededMaxCommentLength)without delay.App/src/components/ExceededCommentLength.js
Lines 31 to 39 in dee1632
Also we can remove the
commentLenghtstate here because will don't need to display exact comment length (like "12370/10000"), just need to know whether it is greater than 10.000 or notApp/src/components/ExceededCommentLength.js
Line 30 in dee1632
updateCommentLengthfunction just callonExceededMaxCommentLength(newCommentLength > CONST.MAX_COMMENT_LENGTH), not affect the performanceWhat alternative solutions did you explore? (Optional)
Result
Screencast.from.19-09-2023.00.20.01.webm
82 remaining items
Ollyws commentedon Nov 1, 2023
@DylanDylann How do you plan to get the
valuevariable to theExceededCommentLengthcomponent, given it's inReportActionComposeand notComposerWithSuggestions?DylanDylann commentedon Nov 1, 2023
@Ollyws yeah, it is my plan
Ollyws commentedon Nov 1, 2023
But how exactly?
DylanDylann commentedon Nov 1, 2023
Yeah. I still go with this solution because it is very straightforward
Ollyws commentedon Nov 1, 2023
@DylanDylann I'm asking how will you get the
valuevariable from ComposerWithSuggestions to ReportActionCompose?You're planning to move the whole thing into
ReportActionComposeand pass it toComposerWithSuggestions?DylanDylann commentedon Nov 1, 2023
@Ollyws Sorry for misunderstood your question
My solution is:
Move the
valuestate:App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js
Line 112 in 347df0c
from ComposerWithSuggestions to ReportActionCompose
Then pass it to ComposerWithSuggestions to [ReportActionCompose] by updating:
App/src/pages/home/report/ReportActionCompose/ReportActionCompose.js
Line 393 in 347df0c
to
<ComposerWithSuggestions value={value} setValue={setValue} ... />DylanDylann commentedon Nov 6, 2023
@Ollyws Please help review my solution here when you have a chance #27698 (comment)
Ollyws commentedon Nov 6, 2023
I think given that there is another issue #30921 open for the edit message character limit not working, and that while some proposals can mitigate this slightly it's essentially impossible to fix completely without removing the debounce, so along with my previous reasoning I vote to close this.
DylanDylann commentedon Nov 7, 2023
@jliexpensify What do you think about this one #27698 (comment)?
jliexpensify commentedon Nov 8, 2023
@DylanDylann in all honesty, I'm going to defer to @Ollyws here - my main role is to help troubleshoot and manage the issue, and as the C+, Olly should be finding suitable proposals. Given that he's already mentioned that it's an edge case and this issue should be closed a few times already, I'm inclined to lean towards this as well - also this statement indicates we won't really be solving the issue?
If Olly did think it was an actual issue, my understanding is that he would have chosen a proposal and asked for an internal engineering review. Going to close this one out!
DylanDylann commentedon Nov 8, 2023
Many thanks @jliexpensify and @Ollyws