refactor(editor): adjust ui of surface-ref inner toolbar (#11129)

Close [BS-2803](https://linear.app/affine-design/issue/BS-2803/inserted-frame-ui%E8%B0%83%E6%95%B4)
Close [BS-2815](https://linear.app/affine-design/issue/BS-2815/inserted-group-ui调整)

### What Changes
- Add an inner toolbar for hovered `surface-ref-block`
- Simplify viewport related codes of `surface-ref-block`
- Expose popover floating options from `affine-menu-button`

https://github.com/user-attachments/assets/916b0a22-6271-4a6f-b338-6630e0426967
This commit is contained in:
L-Sun
2025-03-25 03:48:12 +00:00
parent 314e5795eb
commit a2e3d318ba
8 changed files with 382 additions and 452 deletions

View File

@@ -132,13 +132,13 @@ test('can open peek view for embedded frames', async ({ page }) => {
await page.locator('affine-surface-ref .affine-surface-ref').hover();
await page
.locator('.surface-ref-toolbar-container')
.locator('editor-icon-button[aria-label="Open doc"]')
.locator('affine-surface-ref-toolbar editor-menu-button[aria-label="Open"]')
.click();
await page
.locator('.surface-ref-toolbar-container')
.locator('editor-menu-action:has-text("center peek")')
.locator(
'affine-surface-ref-toolbar editor-menu-action[aria-label="Open in center peek"]'
)
.click();
// verify peek view is opened