Skip to content

Feature/share mask/imagine10255#17

Open
imagine10255 wants to merge 3 commits into
mainfrom
feature/share-mask/imagine10255
Open

Feature/share mask/imagine10255#17
imagine10255 wants to merge 3 commits into
mainfrom
feature/share-mask/imagine10255

Conversation

@imagine10255

Copy link
Copy Markdown
Member

No description provided.

imagine10255 and others added 3 commits June 7, 2026 04:01
以 module-level store (maskStore) 協調全域唯一一張遮罩 (SharedMask),
取代每層 Modal 各自渲染遮罩的舊行為:

- 遮罩永遠卡在「最上層 Modal 正下方」(z-index = 最上層 - 1),
  最上層清楚顯示、其餘下層被壓暗,疊再多層也不會越疊越黑。
- 疊層/關層只改 z-index、不增減 DOM、opacity 維持不變 → 換層不閃爍。
- 退場一開始 (isPresent=false) 即注銷,遮罩同步下移到上一層或跟著淡出,
  不再等退場動畫播完才跳;drawer z-index 保留到 unmount 以蓋住退場動畫。
- 登記改用 layout effect,避免開新層那一 frame 下層瞬間沒被壓暗。

可用 isSharedMask=false 回到每層各自渲染遮罩的舊行為。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant