mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 14:27:02 +08:00
fix(editor): banner of blookmark not shown in edgeless (#11796)
Close [BS-2651](https://app.graphite.dev/github/pr/toeverything/AFFiNE/11797/chore(editor)-add-feature-flag-to-embed-doc-with-alias) ### What Changes: - Fixed banner of edgeless embed bookmark is not shown - Add fallback bookmark creation with embed creation modal when there is not a `QuickSearchProvider` in blocksuite playground - Add tests for embed blookmark and embed github block in edgeless
This commit is contained in:
@@ -16,7 +16,6 @@ export const insertLinkByQuickSearchCommand: Command<
|
||||
const { std } = ctx;
|
||||
const quickSearchService = std.getOptional(QuickSearchProvider);
|
||||
if (!quickSearchService) {
|
||||
next();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,11 @@ import { ThemeProvider } from '@blocksuite/affine-shared/services';
|
||||
import { getHostName } from '@blocksuite/affine-shared/utils';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||
import { OpenInNewIcon } from '@blocksuite/icons/lit';
|
||||
import { BlockSelection, ShadowlessElement } from '@blocksuite/std';
|
||||
import {
|
||||
BlockSelection,
|
||||
isGfxBlockComponent,
|
||||
ShadowlessElement,
|
||||
} from '@blocksuite/std';
|
||||
import { html } from 'lit';
|
||||
import { property } from 'lit/decorators.js';
|
||||
import { classMap } from 'lit/directives/class-map.js';
|
||||
@@ -64,6 +68,7 @@ export class BookmarkCard extends SignalWatcher(
|
||||
error: this.error,
|
||||
[style]: true,
|
||||
selected: this.bookmark.selected$.value,
|
||||
edgeless: isGfxBlockComponent(this.bookmark),
|
||||
});
|
||||
|
||||
const domainName = url.match(
|
||||
|
||||
@@ -28,6 +28,7 @@ export const styles = css`
|
||||
width: calc(100% - 204px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
align-self: stretch;
|
||||
gap: 4px;
|
||||
padding: 12px;
|
||||
@@ -277,7 +278,7 @@ export const styles = css`
|
||||
.affine-bookmark-content {
|
||||
width: 100%;
|
||||
}
|
||||
.affine-bookmark-banner {
|
||||
.affine-bookmark-card:not(.edgeless) .affine-bookmark-banner {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user