-
-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(edgeless): frame container #8048
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Your org has enabled the Graphite merge queue for merging into masterAdd the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit e82211e. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 3 targetsSent with 💌 from NxCloud. |
65329b8
to
ccd2fed
Compare
ccd2fed
to
beb1913
Compare
beb1913
to
d555905
Compare
d555905
to
8a56ddc
Compare
|
8a56ddc
to
474d500
Compare
b3b72b3
to
71ac44e
Compare
71ac44e
to
0e2b1a0
Compare
ff78ab8
to
73e9e90
Compare
31fded6
to
230030f
Compare
ae13fde
to
a5a3bc8
Compare
a5a3bc8
to
cd371e8
Compare
cd371e8
to
a0a2d99
Compare
50b98dc
to
2571861
Compare
Merge activity
|
This PR introduces a new interactive feature for **Frame**, which determines whether to add elements to the Frame based on the mouse position during dragging. It also optimizes the behavior of **Group** and **MindMap** within the **Frame**. https://github.com/user-attachments/assets/11497c76-7965-41ac-9c9b-b734b116861d ## What changes - Features: - add element to frame according dragging point, [BS-1109](https://linear.app/affine-design/issue/BS-1109/[frame-improvements]-yuan素拖入拖出-frame-的判定依据以鼠标拖动yuan素时的位置是否进入-frame) - support nested group or frame - select frame when mouse click on area of frame, [BS-1088](https://linear.app/affine-design/issue/BS-1108/[frame-improvements]-frame-点击可选中区域调整为-frame-的全部区域) - update children after adjust size of Frame - Refactor - `FrameBlockModel` and `FrameManager` - add `childElementIds` field to props of `affine:frame`, [BS-1028](https://linear.app/affine-design/issue/BS-1208/frame-block-model-新增-childelements-字段,数据迁移方案rfc) - Integrate `FrameBlockModel` with the `GfxContainerElement` interface. #8059 - Implemente some methods to maintain child relationship in `FrameManager` - `root-block/edgeless/utils/tree.ts` - two new utility functions based on the tree structure of `GfxContainerElement` - `edgeless/clipboard.ts` - refactor `sortEdgelessElements` function based on element dependency tree - create pasted element based on the dependency of elements, which are sorted by `sortEdgelessElements` - move the ` computation of position of pasted elements before element creation - Bug Fixes - Fixed descendant elements of group not moved when moving frame. - Fixed relationship broken when create linked doc on edgeless elements. - Fixed relationship broken when pasting edgeless elements. - Fixed frame block missing in `surface-ref` in page mode when importing snapshot. [BS-1197](https://linear.app/affine-design/issue/BS-1197/文档模式下导入的-embed-frame-block缺失) - A series e2e tests for frame ## Change Need in AFFiNE Side - change function name from `getElementsInFrame` to `getElementsInFrameBound` in files: - https://github.com/toeverything/AFFiNE/blob/canary/packages/frontend/core/src/blocksuite/presets/ai/_common/selection-utils.ts#L59 - https://github.com/toeverything/AFFiNE/blob/canary/packages/frontend/core/src/blocksuite/presets/ai/_common/selection-utils.ts#L109 - https://github.com/toeverything/AFFiNE/blob/canary/packages/frontend/core/src/blocksuite/presets/ai/utils/selection-utils.ts#L65 - https://github.com/toeverything/AFFiNE/blob/canary/packages/frontend/core/src/blocksuite/presets/ai/utils/selection-utils.ts#L216
2571861
to
e82211e
Compare
This PR is to remove the previous `frame.spec.ts` which has been splited into `tests/edgeless/*.spec.ts` in PR #8048
This PR introduces a new interactive feature for Frame, which determines whether to add elements to the Frame based on the mouse position during dragging. It also optimizes the behavior of Group and MindMap within the Frame.
CleanShot.2024-08-30.at.10.20.18.mp4
What changes
FrameBlockModel
andFrameManager
childElementIds
field to props ofaffine:frame
, BS-1028FrameBlockModel
with theGfxContainerElement
interface. feat: add gfx container symbol and interface #8059FrameManager
root-block/edgeless/utils/tree.ts
GfxContainerElement
edgeless/clipboard.ts
sortEdgelessElements
function based on element dependency treesortEdgelessElements
surface-ref
in page mode when importing snapshot. BS-1197Change Need in AFFiNE Side
getElementsInFrame
togetElementsInFrameBound
in files: