mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
feat(editor): by default render code iframe for html preview (#12848)
#### PR Dependency Tree * **PR #12848** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a feature flag to enable or disable web container functionality for code block previews. - **Improvements** - Code block HTML previews now support an alternative rendering method based on the new feature flag, enhancing flexibility. - **Chores** - Updated feature flag settings by removing an obsolete flag and adding the new web container flag. - **Tests** - Simplified code block preview tests for faster and more direct validation of HTML preview content. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -273,15 +273,6 @@ export const AFFINE_FLAGS = {
|
||||
configurable: isBetaBuild || isCanaryBuild,
|
||||
defaultState: false,
|
||||
},
|
||||
enable_code_block_html_preview: {
|
||||
category: 'affine',
|
||||
displayName:
|
||||
'com.affine.settings.workspace.experimental-features.enable-code-block-html-preview.name',
|
||||
description:
|
||||
'com.affine.settings.workspace.experimental-features.enable-code-block-html-preview.description',
|
||||
configurable: isCanaryBuild,
|
||||
defaultState: isCanaryBuild,
|
||||
},
|
||||
enable_adapter_panel: {
|
||||
category: 'affine',
|
||||
displayName:
|
||||
@@ -291,6 +282,14 @@ export const AFFINE_FLAGS = {
|
||||
configurable: isCanaryBuild,
|
||||
defaultState: false,
|
||||
},
|
||||
enable_web_container: {
|
||||
category: 'blocksuite',
|
||||
bsFlag: 'enable_web_container',
|
||||
displayName: 'Enable Web Container',
|
||||
description: 'Enable web container for code block preview',
|
||||
defaultState: false,
|
||||
configurable: true,
|
||||
},
|
||||
} satisfies { [key in string]: FlagInfo };
|
||||
|
||||
// oxlint-disable-next-line no-redeclare
|
||||
|
||||
Reference in New Issue
Block a user