Feat/侧边栏响应式折叠 — 桌面三态切换 + 移动抽屉ponsive collapse - #166
Open
intfoo wants to merge 5 commits into
Open
Conversation
- 桌面端(≥768px)三态:展开(14rem)↔图标条(3.5rem)↔隐藏(0) 单按钮循环切换,localStorage 持久化 图标条态:导航仅 icon + CSS tooltip,指数轮播,RadioTower 实时行情按钮 - 移动端(<768px)抽屉模式:FAB 汉堡按钮,80vw/max 320px 点遮罩/选导航/ESC 关闭,body 滚动锁 - Layout.tsx 从 698 行瘦身为 80 行壳 侧边栏内容下沉到 components/sidebar/ 8 个文件 SSE 订阅/断线提示/监控徽标轮询保留在 Layout - 共享逻辑抽取:useVisibleNavItems/useRealtimeToggle/useDataSyncStatus - .gitignore 忽略 docs/superpowers/ 和 .codebuddy.md
- tooltip 改用 fixed 定位,绕开 aside overflow-hidden 限制 - nav 加 overflow-x-hidden 消除底部横向滚动条 - 指数轮播名称改为前2字简写,加 overflow-hidden 防溢出
None 档时前端 tierRank<0 直接 return 不调 API,导致开关无反应。 设置页直接调 API 让后端校验(返回 realtime_allowed: false),有响应。 现统一为直接调 toggleQuote.mutateAsync,后端校验档位。
P2: 首次渲染内容闪烁 — isFirstRender 跳过首次 effect P3: hoverTimer 卸载未清理 — 加独立 cleanup effect P3: active 态图标颜色不一致 — text-foreground 改 text-accent P3: useRealtimeToggle _prefs 未使用参数 — 移除 P3: package-lock.json npm 产物 — 删除并加 .gitignore P3: widthMap 硬编码 — 加注释说明对应 WIDTH_CLASS
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.
PR 描述