mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
chore(editor): remove page block feature flag (#10251)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user