-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(block tunes): Conversion Menu in Block Tunes #2692
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
Conversation
@@ -108,6 +110,7 @@ export default class BlockSettings extends Module<BlockSettingsNodes> { | |||
public open(targetBlock: Block = this.Editor.BlockManager.currentBlock): void { | |||
this.opened = true; | |||
|
|||
// console.log(this.getConvertToItems()); |
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.
// console.log(this.getConvertToItems()); |
* | ||
* @param currentToolName - current block tool name | ||
*/ | ||
private getConvertToItems(currentToolName: string): TunesMenuConfigItem[] { |
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.
Looks like the result could be cached somewhere
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.
Good point, fixed
* | ||
* @param currentBlock - block we are about to open block tunes for | ||
*/ | ||
private async getConvertToItems(currentBlock: Block): Promise<PopoverItemDefaultParams[]> { |
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.
It seems the comment about cache is relevant again now
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.
can not cache. "Convert to" items list is different every time. For each block there will be different subset of tools it can be converted to. It depends on current block type and data
Convert to
now also available in Block Tunes!