[Personal Migration] Hide CHANGEPOLICY actions for personal policy migrations#84208
[Personal Migration] Hide CHANGEPOLICY actions for personal policy migrations#84208fedirjh wants to merge 8 commits intoExpensify:mainfrom
CHANGEPOLICY actions for personal policy migrations#84208Conversation
Add hidden flag to OriginalMessageChangePolicy type and filter out CHANGEPOLICY actions with hidden=true in shouldReportActionBeVisible.
CHANGEPOLICY actions for personal policy migrationsCHANGEPOLICY actions for personal policy migrations
…adjust related visibility check
| return false; | ||
| } | ||
|
|
||
| if (isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.CHANGE_POLICY) && getOriginalMessage(reportAction)?.isHidden) { |
There was a problem hiding this comment.
Given the API should not be returning these, why do we need this code in the frontend?
There was a problem hiding this comment.
hmmm, I don't think the API filters these reportActions.
There was a problem hiding this comment.
Hmmm, this is sort of contradictory with this comment 🙃 https://github.com/Expensify/Web-Expensify/pull/51144/changes#diff-c455e280299fe10cd40b42322b488cb02aabad2a6fa11b9b6e67f3f6ee862f24R11
There was a problem hiding this comment.
Oh, that should be updated.
There was a problem hiding this comment.
Hmmm, is it possible to hide the actions at the backend level instead of here?
There was a problem hiding this comment.
Let me check, Probably can be done in Auth.
There was a problem hiding this comment.
Raised PR here: https://github.com/Expensify/Auth/pull/20317
Explanation of Change
When the
MigratePaidPersonalPolicyToTeammigration moves reports from a deprecated personal policy to a new team/corporate policy, the resulting CHANGEPOLICY report actions show confusing "changed workspace" messages to users.This hides
CHANGEPOLICYactions that have ahiddenflag set by Auth (see Expensify/Auth#20266). Thehiddenboolean is added to theOriginalMessageChangePolicytype, andshouldReportActionBeVisiblereturnsfalsewhen it'strue.Fixed Issues
$ Part of https://github.com/Expensify/Expensify/issues/599757
PROPOSAL:
Tests
CHANGEPOLICYaction is not visibleCHANGEPOLICYactions (withoutisHiddenflag) still display normallyOffline tests
N/A
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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
Before
After
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari