-
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
Fix: Can delete attachments in archived workspace #17329
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
@Beamanator Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
I have read the CLA Document and I hereby sign the CLA |
@tylerkaraszewski you were the engineer assigned on the related issue, do you want to review this? I'm OOO till the 20th anyway haha |
Weird, melvin should have requested a review from both of us, I wonder what is the problem. |
@@ -328,5 +329,8 @@ export default compose( | |||
preferredSkinTone: { | |||
key: ONYXKEYS.PREFERRED_EMOJI_SKIN_TONE, | |||
}, | |||
report: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this? Isn't report
passed as a prop in ReportActionsList?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need it because without it when we delete the workspace the ReportActionItems are not rerendered and the context menu is created during the rendering so the menu still had the delete comment option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually you might be right that we don't need it, I changed shouldComponentUpdate after changing this so maybe changing shouldComponentUpdate is enough I am testing this and I let you know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to remove it but then the item is not rerendered and delete comment option is present until the next rerender. Do you think it's a problem to keep it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this doesn't look right. Is there a way we could fix that? Or refactor components so the problem isn't present?
Also, could you merge with main please? There are some conflicts with the main branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to the way FlatList work the ReportActionItem is not rerender even if the component ReportActionList is rerendered. The way to make the FlatList rerender even when the data doesn't change is to use extraData. We used it here https://github.com/Expensify/App/blob/8c99aa34f96054123c6a9a0612549068cbb814ab/src/pages/home/report/ReportActionsList.js#L149
So we could add a condition to pass a different extraData if the report is closed. Do you think that would be a better way ?
Ok I will merge with main at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we could add a condition to pass a different extraData if the report is closed. Do you think that would be a better way ?
Nice find, yeah, I think it's a better approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the change and the merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like there is a bug on the main branch on android for workspace report I can't see any message. It's not related to my changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ShogunFire, the code looks good to me.
I did encounter a problem in your branch (a crash even), so for my testing I had to cherry-pick your PR into the latest main. I think you can merge with main once again and the problem will be resolved.
Once you do that, I'll be able to do a final sweep and go through the checklist.
Also, please upload screen recordings for all of the platforms
I redid the merge but for me the main branch still has a problem. ReportActionList has changed a lot so it may be related. Anyway I don't know what I can do more than that, my changes are not creating the problem. Sorry but I can't test on all platforms right now. |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-04-23.at.14.04.04.movMobile Web - ChromeScreen.Recording.2023-04-20.at.14.11.38.movMobile Web - SafariScreen.Recording.2023-04-20.at.13.27.51.movDesktopScreen.Recording.2023-04-23.at.14.06.07.moviOSScreen.Recording.2023-04-20.at.13.36.50.movAndroidScreen.Recording.2023-04-20.at.14.09.14.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ShogunFire , there's an issue on web
- In tab A open
announce
of the workspace - In tab B delete the workspace
- Go back to tab A
- Refresh the tab A
- Notice how it flashes and
delete
button is still available for a brief moment
Screen.Recording.2023-04-20.at.14.17.19.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works well on iOS, Android, mWeb Safari and Chrome. Besides the issue on web above, there are a couple of things that need to be sorted out:
- Please finish the checklist by uploading videos for all platforms when you have the time
- All of your commits need to be signed, you can rebase your current commits with the signed ones
Good testing I would have never found this bug, but do you think this is in the scope of this issue ? In the video we can see that the whole report is in a wrong state after the refresh, not just the context menu. Ah I thought my commits were signed :( For the recordings I will do what I can. |
I tried to reproduce this on new.expensify.com and couldn't. I can't reproduce it reliably, so I'm not sure if it was caused by this PR, but it would be better if we both double-check this. |
…"delete comment" option was still present in a closed report. Signed-off-by: Pierre Michel <pmiche04@gmail.com>
…t anymore Signed-off-by: Pierre Michel <pmiche04@gmail.com>
I can't reproduce this issue on web. What I have is another issue on Android since I merged with main, I also have the problem when I just checkout main without anything to do with my branch. The messages in workspaces are not seen: 2023-04-20.18-50-43.mp4If it's working for other people I am not sure what I am doing wrong... My commits are signed even if I couldn't make it the way you asked me (not an expert of git) |
@ShogunFire Just FYI we won't be able to merge your PR until all commits are signed... So if the instructions in point 10 here don't work for you, let's figure out how to make the instructions clearer and get them to work for you |
@Beamanator Hello, all commits are signed, I just couldn't make it with a rebase method so I forced push and the commits are not the same. If everything is ok now, I can try to fix the Lint's errors today. |
Aah ok thanks @ShogunFire maybe I was a bit confused 😅 That part looks great for now 👍 |
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
@eVoloshchak I think I have resolved the Lint's errors, commits are signed, I have done 3 recordings, I tried to create a Mac mini M1 instance on scaleway to do the 2 other recordings but they are currently out of stock: Concerning the bug you had found I really don't see how that could be induced by the changes I made and I think when the state of the report will be good the context menu will be good. Do you think, you can approve the merge as it is or do you really need those recordings ? |
I can't reproduce with latest sources, so all the platforms work great now, I've uploaded the missing recordings
This is a requirement for all PR's, they have to have recordings for each platform. It's about all platforms being tested by multiple people independently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good and it tests well on all platforms.
All that's lest if for @ShogunFire to upload missing recordings
@tylerkaraszewski, could you take a look at this please>
@ShogunFire, friendly bump on the missing recordings and merge conflicts |
…ossible Signed-off-by: Pierre Michel <pmiche04@gmail.com> # Conflicts: # src/components/ShowContextMenuContext.js
@tylerkaraszewski Hello, I put the last recordings and merged with main, can you review this PR ? |
@ShogunFire, the screen recording for Desktop is missing |
@eVoloshchak Sorry, I added it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and tests well
cc: @tylerkaraszewski
@tylerkaraszewski Hello, can you review this PR soon ? |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/tylerkaraszewski in version: 1.3.9-12 🚀
|
@Beamanator We dont need to QA this? |
Goooood question - @ShogunFire @eVoloshchak it looks like we need QA test steps! Can you add them please? |
@Beamanator @mvtglobally I added the QA steps |
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.12-0 🚀
|
Details
Fixed Issues
$ #16092
PROPOSAL: #16092 (comment)
Tests
On mobile only (Long press has been disabled on web and desktop):
Offline tests
No test offline
QA Steps
On mobile only (Long press has been disabled on web and desktop):
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
2023-04-20.18-05-28.mp4
Mobile Web - Chrome
2023-04-21.18-36-49.mp4
Mobile Web - Safari
2023-04-25.16-40-15.mp4
Desktop
2023-04-26.05-50-53.mp4
iOS
2023-04-25.16-28-39.mp4
Android
2023-04-21.18-18-33.mp4