Repository navigation
平板竖屏走抽屉,窄屏断点收成一处,设置页全屏、dvh 高度、抽屉焦点不丢 - #127
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Be3SZps2JjqvyrJ1vbLmni
…屉拉开焦点进侧栏、收起回菜单按钮 (#123) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Be3SZps2JjqvyrJ1vbLmni
菜单栏页不在 .window 里,审批按钮竖排的规则改挂 .window.is-narrow 之后就匹配不上了, 390 宽的菜单栏里批准和拒绝变成左右并排,摘要被挤窄。规则同时挂到 .menubar-page 上。 narrow.ts 的注释改成只管窄屏断点,右栏抽屉另有自己的断点。 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Be3SZps2JjqvyrJ1vbLmni
joesmart
force-pushed
the
joesmart/fix-tablet-drawer
branch
from
October 25, 2026 13:37
7055d96 to
8fd8d5e
Compare
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.
改了什么
packages/web/src/routes/narrow.ts,窄屏断点只写在这一处:width < 900。useNarrow/watchNarrow用matchMedia驱动is-narrow类,样式表只认这个类,不再写宽度@media。height: 100vh; height: 100dvh;,不支持 dvh 的浏览器会退回到 100vh。mobile-web.spec.ts新增平板竖屏、768/820、720 设置页和 390 焦点几组用例。12-today.spec.ts的 780 宽用例现在先拉开抽屉,再去点侧栏里的「团队」。为什么
抽屉阈值选 900。 我在 main 的三栏布局下量了聊天栏宽度,结果是视口减 272:
选 900 的理由:平板竖屏最宽是 834,横屏最窄是 1024,900 落在两者之间;边界处聊天栏 628,气泡不折行;现有
panel-drawer.spec.ts、top-notice.spec.ts在 900 宽要求侧栏常驻,这些用例不用改。断点为什么写在 JS。
@media读不到 CSS 变量,CSS 和 JS 要同源,只能由 JS 定这个数,再用类名告诉样式表。焦点为什么会掉到 body。 抽屉打开后,遮罩把侧栏以外的部分(包括菜单按钮)设成
inert,浏览器就把焦点从按钮挪到了 body。快速切换打开时记下的「回到哪」也就成了 body。怎么验证的
新用例在 main 的实现上(只换回
packages/web/src)全红:我还起了 mock 加 vite,用 Playwright 手点了一遍:
nav-open。390、768、820、1024 四个宽度的截图都放在 scratchpad,没进仓库。
没动的
felt.css里的@media (max-width: 960px)管的是牌桌内容的排布,不是窄屏模式切换,这次没并进来。Closes #123
🤖 Generated with Claude Code
https://claude.ai/code/session_01Be3SZps2JjqvyrJ1vbLmni