Repository navigation
nav classic 砖改正方形 + 底部空白收敛(两条小修) - #55
Merged
Merged
Conversation
- 砖高改为与砖宽相等(141.5/113/92),删除 CLASSIC_TILE_HEIGHTS;图标盒降到边长 46%(65/52/42),名称与网址单行截断并补 title,large 内距收到 py-2 - 正文 pb-96 → pb-10,不再为右下角坞预留空白 - 同步更新测试里写死的砖高、图标盒与底部留白断言 Checkpoint: 2IMpKHfaMDxWQg3K2lWVo
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
title,保证正方形里装得下、不溢出、不把砖撑高。pb-96(384px)收敛到pb-10(40px),与分类间距同量级;不再为右下角坞预留空白(坞只是最右侧 60px 的固定浮层,宽屏上与成块居中的砖并不重叠)。Changes
web/src/lib/grid-columns.ts:删除CLASSIC_TILE_HEIGHTS,砖高改由CLASSIC_TILE_SIZES一个来源供给;CLASSIC_TILE_HEIGHT_CLASS改为h-[141.5px] / h-[113px] / h-[92px],与宽度类同值(仍是源码字面量,满足 Tailwind JIT)。classicGridMetrics的行组宽度与间距算法未动,8 列仍是maxWidth: 1468px。web/src/components/link-grid.tsx:CLASSIC_ICON_BOX改为 65 / 52 / 42(边长的 46%,三档同比例);classic 分支的名称与网址统一truncate单行截断并恒给title(普通模式悬停也能看全称;compact/wide口径不变);大号砖上下内距py-3→py-2,逐档余量 6.5 / 3 / 4px 写入注释。web/src/components/public-page.tsx:<main>的pb-96→pb-10,并重写上方注释说明「40px 为常规收尾间距、不为坞预留」。web/src/components/home-edit-board.tsx、web/src/lib/types.ts:注释口径改为正方形;编辑模式本就复用linkTileClassName/LinkTileContent,零代码改动。grid-columns.test.ts(改为校验宽高类同值)、link-grid.test.tsx(三档新尺寸与图标盒,新增「单行截断 +title」「showUrl=false只剩两个子元素」用例)、public-page.test.tsx(pb-10与新砖尺寸)、public-edit-mode.test.tsx(砖与「+」砖尺寸)。Testing
pnpm typecheck、pnpm format:check、pnpm build通过;pnpm lint无新增告警(仅既有的 33 条无关提示)。pnpm test:worker 221 项、web 357 项全部通过。pnpm build:web+wrangler dev托管web/dist,Chrome CDP,截图与量测数据在/tmp未入库):三档砖 141.5×141.5 / 113×113 / 92×92,图标盒 65 / 52 / 42,砖内内容 117 / 96 / 82(上下各余 3.3 / 1.5 / 2px),无溢出、无裁切;1440 视口每行 8 块、末行左缘与满行首砖对齐;滚到底最后一块下方 41px、main实测padding-bottom: 40px,390 宽同样;关闭「显示网址」时砖内只剩图标与名称且整体居中;编辑模式砖与「+」砖同尺寸,点砖开编辑弹窗、Esc 关闭后仍留在编辑模式,拖拽换位成功无报错。