-
-
Notifications
You must be signed in to change notification settings - Fork 403
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): group #5069
feat(edgeless): group #5069
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All EdgelessElement all have
group
property which is updated in runtime. for searching from child to parent.
This should not be persisted into CRDT.
of course |
030fcdb
to
697d8d1
Compare
@@ -202,12 +209,30 @@ export class EdgelessComponentToolbar extends WithDisposable(LitElement) { | |||
); | |||
} | |||
|
|||
private _getCreateGroupButton() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these _getFoo
template getters are not align with our best practice. The expected usage should be using pure functions like function CreateGroundButton(props) {}
for wrapping these components. See the "Function Components
" part in lit docs.
...ges/blocks/src/page-block/edgeless/components/component-toolbar/release-from-group-button.ts
Show resolved
Hide resolved
7eed11b
to
1c30a3a
Compare
1c30a3a
to
c10f70d
Compare
packages/blocks/src/page-block/edgeless/components/component-toolbar/component-toolbar.ts
Outdated
Show resolved
Hide resolved
packages/blocks/src/page-block/edgeless/components/text/edgeless-group-title-editor.ts
Outdated
Show resolved
Hide resolved
packages/blocks/src/surface-block/elements/group/group-element.ts
Outdated
Show resolved
Hide resolved
122270b
to
37d9e7f
Compare
close #4999
notes
children
of Y.Map field.surfaceBlock
add privategroupMap
property for tracking child to it's group. And providegetGroup
andsetGroup
method._activeGroup
property, which is to track current activated group for interactiongroupRootId
constant, virtual root group id.Because Y.Map doesn't support Set value, so here using array
just make a update size test
100 shape elements
50 shape elements
10 shape Elements
2 shape Elements
we can see that when group size is becoming larger, the Group operation size of Y.Map is becoming larger. But it's updating patch size is constantly small.
However the updating patch size of Array is also becoming larger.
Besides if type is array, the searching would also be inefficient.
So maybe Y.Map is good choice?
@doodlewind