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

Remove toolbar from the alpha editor #1114

Merged
merged 7 commits into from
Oct 14, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/editor/editor/RenderPost.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { CustomCodeBlockReadOnly, TiptapExtensions } from "./extensions";
import { TiptapExtensions } from "./extensions";
import { EditorContent, useEditor } from "@tiptap/react";

interface RenderPostProps {
Expand All @@ -11,7 +11,7 @@ const RenderPost = ({ json }: RenderPostProps) => {

const editor = useEditor({
editable: false,
extensions: [...TiptapExtensions, CustomCodeBlockReadOnly],
extensions: [...TiptapExtensions],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Please address the remaining usages of removed extensions.

The search identified several instances of removed extensions such as table and underline in the following files:

  • utils/createPasswordLessEmailTemplate.ts
  • utils/createEmailTemplate.ts
  • components/editor/editor/RenderPost.tsx
  • server/trpc/react.tsx
  • components/ui/Search.tsx
  • and others.

Please verify and remove or update these usages to ensure consistency with the PR objectives.

🔗 Analysis chain

LGTM! Verify removed extensions.

The change aligns with the PR objectives of simplifying the editor by removing unused features. The CustomCodeBlockReadOnly extension has been removed, leaving only the core TiptapExtensions.

To ensure consistency across the codebase, let's verify that the removed extensions are not being used elsewhere:

This script will help us confirm that the removed extensions are not being used in other parts of the codebase, ensuring that the simplification is consistent throughout the project.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining usage of removed extensions

# Test 1: Search for CustomCodeBlockReadOnly
echo "Searching for CustomCodeBlockReadOnly usage:"
rg "CustomCodeBlockReadOnly" --type typescript --type tsx

# Test 2: Search for other removed extensions mentioned in the PR objectives
echo "Searching for other removed extensions:"
rg -e "strikethrough" -e "codeblock" -e "text alignment" -e "superscript" -e "subscript" -e "table" -e "color selector" -e "highlighting" -e "underline" --type typescript --type tsx

Length of output: 485


Script:

#!/bin/bash
# Description: Check for any remaining usage of removed extensions by specifying file extensions

# Test 1: Search for CustomCodeBlockReadOnly
echo "Searching for CustomCodeBlockReadOnly usage:"
rg "CustomCodeBlockReadOnly" -g "*.ts" -g "*.tsx"

# Test 2: Search for other removed extensions mentioned in the PR objectives
echo "Searching for other removed extensions:"
rg -e "strikethrough" -e "codeblock" -e "text alignment" -e "superscript" -e "subscript" -e "table" -e "color selector" -e "highlighting" -e "underline" -g "*.ts" -g "*.tsx"

Length of output: 15375


Script:

#!/bin/bash
# Description: Check for any remaining usage of removed extensions by specifying file extensions

# Test 1: Search for CustomCodeBlockReadOnly
echo "Searching for CustomCodeBlockReadOnly usage:"
rg "CustomCodeBlockReadOnly" -g "*.ts" -g "*.tsx"

# Test 2: Search for other removed extensions mentioned in the PR objectives
echo "Searching for other removed extensions:"
rg -e "strikethrough" -e "codeblock" -e "text alignment" -e "superscript" -e "subscript" -e "table" -e "color selector" -e "highlighting" -e "underline" -g "*.ts" -g "*.tsx"

Length of output: 15375

content,
});

Expand Down

This file was deleted.

50 changes: 0 additions & 50 deletions components/editor/editor/components/CodeBlock/CodeBlock.tsx

This file was deleted.

This file was deleted.

102 changes: 0 additions & 102 deletions components/editor/editor/components/Toolbar/Toolbar.module.css

This file was deleted.

Loading
Loading