Skip to content

refactor: 移除多列布局功能及相关代码#322

Merged
xun082 merged 1 commit intoxun082:mainfrom
Hemomoo:feat-del-column
Mar 17, 2026
Merged

refactor: 移除多列布局功能及相关代码#322
xun082 merged 1 commit intoxun082:mainfrom
Hemomoo:feat-del-column

Conversation

@Hemomoo
Copy link
Copy Markdown
Collaborator

@Hemomoo Hemomoo commented Mar 17, 2026

PR 描述

PR 类型

  • 🐛 Bug 修复
  • ✨ 新功能
  • 💄 UI/UX 改进
  • ♻️ 重构
  • 🚀 性能优化
  • 📝 文档更新
  • 🔄 其他

Issue 关联

Closes #

其他信息

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 17, 2026

Deploy Preview for ornate-blancmange-89db6b failed. Why did it fail? →

Name Link
🔨 Latest commit 3aa4fc9
🔍 Latest deploy log https://app.netlify.com/projects/ornate-blancmange-89db6b/deploys/69b8f46adfb21c0008187c9f

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求旨在通过完全移除多列布局功能来简化编辑器。这一变更将统一内容创建体验,使其专注于单列块结构,从而降低用户界面和底层编辑器扩展的复杂性。

Highlights

  • 功能移除: 从侧边栏块选项中移除了多列布局功能。
  • 架构简化: 更新了文档内容模型,不再支持多列布局结构。
  • 代码清理: 删除了所有与多列布局相关的 Tiptap 扩展、组件和辅助函数。
  • 交互优化: 简化了斜杠命令的逻辑和样式,移除了对多列布局的特殊处理。
Changelog
  • apps/DocFlow/src/app/docs/_components/DocumentSidebar/BlocksTab.tsx
    • 移除了侧边栏中“多列布局”的块选项。
  • apps/DocFlow/src/extensions/Document/Document.ts
    • 更新了文档内容模型,不再允许“columns”节点。
  • apps/DocFlow/src/extensions/DragHandler/DragHandler.ts
    • 删除了多列块策略及其在拖拽处理工厂中的实例化。
  • apps/DocFlow/src/extensions/MultiColumn/Column.ts
    • 删除了 Tiptap 的 Column 节点定义。
  • apps/DocFlow/src/extensions/MultiColumn/ColumnComponent.tsx
    • 删除了用于渲染列的 React 组件。
  • apps/DocFlow/src/extensions/MultiColumn/Columns.ts
    • 删除了 Tiptap 的 Columns 节点定义和相关命令。
  • apps/DocFlow/src/extensions/MultiColumn/helpers/cloneElement.ts
    • 删除了克隆元素的辅助函数。
  • apps/DocFlow/src/extensions/MultiColumn/helpers/dragHandler.ts
    • 删除了处理列拖拽的辅助函数。
  • apps/DocFlow/src/extensions/MultiColumn/helpers/removeNode.ts
    • 删除了移除节点的辅助函数。
  • apps/DocFlow/src/extensions/MultiColumn/index.ts
    • 删除了 Columns 和 Column 的导出。
  • apps/DocFlow/src/extensions/MultiColumn/menus/ColumnsMenu.tsx
    • 删除了多列布局的浮动菜单组件。
  • apps/DocFlow/src/extensions/MultiColumn/menus/index.ts
    • 删除了 ColumnsMenu 的导出。
  • apps/DocFlow/src/extensions/SlashCommand/SlashCommand.ts
    • 简化了斜杠命令的可见性逻辑,移除了对列内状态的检查。
  • apps/DocFlow/src/extensions/SlashCommand/groups.ts
    • 移除了多个斜杠命令中与“columns”相关的隐藏条件,并删除了“columns”自身的斜杠命令条目。
  • apps/DocFlow/src/extensions/extension-kit.ts
    • 从编辑器扩展套件中移除了 Columns 和 Column。
  • apps/DocFlow/src/extensions/index.ts
    • 删除了 Columns 和 Column 的导出。
  • apps/DocFlow/src/styles/partials/blocks.css
    • 删除了所有与多列布局相关的 CSS 样式。
  • apps/DocFlow/src/styles/partials/placeholder.css
    • 删除了多列布局特有的占位符样式。
Activity
  • 目前没有与此拉取请求相关的评论或审查活动。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

本次 PR 是一次重构,旨在移除项目中的多列布局(multi-column layout)功能。审查发现,所有与该功能相关的代码均已被移除,包括:

  • UI 层面:侧边栏中的“多列布局”区块。
  • 编辑器核心:ColumnColumns Tiptap 节点、Document 节点定义中的相关内容、以及拖拽创建区块的 ColumnsBlockStrategy
  • 命令系统:斜杠命令(Slash Command)中用于插入列的命令,以及在列中禁用其他命令的逻辑。
  • 样式:与列布局相关的 CSS 规则。

所有相关的 TypeScript、TSX 和 CSS 文件都得到了相应的清理,包括多个文件的完全删除。本次重构是彻底和干净的,没有发现任何残留代码或因此引入的潜在问题。

@xun082 xun082 merged commit f52822d into xun082:main Mar 17, 2026
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants