-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ratewise): 平板 ≥1024 兩欄佈局適配(#594 二階) #643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
s123104
merged 1 commit into
experiment/ratewise-product-2026h2
from
fix/594-tablet-two-column
Jul 6, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@app/ratewise': patch | ||
| --- | ||
|
|
||
| 平板與桌面(≥1024px)佈局改善:首頁換算器改兩欄(左欄換算核心、右欄常用貨幣與全部幣種)、隱私政策頁目錄轉左側錨點欄、幣別匯率頁六段內容轉寬版排列(快速答案與 CTA 並排、金額頁常見金額列表全幅),大幅減少寬視口留白;手機與直向平板佈局零變化。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| /** | ||
| * issue #594 二階平板適配截圖矩陣: | ||
| * {首頁 v1, 首頁 v2, guide, privacy, jpy-twd} × {768×1024, 1024×768, 1440×900, 390×844, 375×667}。 | ||
| * 同時蒐集 console error。輸出至 repo 根 screenshots/,檔名前綴由 PHASE 環境變數控制(before/after)。 | ||
| * 用法:PHASE=before node scripts/qa/issue-594-screenshot-matrix.mjs(需先啟動 preview :4173) | ||
| */ | ||
|
|
||
| import { chromium } from '@playwright/test'; | ||
| import { mkdirSync } from 'node:fs'; | ||
| import { join, dirname } from 'node:path'; | ||
| import { fileURLToPath } from 'node:url'; | ||
|
|
||
| const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..', '..'); | ||
| const OUT_DIR = join(ROOT, 'screenshots'); | ||
| const BASE = process.env.BASE_URL ?? 'http://localhost:4173'; | ||
| const PHASE = process.env.PHASE ?? 'before'; | ||
|
|
||
| const PAGES = [ | ||
| ['home-v1', '/ratewise/'], | ||
| ['home-v2', '/ratewise/?converter=v2'], | ||
| ['guide', '/ratewise/guide/'], | ||
| ['privacy', '/ratewise/privacy/'], | ||
| ['jpy-twd', '/ratewise/jpy-twd/'], | ||
| ]; | ||
| const VIEWPORTS = [ | ||
| [768, 1024], | ||
| [1024, 768], | ||
| [1440, 900], | ||
| [390, 844], | ||
| [375, 667], | ||
| ]; | ||
|
|
||
| mkdirSync(OUT_DIR, { recursive: true }); | ||
|
|
||
| const browser = await chromium.launch(); | ||
| const consoleErrors = []; | ||
|
|
||
| for (const [width, height] of VIEWPORTS) { | ||
| const isMobile = width < 768; | ||
| const context = await browser.newContext({ | ||
| viewport: { width, height }, | ||
| isMobile, | ||
| hasTouch: isMobile, | ||
| deviceScaleFactor: 2, | ||
| }); | ||
| await context.addInitScript(() => { | ||
| // 跳過啟動畫面等待,穩定截圖內容。 | ||
| sessionStorage.setItem('ratewise:splash-shown', '1'); | ||
| }); | ||
|
|
||
| for (const [name, path] of PAGES) { | ||
| const page = await context.newPage(); | ||
| const label = `${name}-${width}x${height}`; | ||
| page.on('console', (message) => { | ||
| if (message.type() === 'error') { | ||
| consoleErrors.push(`[${label}] ${message.text()}`); | ||
| } | ||
| }); | ||
| page.on('pageerror', (error) => { | ||
| consoleErrors.push(`[${label}] pageerror: ${error.message}`); | ||
| }); | ||
|
|
||
| await page.goto(`${BASE}${path}`, { waitUntil: 'networkidle' }); | ||
| await page.waitForTimeout(1200); | ||
| await page.screenshot({ path: join(OUT_DIR, `594-${PHASE}-${label}.png`) }); | ||
| await page.close(); | ||
| console.log(`captured 594-${PHASE}-${label}.png`); | ||
| } | ||
| await context.close(); | ||
| } | ||
|
|
||
| await browser.close(); | ||
|
|
||
| // 已知基線問題:SSG hydration React #418(基底同樣出現,與本次無關)。 | ||
| const KNOWN_BASELINE = /Minified React error #418/; | ||
| const newErrors = consoleErrors.filter((entry) => !KNOWN_BASELINE.test(entry)); | ||
| console.log(`\nknown baseline hydration #418: ${consoleErrors.length - newErrors.length}`); | ||
| if (newErrors.length > 0) { | ||
| console.error(`console errors (excluding known baseline): ${newErrors.length}`); | ||
| for (const entry of newErrors) console.error(entry); | ||
| process.exit(1); | ||
| } | ||
| console.log('console errors (excluding known baseline): 0'); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.