mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-19 15:26:59 +08:00
refactor(editor): toc dragging with std.dnd (#9883)
Close [BS-2458](https://linear.app/affine-design/issue/BS-2458/toc-dnd重构) ### What Changes - Refactor toc note card dnd with `std.dnd` - Extract note display mode change to command `changeNoteDisplayMode` - It will reorder notes when the display mode changed from `EdgelessOnly` to page mode visible (a.k.a `DocOnly` or `Both`)
This commit is contained in:
@@ -302,7 +302,7 @@ export async function assertVisibleBlockCount(
|
||||
// not only count, but also check if all the blocks are visible
|
||||
const locator = page.locator(`affine-${flavour}`);
|
||||
let visibleCount = 0;
|
||||
for (let i = 0; i < count; i++) {
|
||||
for (let i = 0; i < (await locator.count()); i++) {
|
||||
if (await locator.nth(i).isVisible()) {
|
||||
visibleCount++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user