Repository navigation
fix(ai-chat-turbo-engine): keep the peek across the gap to a row submenu - #283
Merged
Merged
Conversation
A row menu and the flyout it opens often sit more than 32px apart, and the gap hits page blank space, so the adoption threshold missed the hand-off and the hide delay armed mid-gesture. Widen adoption for the target a departure names, treat the 96px corridor around an adopted layer as still the peek, and stop recording parked-transparent or off-screen menus as page-owned popovers.
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.
Result
探出面板不再在走向历史记录二级菜单时误收回,补上 0.23.19 仍漏掉的三种情况。
Why 0.23.19 still failed
按矩形位置认领(32px 邻居 + 指针罩住)在三个真实场景里失效:
withinPeekBand判否,宽限点着;opacity: 0或排在视口外),探出开始时的快照把它当成页面原有弹层,真正打开后被永久拒绝。Change
SIDEBAR_PEEK_APPROACH_MARGIN_PX = 96:pointerout明确指向的目标按 96px 交接余量认领,随机页面浮层走不到这条路径(它们不是从面板离开的 related target)。withinPeekLayers():指针落在已认领层 96px 走廊内也算仍在面板上,慢速跨过空隙不触发收回。AdoptPeekLayerOptions { margin, vouched }:指针落在框内、或离开面板时走向的框,由指针自证,跳过「页面原有弹层」否决;几何仍是相邻或罩住指针。isVisiblePopover()拒绝opacity: 0与完全在视口外的矩形,预挂菜单不再进快照。Evidence
sidebar-peek.ts上全部失败,修复后全部通过:keeps the peek when the pointer pauses in the gap beside a menuadopts a row menu the site parked transparent before the peekadopts a row menu the site parked off screen before the peekadopts the box a departure from the peek walks intopnpm check全绿:62 文件 / 975 用例 / build 成功。Not verified
没有在真实站点上手动复现(本次只有 DOM 级用例)。
Closes #282