Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/ProductTrainingContext/TOOLTIPS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const TOOLTIPS: Record<ProductTrainingTooltipName, TooltipData> = {
onHideTooltip: () => dismissProductTraining(SCAN_TEST_TOOLTIP),
name: SCAN_TEST_TOOLTIP,
priority: 900,
shouldShow: () => true,
shouldShow: ({hasBeenAddedToNudgeMigration}) => !hasBeenAddedToNudgeMigration,
shouldRenderActionButtons: true,
},
[SCAN_TEST_TOOLTIP_MANAGER]: {
Expand All @@ -150,7 +150,7 @@ const TOOLTIPS: Record<ProductTrainingTooltipName, TooltipData> = {
onHideTooltip: (isDismissedUsingCloseButton = false) => dismissProductTraining(SCAN_TEST_TOOLTIP_MANAGER, isDismissedUsingCloseButton),
name: SCAN_TEST_TOOLTIP_MANAGER,
priority: 1000,
shouldShow: () => true,
shouldShow: ({hasBeenAddedToNudgeMigration}) => !hasBeenAddedToNudgeMigration,
},
[SCAN_TEST_CONFIRMATION]: {
content: [
Expand All @@ -161,7 +161,7 @@ const TOOLTIPS: Record<ProductTrainingTooltipName, TooltipData> = {
onHideTooltip: (isDismissedUsingCloseButton = false) => dismissProductTraining(SCAN_TEST_CONFIRMATION, isDismissedUsingCloseButton),
name: SCAN_TEST_CONFIRMATION,
priority: 1100,
shouldShow: () => true,
shouldShow: ({hasBeenAddedToNudgeMigration}) => !hasBeenAddedToNudgeMigration,
},
[OUTSTANDING_FILTER]: {
content: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ function MoneyRequestParticipantsSelector({
const isPaidGroupPolicy = useMemo(() => isPaidGroupPolicyUtil(policy), [policy]);
const isIOUSplit = iouType === CONST.IOU.TYPE.SPLIT;
const isCategorizeOrShareAction = [CONST.IOU.ACTION.CATEGORIZE, CONST.IOU.ACTION.SHARE].some((option) => option === action);
const [tryNewDot] = useOnyx(ONYXKEYS.NVP_TRY_NEW_DOT, {canBeMissing: true});
const hasBeenAddedToNudgeMigration = !!tryNewDot?.nudgeMigration?.timestamp;

const importAndSaveContacts = useCallback(() => {
contactImport().then(({contactList, permissionStatus}: ContactImportResult) => {
Expand Down Expand Up @@ -179,7 +181,7 @@ function MoneyRequestParticipantsSelector({
shouldSeparateSelfDMChat: iouType !== CONST.IOU.TYPE.INVOICE,
shouldSeparateWorkspaceChat: true,
includeSelfDM: !isMovingTransactionFromTrackExpense(action) && iouType !== CONST.IOU.TYPE.INVOICE,
canShowManagerMcTest: action !== CONST.IOU.ACTION.SUBMIT,
canShowManagerMcTest: !hasBeenAddedToNudgeMigration && action !== CONST.IOU.ACTION.SUBMIT,
isPerDiemRequest,
},
);
Expand All @@ -202,6 +204,7 @@ function MoneyRequestParticipantsSelector({
options.reports,
participants,
isPerDiemRequest,
hasBeenAddedToNudgeMigration,
]);

const chatOptions = useMemo(() => {
Expand Down
1 change: 0 additions & 1 deletion tests/ui/components/ProductTrainingContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ describe('ProductTrainingContextProvider', () => {
it('should hide tooltip when hideProductTrainingTooltip is called', async () => {
// When migrated user has dismissed welcome modal
Onyx.merge(ONYXKEYS.NVP_ONBOARDING, {hasCompletedGuidedSetupFlow: true});
Onyx.merge(ONYXKEYS.NVP_TRY_NEW_DOT, {nudgeMigration: {timestamp: new Date()}});
const date = new Date();
Onyx.set(ONYXKEYS.NVP_DISMISSED_PRODUCT_TRAINING, {
migratedUserWelcomeModal: {
Expand Down
Loading