mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-02 10:10:42 +08:00
77c0b2ef47
## Summary Update the edgeless shape text editor to resize mind map node text bounds while IME composition is in progress. ## Changes - listen to `compositionupdate` on the inline editor container - trigger `_updateElementWH()` on `compositionupdate` and `compositionend` - keep text box dimensions in sync before composition is committed ## Testing - Not run locally: `pnpm` is not available in this environment, so package build/tests could not be executed here. Fixes #11515 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Editor mounting tolerates missing/null elements and validates input to avoid errors. * Text creation/update consistently targets the refreshed element to prevent mismatches. * Inline editor listens for IME composition events and schedules layout/size recalculation (with proper cleanup) so sizing stays in sync. * **Tests** * Added an integration test verifying layout/size updates during IME composition events. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com> Co-authored-by: DarkSky <darksky2048@gmail.com>
@blocksuite/integration-test
Integration test for BlockSuite.
Running Tests
You can run all integration tests using:
cd blocksuite/integration-test
yarn test:unit
To run a specific test or test file, use the -t flag with a test name pattern:
# Run a specific test
yarn test:unit -t "should access turbo renderer instance"
# Run all tests in a specific file
yarn test:unit src/__tests__/edgeless/viewport-renderer.spec.ts
For debugging tests with the Playwright debugger:
yarn test:debug
yarn test:debug -t "should access turbo renderer instance"