chore(editor): add feature flag to embed doc with alias (#11797)

This commit is contained in:
L-Sun
2025-04-18 07:39:16 +00:00
parent 9c02512d7c
commit 3264e65980
6 changed files with 38 additions and 5 deletions

View File

@@ -13,6 +13,7 @@ import {
ActionPlacement,
DocDisplayMetaProvider,
EditorSettingProvider,
FeatureFlagService,
type LinkEventType,
type OpenDocMode,
type ToolbarAction,
@@ -215,7 +216,12 @@ const conversionsActionGroup = {
run(ctx) {
const block = ctx.getCurrentBlockByType(EmbedLinkedDocBlockComponent);
if (isGfxBlockComponent(block)) {
if (
ctx.std
.get(FeatureFlagService)
.getFlag('enable_embed_doc_with_alias') &&
isGfxBlockComponent(block)
) {
const editorSetting = ctx.std.getOptional(EditorSettingProvider);
editorSetting?.set?.(
'docDropCanvasPreferView',

View File

@@ -4,6 +4,7 @@ import { EmbedSyncedDocModel } from '@blocksuite/affine-model';
import {
ActionPlacement,
EditorSettingProvider,
FeatureFlagService,
type LinkEventType,
type OpenDocMode,
type ToolbarAction,
@@ -142,7 +143,12 @@ const conversionsActionGroup = {
label: 'Card view',
run(ctx) {
const block = ctx.getCurrentBlockByType(EmbedSyncedDocBlockComponent);
if (isGfxBlockComponent(block)) {
if (
ctx.std
.get(FeatureFlagService)
.getFlag('enable_embed_doc_with_alias') &&
isGfxBlockComponent(block)
) {
const editorSetting = ctx.std.getOptional(EditorSettingProvider);
editorSetting?.set?.(
'docDropCanvasPreferView',