Skip to content

Conversation

TatianaFomina
Copy link
Contributor

@TatianaFomina TatianaFomina commented Apr 21, 2024

Convert to now also available in Block Tunes!

image

image

@@ -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());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// console.log(this.getConvertToItems());

*
* @param currentToolName - current block tool name
*/
private getConvertToItems(currentToolName: string): TunesMenuConfigItem[] {
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, fixed

@TatianaFomina TatianaFomina requested a review from gohabereg April 21, 2024 18:08
@TatianaFomina TatianaFomina requested a review from neSpecc April 22, 2024 19:32
Base automatically changed from feat/delimiter to next April 22, 2024 19:38
*
* @param currentBlock - block we are about to open block tunes for
*/
private async getConvertToItems(currentBlock: Block): Promise<PopoverItemDefaultParams[]> {
Copy link
Member

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

Copy link
Contributor Author

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

@TatianaFomina TatianaFomina merged commit 7821e35 into next Apr 27, 2024
@TatianaFomina TatianaFomina deleted the feat/new-convert-to branch April 27, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants