App: [HOLD for payment 2023-08-07] [$1000] Approved Hidden Comment Displays Incorrectly Until Refresh
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
- Report a comment as Intimidation or Bullying
- As Concierge, approve the message (i.e. clear the flag)
How to approve as Concierge:
- Go to https://www.expensify.com/concierge/#/
- Click
Modify Tiers - Select the
manifesto-tier - When a flag comes through a chat will be opened
- Click clear the flags on the options that come through
Expected Result:
The message should appear as it did before the flag
Actual Result:
The message - until refreshing the page - appears as the “This message has been flagged as violating our community rules and the content has been hidden.” copy, without the reveal button or line on the side.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
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.35-6 Reproducible in staging?: Needs reproduction requires concierge contribution Reproducible in production?: Needs reproduction requires concierge contribution 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
https://github.com/Expensify/App/assets/43996225/403dabb6-796f-4a64-ba91-286abfe51aad
Expensify/Expensify Issue URL: Issue reported by: @dangrous Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688151033866789
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~014e00f1dee1b2af9a
- Upwork Job ID: 1676879434823794688
- Last Price Increase: 2023-07-12
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 42 (23 by maintainers)
So I don’t think this would have been caught during existing testing, but I think it’s next to impossible to have as a regular test due to - as you mentioned, @Santhosh-Sellavel - the fact that we’d need Concierge to respond. I think we can skip it
@b4s36t4 fix+bonus $1500 - paid ✔️ @Santhosh-Sellavel review+bonus $1500 - please complete the checklist and request payment via NewDot
We’re having some trouble testing, but it’s with my development environment - not anything on @b4s36t4’s side, so any delay shouldn’t affect the potential speed bonus.
Hopefully I’ll be able to get it sorted today and we can still merge tomorrow, but wanted to get ahead of it if not
Sounds great!
Cool! I’m pretty sure just doing it where @b4s36t4 pointed it out should be fine; we’ll only ever get a cleared flag from the backend so latestDecision will change whenever we would want to put a comment back to normal.
Given that it’s Friday, though, and to test this we need some back and forth and coordination with my backend, I’m not going to assign until Monday (so we should be in a good position for the 3-day bonus rule). But I will do so then!
@Santhosh-Sellavel let us know when you’ve had a chance to review the proposals . Seems pretty straightforward, I think!
Proposal
Please re-state the problem that we are trying to solve in this issue.
Approved Hidden Comment Displays Incorrectly Until Refresh
What is the root cause of that problem?
The root cause of the issue lies here in this code block. https://github.com/Expensify/App/blob/a047b88851917807b036f3c5b8564c5add9ea9d2/src/pages/home/report/ReportActionItem.js#L158-L167
If we observe the code carefully we have a state called
isHiddenin theuseEffecthook we only setting the value astruetoisHiddenstate. Means even in case of updatefalsewe’re not overriding the state.Typically what we’re doing is we’re only setting state value as
truewe’re not resetting the state if themoderationDecisionchanges which means till we refresh the state value going to betrueand it’s staying same.What changes do you think we should make in order to solve the problem?
We should add a else check in the
useEffecthook, and reset the state value tofalse. There can be many ways to set it to false but the final solution is to make itfalseworks.What alternative solutions did you explore? (Optional)
NA
Result
iu.webm