feat(sw): remove no-logo case from SW Header Logo story
Deploy Storybook / deploy (push) Successful in 2m17s
Deploy Storybook / deploy (push) Successful in 2m17s
Viewer Logo story keeps its no-logo case. Viewer test expects 2 SW headers.
This commit is contained in:
1 parent
fa7747cdbb
commit
6780abb42d
2 files changed
+4
-4
No files matched your search
@@ -449,7 +449,7 @@ if (comparison.reference) {
|
||||
}
|
||||
check('header height and menu row unchanged with / without logo', [none, src, node].every(item => item.height === 52 && item.fileOpenY === none.fileOpenY), [none, src, node].map(item => item.height + '/' + item.fileOpenY).join(' '))
|
||||
{
|
||||
// SWHeader keeps its 80px home area and slant without a logo (unlike the viewer).
|
||||
// SWHeader keeps its 80px home area and slant with a logo (2026-10-26: its Logo story has no "로고 없음" case).
|
||||
const sw = await newPage(1920, 1000)
|
||||
await sw.goto(`${storybook}/iframe.html?id=sw-header--logo-slot&viewMode=story`)
|
||||
await sw.waitForSelector('[data-logo-case] .hm-sw-header:visible')
|
||||
@@ -457,7 +457,7 @@ if (comparison.reference) {
|
||||
const home = header.querySelector('.hm-sw-header__home')
|
||||
return { width: home ? Math.round(home.getBoundingClientRect().width) : 0, slant: !!home?.querySelector('.hm-sw-header__home-bg') }
|
||||
}))
|
||||
check('SWHeader: 80px home area and slant with and without a logo', homes.length === 3 && homes.every(home => home.width === 80 && home.slant), JSON.stringify(homes))
|
||||
check('SWHeader: 80px home area and slant with a logo', homes.length === 2 && homes.every(home => home.width === 80 && home.slant), JSON.stringify(homes))
|
||||
await sw.close()
|
||||
}
|
||||
for (const [index, name] of [[0, 'none'], [1, 'src'], [2, 'element']]) {
|
||||
|
||||
@@ -441,10 +441,10 @@ export function ComposedDemo() {
|
||||
}
|
||||
|
||||
// 2026-10-22 (user request): sidebar "Logo" (ID sw-header--logo-slot kept), page title "SW Header — 로고". Same cases,
|
||||
// order and layout as SW/Viewer › Logo: 로고 없음 → logoSrc → logo (element), each header fluid up to 1440px (no
|
||||
// order and layout as SW/Viewer › Logo: logoSrc → logo (element), each header fluid up to 1440px (no
|
||||
// scroller). The SW Header home click (callbacks.onHomeClick) is kept.
|
||||
// 2026-10-26 (user request): the "로고 없음" case is removed here only; SW/Viewer › Logo keeps it.
|
||||
const LOGO_CASES: { title: string; props: Partial<SWHeaderProps> }[] = [
|
||||
{ title: "로고 없음 (기본)", props: { logoSrc: undefined, logoAlt: undefined } },
|
||||
{ title: "logoSrc (이미지 URL)", props: { logoSrc: placeholderLogo, logoAlt: "임시 로고" } },
|
||||
{ title: "logo (요소)", props: { logo: <svg viewBox="0 0 32 17" width="32" height="17" aria-hidden="true"><rect x="0.5" y="0.5" width="31" height="16" rx="3" fill="none" stroke="#fff" /><text x="16" y="12.5" fill="#fff" fontSize="10" fontWeight="700" textAnchor="middle">LOGO</text></svg>, logoAlt: "예시 로고" } },
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user