Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "feat(ai): Create an "AI Image" custom block #25670" #26483

Merged
merged 1 commit into from Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 2 additions & 8 deletions core-web/libs/block-editor/src/lib/block-editor.module.ts
Expand Up @@ -11,8 +11,6 @@ import { DotBlockEditorComponent } from './components/dot-block-editor/dot-block
import { DotEditorCountBarComponent } from './components/dot-editor-count-bar/dot-editor-count-bar.component';
import {
AIContentPromptComponent,
AIContentActionsComponent,
AIImagePromptComponent,
BubbleLinkFormComponent,
BubbleMenuButtonComponent,
BubbleMenuComponent,
Expand Down Expand Up @@ -54,9 +52,7 @@ import { SharedModule } from './shared/shared.module';
DotBlockEditorComponent,
DotEditorCountBarComponent,
FloatingButtonComponent,
AIContentPromptComponent,
AIContentActionsComponent,
AIImagePromptComponent
AIContentPromptComponent
],
providers: [DotUploadFileService, LoggerService, StringUtils, AiContentService],
exports: [
Expand All @@ -67,9 +63,7 @@ import { SharedModule } from './shared/shared.module';
SharedModule,
BubbleFormComponent,
DotBlockEditorComponent,
AIContentPromptComponent,
AIContentActionsComponent,
AIImagePromptComponent
AIContentPromptComponent
]
})
export class BlockEditorModule {}
Expand Up @@ -306,45 +306,6 @@
}
}
}

.ai-content-container {
&.ProseMirror-selectednode {
background-color: $color-palette-primary-op-20;
border: 1px solid $color-palette-primary-300;
}
}

.loader-style {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
min-height: 12.5rem;
min-width: 25rem;
width: 25.5625rem;
height: 17.375rem;
padding: 0.5rem;
border-radius: 0.5rem;
border: 1.5px solid $color-palette-gray-400;
}

.p-progress-spinner {
border: 5px solid $color-palette-gray-300;
border-radius: 50%;
border-top: 5px solid $color-palette-primary;
width: 2.4rem;
height: 2.4rem;
animation: spin 1s linear infinite;
}

@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
}

tiptap-editor {
Expand Down
Expand Up @@ -50,20 +50,17 @@ import {
FREEZE_SCROLL_KEY,
AssetUploader,
DotComands,
AIContentPromptExtension,
AIImagePromptExtension,
AIContentActionsExtension
AIContentPromptExtension
} from '../../extensions';
import { DotPlaceholder } from '../../extensions/dot-placeholder/dot-placeholder-plugin';
import { ContentletBlock, ImageNode, VideoNode, AIContentNode, LoaderNode } from '../../nodes';
import { ContentletBlock, ImageNode, VideoNode } from '../../nodes';
import {
formatHTML,
removeInvalidNodes,
SetDocAttrStep,
DotMarketingConfigService,
RestoreDefaultDOMAttrs
} from '../../shared';

@Component({
selector: 'dot-block-editor',
templateUrl: './dot-block-editor.component.html',
Expand Down Expand Up @@ -112,9 +109,7 @@ export class DotBlockEditorComponent implements OnInit, OnDestroy {
['dotContent', ContentletBlock(this.injector)],
['image', ImageNode],
['video', VideoNode],
['table', DotTableExtension()],
['aiContent', AIContentNode],
['loader', LoaderNode]
['table', DotTableExtension()]
]);

private destroy$: Subject<boolean> = new Subject<boolean>();
Expand Down Expand Up @@ -386,8 +381,6 @@ export class DotBlockEditorComponent implements OnInit, OnDestroy {
DotBubbleMenuExtension(this.viewContainerRef),
BubbleFormExtension(this.viewContainerRef),
AIContentPromptExtension(this.viewContainerRef),
AIImagePromptExtension(this.viewContainerRef),
AIContentActionsExtension(this.viewContainerRef),
DotFloatingButton(this.injector, this.viewContainerRef),
DotTableCellExtension(this.viewContainerRef),
BubbleAssetFormExtension(this.viewContainerRef),
Expand Down
Expand Up @@ -173,9 +173,7 @@ function execCommand({
subscript: () => editor.chain().setSubscript().focus().run(),
superscript: () => editor.chain().setSuperscript().focus().run(),
video: () => editor.commands.openAssetForm({ type: 'video' }),
aiContentPrompt: () => editor.commands.openAIPrompt(),
aiContent: () => editor.commands.insertAINode(),
aiImagePrompt: () => editor.commands.openImagePrompt()
aiContentPrompt: () => editor.commands.openAIPrompt()
};

getCustomActions(customBlocks).forEach((option) => {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.