统一界面上的ip形象标识
新增陶泥儿产品 IP 公共图片资产 左上角品牌标识和绑定页品牌块统一展示该形象 更新产品基线、创作主页方案和共享决策记录
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/* @vitest-environment jsdom */
|
||||
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { expect, test } from 'vitest';
|
||||
|
||||
import { RpgEntryBrandLogo } from './RpgEntryBrandLogo';
|
||||
|
||||
test('陶泥儿品牌标识展示统一产品形象', () => {
|
||||
const { container } = render(<RpgEntryBrandLogo />);
|
||||
|
||||
expect(
|
||||
screen.getByRole('img', { name: '陶泥儿 GENARRATIVE' }),
|
||||
).toBeTruthy();
|
||||
expect(
|
||||
container
|
||||
.querySelector('.platform-brand-logo__image')
|
||||
?.getAttribute('src'),
|
||||
).toBe('/branding/taonier-product-ip.png');
|
||||
});
|
||||
|
||||
test('装饰模式不暴露额外品牌朗读入口', () => {
|
||||
render(<RpgEntryBrandLogo decorative />);
|
||||
|
||||
expect(screen.queryByRole('img')).toBeNull();
|
||||
});
|
||||
@@ -1,3 +1,5 @@
|
||||
import { BRAND_ASSETS } from '../../uiAssets';
|
||||
|
||||
export interface RpgEntryBrandLogoProps {
|
||||
className?: string;
|
||||
decorative?: boolean;
|
||||
@@ -18,10 +20,19 @@ export function RpgEntryBrandLogo({
|
||||
aria-hidden={decorative || undefined}
|
||||
aria-label={decorative ? undefined : '陶泥儿 GENARRATIVE'}
|
||||
>
|
||||
<span className="platform-brand-logo__title">
|
||||
陶泥<span className="platform-brand-logo__title-suffix">儿</span>
|
||||
<img
|
||||
src={BRAND_ASSETS.taonierProductIp}
|
||||
alt=""
|
||||
aria-hidden="true"
|
||||
draggable={false}
|
||||
className="platform-brand-logo__image"
|
||||
/>
|
||||
<span className="platform-brand-logo__copy">
|
||||
<span className="platform-brand-logo__title">
|
||||
陶泥<span className="platform-brand-logo__title-suffix">儿</span>
|
||||
</span>
|
||||
<span className="platform-brand-logo__subtitle">GENARRATIVE</span>
|
||||
</span>
|
||||
<span className="platform-brand-logo__subtitle">GENARRATIVE</span>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3834,6 +3834,11 @@ test('desktop recommend page reuses compact workbench chrome', () => {
|
||||
expect(leftbar).toBeTruthy();
|
||||
expect(topbar).toBeTruthy();
|
||||
expect(leftbar?.querySelector('.creation-home-brand-lockup')).toBeTruthy();
|
||||
expect(
|
||||
leftbar
|
||||
?.querySelector('.platform-brand-logo__image')
|
||||
?.getAttribute('src'),
|
||||
).toBe('/branding/taonier-product-ip.png');
|
||||
expect(topbar?.querySelector('.creation-home-brand-lockup')).toBeNull();
|
||||
expect(
|
||||
within(leftbar as HTMLElement).getByRole('button', { name: '推荐' }),
|
||||
|
||||
@@ -331,7 +331,6 @@ const CREATION_HOME_NAV_ICON_SRC: Record<PlatformNavTab, string> = {
|
||||
profile: '/creation-home/nav-profile.png',
|
||||
};
|
||||
const CREATION_HOME_TOPBAR_ASSETS = {
|
||||
brandMascot: '/creation-home/brand-mascot.png',
|
||||
search: '/creation-home/topbar-search.png',
|
||||
wallet: '/creation-home/topbar-wallet.png',
|
||||
} as const;
|
||||
@@ -4926,13 +4925,6 @@ export function RpgEntryHomeView({
|
||||
) : null;
|
||||
const desktopBrandLockup: ReactNode = (
|
||||
<span className="creation-home-brand-lockup shrink-0">
|
||||
<img
|
||||
src={CREATION_HOME_TOPBAR_ASSETS.brandMascot}
|
||||
alt=""
|
||||
aria-hidden="true"
|
||||
draggable={false}
|
||||
className="creation-home-brand-lockup__art"
|
||||
/>
|
||||
<RpgEntryBrandLogo className="shrink-0" decorative />
|
||||
</span>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user