-
-
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): copilot selection widget #6497
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.
I think we should land all edgeless AI features in different PRs, can we make drag selection into a feature flag and land this PR earlier?
I was thinking of using stacked PR. Different features would be in different PRs but they all base on this PR and this PR will get merged once all its sub-PRs is ready. |
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.
Screen.Recording.2024-03-22.at.2.53.47.PM.mov
After releasing the ai selection box, it will unexpectedly select an element on the canvas.
export const AFFINE_EDGELESS_AI_WIDGET = 'affine-edgeless-ai-widget'; | ||
|
||
@customElement('affine-edgeless-ai-widget') | ||
export class EdgeelssAIWidget extends WidgetElement<EdgelessRootBlockComponent> { |
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.
typo
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.
The ai-tool.ts
sounds too broad. Making it CopilotSelectionTool
and 'affine-copilot-selection-widget'
here should fit better with current tools naming.
(Let's avoid the concept of "ai" in naming since we are using unified "copilot" concept)
packages/blocks/src/_common/types.ts
Outdated
@@ -239,7 +243,8 @@ export type EdgelessTool = | |||
| ConnectorTool | |||
| EraserTool | |||
| FrameTool | |||
| FrameNavigatorTool; | |||
| FrameNavigatorTool | |||
| AITool; |
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.
CopilotSelectionTool
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.
Thanks for the feat! Should land this after some naming updates.
## Features - toeverything/blocksuite#6544 @golok727 - toeverything/blocksuite#6543 @golok727 - toeverything/blocksuite#6536 @donteatfriedrice - toeverything/blocksuite#6497 @doouding - toeverything/blocksuite#6514 @regischen - toeverything/blocksuite#6523 @donteatfriedrice - toeverything/blocksuite#6530 @zzj3720 - toeverything/blocksuite#6526 @fourdim - toeverything/blocksuite#6532 @donteatfriedrice - toeverything/blocksuite#6493 @golok727 - toeverything/blocksuite#6529 @zzj3720 - toeverything/blocksuite#6528 @zzj3720 - toeverything/blocksuite#6509 @zzj3720 - toeverything/blocksuite#6525 @doodlewind - toeverything/blocksuite#6502 @donteatfriedrice - toeverything/blocksuite#6489 @Flrande ## Bugfix - toeverything/blocksuite#6558 @fourdim - toeverything/blocksuite#6556 @fourdim - toeverything/blocksuite#6547 @fundon - toeverything/blocksuite#6537 @golok727 - toeverything/blocksuite#6531 @donteatfriedrice - toeverything/blocksuite#6524 @doodlewind - toeverything/blocksuite#6519 @regischen - toeverything/blocksuite#6517 @doodlewind - toeverything/blocksuite#6516 @doodlewind - toeverything/blocksuite#6510 @donteatfriedrice - toeverything/blocksuite#6511 @congzhou09 - toeverything/blocksuite#6507 @doouding - toeverything/blocksuite#6500 @fourdim - toeverything/blocksuite#6486 @congzhou09 - toeverything/blocksuite#6495 @donteatfriedrice - toeverything/blocksuite#6488 @Saul-Mirone - toeverything/blocksuite#6482 @Flrande - toeverything/blocksuite#6558 @fourdim ## Refactor - toeverything/blocksuite#6548 @doodlewind - toeverything/blocksuite#6522 @doodlewind - toeverything/blocksuite#6518 @regischen - toeverything/blocksuite#6521 @Saul-Mirone ## Misc - toeverything/blocksuite#6557 @fourdim - toeverything/blocksuite#6546 @Flrande - docs: update package desc - toeverything/blocksuite#6527 @fourdim - toeverything/blocksuite#6505 @Brooooooklyn - toeverything/blocksuite#6503 @fourdim - v0.13.0 - toeverything/blocksuite#6496 @doodlewind - toeverything/blocksuite#6562 @donteatfriedrice
) { | ||
const isRightButton = isRightButtonPressed(pointEvt); | ||
const targetTool = ( | ||
isRightButton || metaKeyPressed |
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.
@doouding
Here may should be "isRightButton && metaKeyPressed" if you meant rightbutton-dragging with ctrl or command (mac) pressed.
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.
Actuallly not, here I mean right button dragging OR meta key pressed.
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.
Actuallly not, here I mean right button dragging OR meta key pressed.
Oh I thought right button dragging could pan too. I take back.
Press ctrl or command (mac) when dragging to activate AI.