Repository navigation
compact 条目放大 24px 图标+15px 字 + 240px 成块居中 + 淡悬停底色 - #54
Merged
todosdev[bot] merged 2 commits intoNov 8, 2026
Merged
Conversation
…8-7873-b75e-2759ca68e391 # Conflicts: # web/src/components/home-edit-board.tsx # web/src/components/link-grid.tsx
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
Changes
web/src/components/link-grid.tsxLINK_GRID_CLASS.compact→grid grid-cols-[repeat(auto-fill,240px)] content-start justify-center gap-x-3 gap-y-2:240px 轨道钉死条目宽度,轨道数即「成块列数」,justify-center居中整组轨道;纯 CSS,无需ResizeObserver。LINK_ICON_BOX.compact20→24(图标盒与SiteIcon的size同源)。linkTileClassName("compact"):内距/间距改为px-3 py-2.5+gap-2.5(44px 高的点选区),悬停由hover:bg-white/10 hover:text-white改为hover:bg-white/5。text-sm→text-[15px] leading-5,truncate保留;相关模块注释同步改写(不再描述「桌面 5 列」)。web/src/components/home-edit-board.tsx(编辑模式复用同一套砖壳,自动同步)PLACEHOLDER_CLASS收敛为{ wide: "min-h-[82px]" }:compact 的「+」砖高度改由 24px 图标 + 内距 + 1px 边框自然决定。size-4分支,统一size-6;「+」砖悬停改 5%,与普通砖壳同值,避免同属性工具类冲突。web/test/link-grid.test.tsx、web/test/public-page.test.tsxhover:bg-white/5且不含hover:text-white。Testing
pnpm test:worker 13 文件 / 221 测试、web 29 文件 / 356 测试,577 条全过;pnpm lint0 error、pnpm format:check、pnpm typecheck、pnpm build通过。构建产物确认 compact 与 wide 的列模板都正常生成;被脚本改写的web/public/icon-index.json已还原,不进 diff。wrangler dev+ CDP,1440×900 / 390×844)实测 compact:条目 240×44、图标盒 24、名称 15px/20px 行高;1440 下每行 4 条、块宽 996、左右留白各 110、末行首条与满行同列;390 下每行 1 条居中、两侧各 59、scrollWidth === innerWidth无横溢,长名称按省略号截断;悬停前后计算背景由透明变 5% 白、文字色保持rgba(255,255,255,0.9)。/tmp,仓库未新增任何证据文件。