-
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
[HOLD for payment 2023-08-10] [$1000] Chat - Account B will have a pencil saved when only the admin can write in the announcement room #21835
Comments
Triggered auto assignment to @mallenexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
const report = ReportUtils.getReport(props.reportID);
const isAllowedToComment = ReportUtils.isAllowedToComment(report); App/src/components/LHNOptionsList/OptionRowLHN.js Lines 246 to 253 in 19ca306
- {optionItem.hasDraftComment && (
+ {optionItem.hasDraftComment && isAllowedToComment && ( What alternative solutions did you explore? (Optional)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.If a user has a draft message in a room and the room permission is changed to admin only then the draft indicator (pencil icon) is not removed. What is the root cause of that problem?We show the pencil icon (draft message indicator) without checking if room is archived, has errors or permissions - App/src/components/LHNOptionsList/OptionRowLHN.js Lines 246 to 253 in 53e4154
So if the room is archived, has any errors, or permission is changed to admin only then composer will be hidden but draft icon will show if user had a draft message before. What changes do you think we should make in order to solve the problem?We use the following function to hide the composer when room is archived, report has any errors or permissions are changed to admin only - Lines 2319 to 2327 in 53e4154
We should use the same function to remove the draft icon dynamically in all 3 cases. In the Lines 1134 to 1136 in 53e4154
const hideDraftIcon = ReportUtils.shouldHideComposer(report, reportErrors);
// ... rest of the code
{optionItem.hasDraftComment && !hideDraftIcon && (
<View
style={styles.ml2}
accessibilityLabel={props.translate('sidebarScreen.draftedMessage')}
>
<Icon src={Expensicons.Pencil} />
</View>
)} We can also move the {!hideDraftIcon && ...
...
} Additionally, we can rename the What alternative solutions did you explore? (Optional)NA |
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@mallenexpensify I just tested what you said locally and it didn't happen for me. Would you mind trying again? |
@Nikhil-Vats - Still reproducible. |
Yes @jeet-dhandha . The issue is still reproducible. I meant the other issue that @mallenexpensify was talking about was not reproducible for me. |
@mallenexpensify Huh... This is 4 days overdue. Who can take care of this? |
Job added to Upwork: https://www.upwork.com/jobs/~01db389064c4161941 |
Triggered auto assignment to Contributor Plus for review of internal employee PR - @parasharrajat ( |
Thanks @jeet-dhandha and @Nikhil-Vats , I was able to reproduce. |
@parasharrajat , do you think this can be external? |
Yes. It can be. I reviewed both proposals. @Nikhil-Vats We don't have to check for errors and archived status that is already handled. This problem can be solved both from the front end and back end. There are two ways to solve it frontend.
The best solution for this problem is to clear the draft instead of hiding it. I think can be done on the backend when we are sending the updated write capabilities. IMO, it will be best to do that on the backend if possible. @mallenexpensify There is no engineer assigned. I think we should assign an engineer immediately for internal issues. |
@parasharrajat in the code, we are not checking for errors or archived status before showing the draft icon. So, it is possible to show draft icon with error status when composer is hidden. So, for completeness and consistency we should also hide it in these cases. I could also reproduce it if I entered an invalid email like - We are already using |
@parasharrajat we can go with both changes as clearing drafts might take some time so till than the UI handles the rendering of draft icon. |
@mallenexpensify @parasharrajat this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@mallenexpensify, @parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@Nikhil-Vats Any update on the PR? |
Sorry @parasharrajat, I had mild fever these past two days so couldn't dedicate a lot of time but I am better now and working on this right now and will have the PR ready for review in morning. |
No need to be sorry but it is always better to leave an update. |
Sure, I will remember that going forward. |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.49-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-08-10. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
Regression Test Steps
Note: If you log out on a second device after step 5, then you won't see drafts after step 7 because drafts are not persisted after logout. Do you agree 👍 or 👎 ? |
Payment requested. |
Not overdue |
@mallenexpensify Can you please provide a payment summary so I can get @parasharrajat paid via NewDot? |
Issue reporter: Applause |
Reviewed the details for @parasharrajat. $1,000 approved for payment in NewDot based on the BZ summary above. |
We are good to close this issue. @madmax330 |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Issue foung when executing PR #21376
Action Performed:
Expected Result:
The pencil should disappear if only admin A can send messages
Actual Result:
When only the administrator can write in the message room, and user B has left a message in the compose box, the pencil does not disappear
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.34.1
Reproducible in staging?: Yes
Reproducible in production?: Yes
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
Recording.2268.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: