Ignore close action for archived workspace chats - #13887
Conversation
|
@parasharrajat @AndrewGable One of you needs to 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] |
|
Updated and re-tested on all platforms 👍🏽 |
How can I do that? |
Ah go to Settings > Workspaces > New workspace, I updated the instructions. |
|
Ok, #13887 (comment) this seems like a different issue. It worked for the second workspace I created. |
|
Why don't I see no workspace chat on Android but the same is present on web? |
| } | ||
|
|
||
| // Ignore closed action here since we're already displaying a footer that explains why the report was closed | ||
| if (reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.CLOSED) { |
There was a problem hiding this comment.
Question: Do we only have CONST.REPORT.ACTIONS.TYPE.CLOSED action in workspace chat? What if the same action is passed for rooms or normal chat?
There was a problem hiding this comment.
That action is generated in the backend for all report chats and we're already handling the close action to display the footer generically here. Afaik we're only archiving workspace chats (policyExpenseChat) but if we eventually pass the same action for other report chats I think the ReportFooter will handle it gracefully.
There was a problem hiding this comment.
Ok, going to follow your lead on this. I don't have much idea about the design for this feature.
Oh when I tested I always saw that message, I tested again with a new account and the "no longer active" message is shown: Screen.Recording.2023-01-03.at.12.07.49.mov
Could you expand more on this? I re-tested on Android and the footer message appears as expected: |
I am not seeing any workspace chat in LHN on the Android dev build. FYI, I am not using
For this, I still have a workspace chat whose workspace is deleted. It's title is not updated to archived. Strange maybe the request failed or something happened that prevented it from being changed. But it is not related to this PR. |
|
Ok, I see that the issue is workspace chat is not synced across devices. If I create the chat on the web, the chat is created there but not visible on android. and If they create the workspace on android, then it won't show on the web. Although rooms are being synced correctly. There is another issue where workspace chat is renamed back to default name after deleting it. screen-2023-01-04_19.56.00.mp4 |
|
This workspace chat is very buggy. There are different bugs on different platforms. But I am sure that the change in this PR is working as it should be. I think we are good to merge this. All the issues that I have reported are unrelated to this PR. Let me know once you have reviewed the issues above. I tried to capture videos for all the platforms but not able to see the archived chat on all of them. |
Ah this is an interesting bug and I can't reproduce it constantly, seems it happens when the connection is intermittent. Have you reported those issues in #expensify-bugs?
Thanks, I think we're missing the PR reviewer checklist here. |
|
I will report these bugs. |
parasharrajat
left a comment
There was a problem hiding this comment.
Reviewer Checklist
- I have verified the author checklist is complete (all boxes are checked off).
- I verified the correct issue is linked in the
### Fixed Issuessection above - I verified testing steps are clear and they cover the changes made in this PR
- I verified the steps for local testing are in the
Testssection - I verified the steps for Staging and/or Production testing are in the
QA stepssection - I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
- I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
- I verified the steps for local testing are in the
- I checked that screenshots or videos are included for tests on all platforms
- I included screenshots or videos for tests on all platforms
- I verified tests pass on all platforms & I tested again on:
- Android / native
- Android / Chrome
- iOS / native
- iOS / Safari
- MacOS / Chrome / Safari
- MacOS / Desktop
- If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
- I verified proper code patterns were followed (see Reviewing the code)
- I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e.
toggleReportand notonIconClick). - I verified that comments were added to code that is not self explanatory
- I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
- I verified any copy / text shown in the product is localized by adding it to
src/languages/*files and using the translation method - I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
- I verified any copy / text that was added to the app is correct English and approved by marketing by adding the
Waiting for Copylabel for a copy review on the original GH to get the correct copy. - I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
- I verified the JSDocs style guidelines (in
STYLE.md) were followed
- I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e.
- If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
- I verified that this PR follows the guidelines as stated in the Review Guidelines
- I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like
Avatar, I verified the components usingAvatarhave been tested & I retested again) - I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
- I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
- If a new component is created I verified that:
- A similar component doesn't exist in the codebase
- All props are defined accurately and each prop has a
/** comment above it */ - The file is named correctly
- The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
- The only data being stored in the state is data necessary for rendering and nothing else
- For Class Components, any internal methods passed to components event handlers are bound to
thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor) - Any internal methods bound to
thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick) - All JSX used for rendering exists in the render method
- The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
- If any new file was added I verified that:
- The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
- If a new CSS style is added I verified that:
- A similar style doesn't already exist
- The style can't be created with an existing StyleUtils function (i.e.
StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
- If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like
Avataris modified, I verified thatAvataris working as expected in all cases) - If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
- If a new page is added, I verified it's using the
ScrollViewcomponent to make it scrollable when more elements are added to the page. - I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.
cc: @AndrewGable
🎀 👀 🎀 C+ reviewed
parasharrajat
left a comment
There was a problem hiding this comment.
There are tests to be updated.
| expect(result).toStrictEqual(input); | ||
| }); | ||
|
|
||
| it('should filter out closed actions', () => { |
There was a problem hiding this comment.
Added a new unit test to check if a closed action is removed and updated the existing one that had a closed action.
|
Came across this bug as we pick N7 back up and I was running end-to-end tests Workspace Chats as we look to get the project over the line.
I'd love to dig into that more with you. Which platforms? I've run tests on Web & iOS so far and it's working pretty good and consistent. I have a full written script if you're interested in taking a look.
What does this mean exactly, what's "default name"? The workspace chat does have a different chat title depending on the viewer of the chat as an FYI: Admin POV = memberName (or memberPrimaryLogin) |
|
I found the following issues
These were all dev. I will try to test these on staging. |
|
Anyways, this PR is ready to be merged. |
mountiny
left a comment
There was a problem hiding this comment.
Came hew from working on some other Workspace chat, changes look good to me and I agree we can explore all the bugs as we test this through, thanks @parasharrajat for such thorough testing.
I am going to merge this now!
Performance Comparison Report 📊Significant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
|
|
🚀 Deployed to production by @AndrewGable in version: 1.2.55-0 🚀
|





Details
Ignore the close action that was originally generated for OldDot (more details here), since we're already displaying the footer when a chat report is closed.
Fixed Issues
$ #13839
Tests
Offline tests
N/A
QA Steps
Same as
Teststeps.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android