mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-11-26 07:42:57 +03:00
## Description The Block Diff Playground modal (the dev-only 🧪 button) was portaled into `editor-host` via `container: this.host`. `editor-host` sets `isolation: isolate`, so the modal's z-index only applies inside that stacking context. Anything painted after the editor at the same level ends up on top of the modal — in practice the backlinks panel's "Show" button shows through right over the action buttons. Removing the `container` option lets `createLitPortal` fall back to its default (`document.body`), so the modal is no longer trapped under the editor's stacking context. Positioning is unaffected since it's still computed against the 🧪 button. To reproduce: run the web app in dev mode, open a doc that's long enough for the backlinks panel to sit behind the modal, click 🧪. ## Checklist - [x] I have signed the [AFFiNE Contributor License Agreement](https://cla-assistant.io/toeverything/AFFiNE) — required before merge; the `license/cla` check must be green ([how it works](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md#sign-the-cla-first)) - [x] The PR targets the `canary` branch and its title follows [Conventional Commits](https://www.conventionalcommits.org/) - [ ] Tests are added or updated where it makes sense - [x] `yarn lint` and `yarn typecheck` pass locally - [ ] If the PR code includes AI-generated edits, I have carefully reviewed it to ensure that the scope of the PR is consistent with what is claimed in the title and description, and that there are no redundant or invalid implementations. - [x] I agree that maintainers may close the PR without discussion if they consider the code quality to be too low. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Refactor** * Updated the playground portal to use its default container behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai -->