chore(editor): remove page block feature flag (#10251)

This commit is contained in:
L-Sun
2025-02-18 09:25:05 +00:00
parent cedee0a1b2
commit e639f08b71
13 changed files with 30 additions and 81 deletions

View File

@@ -18,7 +18,6 @@ import {
DocModeProvider,
EditorSettingProvider,
EditPropsStore,
FeatureFlagService,
FontLoaderService,
ThemeProvider,
} from '@blocksuite/affine-shared/services';
@@ -399,11 +398,7 @@ export class EdgelessRootBlockComponent extends BlockComponent<
const run = () => {
const storedViewport = std.get(EditPropsStore).getStorage('viewport');
if (!storedViewport) {
const enablePageBlock = this.std
.get(FeatureFlagService)
.getFlag('enable_page_block');
if (!(enablePageBlock && pageBlockViewportFitAnimation())) {
if (!pageBlockViewportFitAnimation()) {
this.gfx.fitToScreen();
}
return;

View File

@@ -1,6 +1,6 @@
import {
changeNoteDisplayMode,
isPageBlock,
NoteConfigExtension,
} from '@blocksuite/affine-block-note';
import { EdgelessCRUDIdentifier } from '@blocksuite/affine-block-surface';
import type {
@@ -149,10 +149,6 @@ export class EdgelessChangeNoteButton extends WithDisposable(LitElement) {
.getFlag('enable_advanced_block_visibility');
}
private get _pageBlockEnabled() {
return this.doc.get(FeatureFlagService).getFlag('enable_page_block');
}
private get doc() {
return this.edgeless.doc;
}
@@ -348,6 +344,10 @@ export class EdgelessChangeNoteButton extends WithDisposable(LitElement) {
const onlyOne = len === 1;
const isDocOnly = displayMode === NoteDisplayMode.DocOnly;
const hasPageBlockHeader = !!this.edgeless.std.getOptional(
NoteConfigExtension.identifier
)?.edgelessNoteHeader;
const theme = this.edgeless.std.get(ThemeProvider).theme;
const buttonIconSize = { width: '20px', height: '20px' };
const buttons = [
@@ -378,10 +378,7 @@ export class EdgelessChangeNoteButton extends WithDisposable(LitElement) {
`
: nothing,
onlyOne &&
!isPageBlock(this.edgeless.std, note) &&
this._pageBlockEnabled &&
!this._advancedVisibilityEnabled
onlyOne && !note.isPageBlock() && !this._advancedVisibilityEnabled
? html`<editor-icon-button
aria-label="Display In Page"
.showTooltip=${displayMode === NoteDisplayMode.DocAndEdgeless}
@@ -536,7 +533,7 @@ export class EdgelessChangeNoteButton extends WithDisposable(LitElement) {
onlyOne ? this.quickConnectButton : nothing,
!isPageBlock(this.edgeless.std, this.notes[0])
!this.notes[0].isPageBlock() || !hasPageBlockHeader
? html`<editor-icon-button
aria-label="Size"
data-testid="edgeless-note-auto-height"