Skip to content

Commit

Permalink
Merge pull request #55589 from nkdengineer/fix/55483
Browse files Browse the repository at this point in the history
Display get started tooltip for only onboarding admin room
  • Loading branch information
marcochavezf authored Jan 31, 2025
2 parents 632a035 + 402a4e9 commit 1bb4e5b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/components/LHNOptionsList/OptionRowLHN.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import Performance from '@libs/Performance';
import ReportActionComposeFocusManager from '@libs/ReportActionComposeFocusManager';
import {
isAdminRoom,
isChatUsedForOnboarding,
isChatUsedForOnboarding as isChatUsedForOnboardingReportUtils,
isConciergeChatReport,
isGroupChat,
isOneOnOneChat,
Expand Down Expand Up @@ -62,7 +62,8 @@ function OptionRowLHN({reportID, isFocused = false, onSelectRow = () => {}, opti
const session = useSession();
const shouldShowWokspaceChatTooltip = isPolicyExpenseChat(report) && activePolicyID === report?.policyID && session?.accountID === report?.ownerAccountID;
const isOnboardingGuideAssigned = introSelected?.choice === CONST.ONBOARDING_CHOICES.MANAGE_TEAM && !session?.email?.includes('+');
const shouldShowGetStartedTooltip = isOnboardingGuideAssigned ? isAdminRoom(report) : isConciergeChatReport(report);
const isChatUsedForOnboarding = isChatUsedForOnboardingReportUtils(report, introSelected?.choice);
const shouldShowGetStartedTooltip = isOnboardingGuideAssigned ? isAdminRoom(report) && isChatUsedForOnboarding : isConciergeChatReport(report);
const isActiveRouteHome = useIsCurrentRouteHome();

const {tooltipToRender, shouldShowTooltip} = useMemo(() => {
Expand All @@ -76,9 +77,6 @@ function OptionRowLHN({reportID, isFocused = false, onSelectRow = () => {}, opti

const {shouldShowProductTrainingTooltip, renderProductTrainingTooltip, hideProductTrainingTooltip} = useProductTrainingContext(tooltipToRender, shouldShowTooltip);

// During the onboarding flow, the introSelected NVP is not yet available.
const [onboardingPurposeSelected] = useOnyx(ONYXKEYS.ONBOARDING_PURPOSE_SELECTED);

const {translate} = useLocalize();
const [isContextMenuActive, setIsContextMenuActive] = useState(false);

Expand Down Expand Up @@ -283,7 +281,7 @@ function OptionRowLHN({reportID, isFocused = false, onSelectRow = () => {}, opti
isSystemChat(report)
}
/>
{isChatUsedForOnboarding(report, onboardingPurposeSelected) && <FreeTrial badgeStyles={[styles.mnh0, styles.pl2, styles.pr2, styles.ml1]} />}
{isChatUsedForOnboarding && <FreeTrial badgeStyles={[styles.mnh0, styles.pl2, styles.pr2, styles.ml1]} />}
{isStatusVisible && (
<Tooltip
text={statusContent}
Expand Down

0 comments on commit 1bb4e5b

Please sign in to comment.