[No QA] Display policy changes logs in NewDot#16500
Conversation
|
@aimane-chnaif @chiragsalian 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] |
src/libs/ReportActionsUtils.js
Outdated
| const sortedReportActions = getSortedReportActions(filteredReportActions, true); | ||
| return _.filter(sortedReportActions, (reportAction) => { | ||
| // Allow all Policy Change reportActions to be displayed | ||
| if (CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG_REGEX.test(reportAction.actionName)) { |
There was a problem hiding this comment.
We should use startsWith instead of a regex. (https://www.measurethat.net/Benchmarks/Show/4797/1/js-regex-vs-startswith-vs-indexof#latest_results_block)
There was a problem hiding this comment.
Updated! But according to that benchmark, we should actually be using indexOf :P
|
Does this require C+ review? |
|
@aimane-chnaif I'm not sure that you'll be able to test this PR. You can always review the code though |
Reviewer Checklist
Screenshots/VideosWebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
aimane-chnaif
left a comment
There was a problem hiding this comment.
policychangelog messages can be grouped or not?
App/src/libs/ReportActionsUtils.js
Lines 120 to 124 in 61726eb
|
@aimane-chnaif - Yes they can. So no need to worry about that part. |
|
@yuwenmemon I don't see the styling issue. Do you have more specific reproducible steps? |
|
And maybe add automated tests in |
|
@aimane-chnaif these are system messages and users should not be able to delete or react to them. The only context actions available are |
|
I am heard systematic messages also accept reactions. |
|
We might have to change the way these messages are stored in the backend if we want to support reactions cc @yuwenmemon |
Are policy change logs in chats not reportActions? I personally like the ability to react to changes like people joining/leaving channels in slack, I think it is a fun way to interact. |
|
@luacmartins latest updates should show context menu like this, correct? |
yuwenmemon
left a comment
There was a problem hiding this comment.
Looks good just one comment!
src/CONST.js
Outdated
| RENAMED: 'RENAMED', | ||
| CHRONOSOOOLIST: 'CHRONOSOOOLIST', | ||
| POLICYCHANGELOG: { | ||
| POLICYCHANGELOG_UPDATE_NAME: 'POLICYCHANGELOG_UPDATE_NAME', |
There was a problem hiding this comment.
The POLICYCHANGELOG_ prefix here is kind of redundant - can we remove them everywhere in this object?
|
@chiragsalian all urs |
aimane-chnaif
left a comment
There was a problem hiding this comment.
LGTM too, though not able to test 🙂
|
🎯 @aimane-chnaif, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #16622. |
|
✋ 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/chiragsalian in version: 1.2.91-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.2.91-1 🚀
|




Details
Allow workspace changes to be displayed in NewDot
cc @yuwenmemon
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/267615
Tests
Setup:
Policy > People > Approval modeand change the approval modeupdated the Approval Mode from "Submit and Close" to "Submit and Approve"policy change messageOffline tests
N/A
QA Steps
N/A
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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
web.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android