调整移动端欢迎页显示时机

移动端进入站点壳即显示欢迎提示

更新欢迎页判定测试

同步玩法链路文档中的欢迎提示口径
This commit is contained in:
2026-06-25 22:58:09 +08:00
parent 28e11c4718
commit a61e604921
3 changed files with 6 additions and 15 deletions
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@ import {
shouldShowMobileHomeWelcomeDialog,
} from './PlatformMobileHomeWelcomeDialog';
test('shows mobile home welcome only for the mobile platform home route', () => {
test('shows mobile home welcome when entering the mobile site shell', () => {
expect(
shouldShowMobileHomeWelcomeDialog({
isDesktopLayout: false,
@@ -33,7 +33,7 @@ test('shows mobile home welcome only for the mobile platform home route', () =>
platformTab: 'category',
pathname: '/',
}),
).toBe(false);
).toBe(true);
expect(
shouldShowMobileHomeWelcomeDialog({
isDesktopLayout: false,
@@ -41,10 +41,10 @@ test('shows mobile home welcome only for the mobile platform home route', () =>
platformTab: 'home',
pathname: '/creation',
}),
).toBe(false);
).toBe(true);
});
test('keeps mobile home welcome dismissed across bottom tab switches until refresh', () => {
test('keeps mobile home welcome dismissed across site navigation until refresh', () => {
expect(
shouldOpenMobileHomeWelcomeDialog({
isDesktopLayout: false,
@@ -1,4 +1,3 @@
import { normalizeAppPath } from '../../routing/appPageRoutes';
import { PlatformActionButton } from '../common/PlatformActionButton';
import { UnifiedModal } from '../common/UnifiedModal';
import type { SelectionStage } from './platformEntryTypes';
@@ -22,16 +21,8 @@ type PlatformMobileHomeWelcomeDialogProps = {
export function shouldShowMobileHomeWelcomeDialog({
isDesktopLayout,
selectionStage,
platformTab,
pathname,
}: MobileHomeWelcomeDecisionInput) {
return (
!isDesktopLayout &&
selectionStage === 'platform' &&
platformTab === 'home' &&
normalizeAppPath(pathname) === '/'
);
return !isDesktopLayout;
}
export function shouldOpenMobileHomeWelcomeDialog({